Author: apatel
Date: Fri Aug 7 05:02:27 2009
New Revision: 801882
URL:
http://svn.apache.org/viewvc?rev=801882&view=revLog:
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 ->