String orderPaymentPreferenceId = (String) context.get("orderPaymentPreferenceId");
BigDecimal amount = (BigDecimal) context.get("amount");
Locale locale = (Locale) context.get("locale");
GenericValue orderPaymentPreference = null;
try {
orderPaymentPreference = delegator.findOne("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId), false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
"AccountingProblemGettingOrderPaymentPreferences", locale) + " " +
orderPaymentPreferenceId);