svn commit: r1594141 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java

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

svn commit: r1594141 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java

paulfoxworthy
Author: paulfoxworthy
Date: Tue May 13 06:33:57 2014
New Revision: 1594141

URL: http://svn.apache.org/r1594141
Log:
Ensure invoicePerShipment variable always has a value and is never null.


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?rev=1594141&r1=1594140&r2=1594141&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Tue May 13 06:33:57 2014
@@ -1098,7 +1098,11 @@ public class InvoiceServices {
             } catch (GenericEntityException e) {
                 return ServiceUtil.returnError(e.getMessage());
             }
-        } else {
+        }
+        
+        // Either no orderShipment exists, or there's a null invoicePerShipment in the OrderHeader.
+        // In either case, use the default value from the properties
+        if (invoicePerShipment == null) {
             invoicePerShipment = UtilProperties.getPropertyValue("AccountingConfig","create.invoice.per.shipment");
         }