svn commit: r801882 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy

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

svn commit: r801882 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy

apatel-2
Author: apatel
Date: Fri Aug  7 05:02:27 2009
New Revision: 801882

URL: http://svn.apache.org/viewvc?rev=801882&view=rev
Log:
Adding check to avoid NPE.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy?rev=801882&r1=801881&r2=801882&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy Fri Aug  7 05:02:27 2009
@@ -65,7 +65,7 @@
         invoicesList = [];  // to pass back to the screeen list of unapplied invoices
         paymentApplied = PaymentWorker.getPaymentApplied(payment);
         paymentToApply = payment.getBigDecimal("amount").setScale(decimals,rounding).subtract(paymentApplied);
-        if (actual) {
+        if (actual && payment.actualCurrencyAmount) {
             paymentToApply = payment.getBigDecimal("actualCurrencyAmount").setScale(decimals,rounding).subtract(paymentApplied);
         }
         invoices.each { invoice ->