use of edu.cornell.kfs.fp.businessobject.PaymentMethod in project cu-kfs by CU-CommunityApps.
the class PaymentMethodRule method processCustomRouteDocumentBusinessRules.
@Override
protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) {
boolean continueRouting = super.processCustomRouteDocumentBusinessRules(document);
PaymentMethod paymentMethod = (PaymentMethod) document.getNewMaintainableObject().getBusinessObject();
// checks on the main record
GlobalVariables.getMessageMap().clearErrorPath();
GlobalVariables.getMessageMap().addToErrorPath("document.newMaintainableObject");
// TODO : This is a hack now, foreign draft does not need this check
if (!StringUtils.equals(PaymentMethod.PM_CODE_FOREIGN_DRAFT, paymentMethod.getPaymentMethodCode()) && !StringUtils.equals(PaymentMethod.PM_CODE_WIRE, paymentMethod.getPaymentMethodCode())) {
continueRouting &= sanityCheckFlags(paymentMethod);
}
continueRouting &= checkNeedForBankCode(paymentMethod);
// checks on the chart records
for (int i = 0; i < paymentMethod.getPaymentMethodCharts().size(); i++) {
GlobalVariables.getMessageMap().addToErrorPath("paymentMethodCharts[" + i + "]");
PaymentMethodChart paymentMethodChart = paymentMethod.getPaymentMethodCharts().get(i);
if (paymentMethodChart.isNewCollectionRecord()) {
continueRouting &= isNewEffectiveDateInFuture(paymentMethod.getPaymentMethodCharts().get(i));
continueRouting &= checkFeeInformation(paymentMethod, paymentMethod.getPaymentMethodCharts().get(i));
continueRouting &= checkClearingAccountInformation(paymentMethod, paymentMethod.getPaymentMethodCharts().get(i));
}
GlobalVariables.getMessageMap().removeFromErrorPath("paymentMethodCharts[" + i + "]");
}
GlobalVariables.getMessageMap().removeFromErrorPath("document.newMaintainableObject");
return continueRouting;
}
use of edu.cornell.kfs.fp.businessobject.PaymentMethod in project cu-kfs by CU-CommunityApps.
the class PaymentMethodValuesFinder method getKeyValues.
/*
* @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
*/
public List<KeyValue> getKeyValues() {
Collection<PaymentMethod> paymentMethods = getBusinessObjectService().findMatchingOrderBy(PaymentMethod.class, getFilterCriteria(), "paymentMethodName", true);
List<KeyValue> labels = new ArrayList<KeyValue>(paymentMethods.size());
for (PaymentMethod pm : paymentMethods) {
labels.add(new ConcreteKeyValue(pm.getPaymentMethodCode(), pm.getPaymentMethodCode() + " - " + pm.getPaymentMethodName()));
}
return labels;
}
Aggregations