Author: jacopoc
Date: Thu Jun 21 06:09:57 2007
New Revision: 549464
URL: http://svn.apache.org/viewvc?view=rev&rev=549464
Log:
Small formatting fix.
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?view=diff&rev=549464&r1=549463&r2=549464
==============================================================================
---
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
(original)
+++
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
Thu Jun 21 06:09:57 2007
@@ -503,7 +503,7 @@
// If the absolute invoiced amount >= the abs of the
adjustment amount, the full amount has already been invoiced,
// so skip this adjustment
- if (null == adj.get("amount")) { // JLR 17/4/7 : fix a
bug coming from POS in case of use of a discount (on item(s) or sale, item(s)
here) and a cash amount higher than total (hence issuing change)
+ if (adj.get("amount") == null) { // JLR 17/4/7 : fix a
bug coming from POS in case of use of a discount (on item(s) or sale, item(s)
here) and a cash amount higher than total (hence issuing change)
continue;
}
if
(adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal("amount").setScale(decimals,
rounding).abs()) > 0) {
@@ -522,8 +522,7 @@
} else {
amount = amount.setScale(decimals, rounding);
}
- }
- else if (adj.get("sourcePercentage") != null) {
+ } else if (adj.get("sourcePercentage") != null) {
// pro-rate the amount
// set decimals = 100 means we don't round this
intermediate value, which is very important
BigDecimal percent =
adj.getBigDecimal("sourcePercentage");