private boolean isValid(String to){
  if (p_SetFutureCostTo.length() == 0)   return true;
  String toTarget=to;
  if (to.equals(TO_AverageInvoiceHistory))   to=TO_AverageInvoice;
  if (to.equals(TO_AveragePOHistory))   to=TO_AveragePO;
  if (to.equals(TO_FutureStandardCost))   to=TO_StandardCost;
  if (to.equals(TO_AverageInvoice) || to.equals(TO_AveragePO) || to.equals(TO_FiFo)|| to.equals(TO_LiFo)|| to.equals(TO_StandardCost)) {
    MCostElement ce=MCostElement.getByMaterialCostElementType(client);
    return ce != null;
  }
  return true;
}

private boolean isValid ( String to ) { if ( p_SetFutureCostTo . length ( ) == 0 ) return true ; String toTarget = to ; if ( to . equals ( TO_AverageInvoiceHistory ) ) to = TO_AverageInvoice ; if ( to . equals ( TO_AveragePOHistory ) ) to = TO_AveragePO ; if ( to . equals ( TO_FutureStandardCost ) ) to = TO_StandardCost ; if ( to . equals ( TO_AverageInvoice ) || to . equals ( TO_AveragePO ) || to . equals ( TO_FiFo ) || to . equals ( TO_LiFo ) || to . equals ( TO_StandardCost ) ) { MCostElement ce = MCostElement . getByMaterialCostElementType ( client ) ; return ce != null ; } return true ; }
costing method must exist
