svn commit: r928180 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r928180 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy

jleroux@apache.org
Author: jleroux
Date: Sat Mar 27 10:33:27 2010
New Revision: 928180

URL: http://svn.apache.org/viewvc?rev=928180&view=rev
Log:
Of course the safe navigation changes at r928171 were not enough. This completes them.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy?rev=928180&r1=928179&r2=928180&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ListNotAppliedPayments.groovy Sat Mar 27 10:33:27 2010
@@ -68,11 +68,11 @@ List getPayments(List payments, boolean
             if (actual) {
                 paymentMap.amount = payment.actualCurrencyAmount;
                 paymentMap.currencyUomId = payment.actualCurrencyUomId;
-                paymentToApply = payment.getBigDecimal("actualCurrencyAmount")?.setScale(decimals,rounding).subtract(paymentApplied);
+                paymentToApply = payment.getBigDecimal("actualCurrencyAmount")?.setScale(decimals,rounding)?.subtract(paymentApplied);
             } else {
                 paymentMap.amount = payment.amount;
                 paymentMap.currencyUomId = payment.currencyUomId;
-                paymentToApply = payment.getBigDecimal("amount")?.setScale(decimals,rounding).subtract(paymentApplied);
+                paymentToApply = payment.getBigDecimal("amount")?.setScale(decimals,rounding)?.subtract(paymentApplied);
             }
             if (paymentToApply?.signum() == 1) {
                 paymentMap.paymentId = payment.paymentId;