svn commit: r785557 - /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: r785557 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java

ashish-18
Author: ashish
Date: Wed Jun 17 11:10:38 2009
New Revision: 785557

URL: http://svn.apache.org/viewvc?rev=785557&view=rev
Log:
Applied patch from jira issue OFBIZ-2620 (Bug in InvoiceServices.createInvoicesFromShipments service)
Thanks Mridul for the contribution.

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=785557&r1=785556&r2=785557&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 Wed Jun 17 11:10:38 2009
@@ -1294,7 +1294,11 @@
                 if (billAvail != null && billAvail.signum() == 1) { // this checks if billAvail is a positive non-zero number
                     if (issueQty != null && issueQty.compareTo(billAvail) > 0) {
                         // can only bill some of the issuance; others have been billed already
-                        issue.set("quantity", billAvail);
+                        if ("ShipmentReceipt".equals(issue.getEntityName())) {
+                            issue.set("quantityAccepted", billAvail);
+                        } else {
+                            issue.set("quantity", billAvail);
+                        }
                         billAvail = ZERO;
                     } else {
                         // now have been billed