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

sichen
Author: sichen
Date: Tue Aug 14 15:20:38 2007
New Revision: 565949

URL: http://svn.apache.org/viewvc?view=rev&rev=565949
Log:
ShipmentReceipt has no shipmentItemSeqId field and shipmentItemSeqId is a required field for ShipmentItemBilling, so don't create a ShipmentItemBilling record for invoice items created as the result of a purchase shipment. What really needs to happen is for ShipmentReceipt to have a shipmentItemSeqId field, but this is a lower-impact fix for now.

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=565949&r1=565948&r2=565949
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Tue Aug 14 15:20:38 2007
@@ -481,16 +481,12 @@
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingOrderItemBillingFromOrder",locale), null, null, createOrderItemBillingResult);
                     }
 
-                    if ("ItemIssuance".equals(currentValue.getEntityName()) || "ShipmentReceipt".equals(currentValue.getEntityName())) {
+                    if ("ItemIssuance".equals(currentValue.getEntityName())) {
 
                         // create the ShipmentItemBilling record
                         GenericValue shipmentItemBilling = delegator.makeValue("ShipmentItemBilling", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId));
                         shipmentItemBilling.put("shipmentId", currentValue.get("shipmentId"));
-    
-                        // ShipmentReceipt has no shipmentItemSeqId field
-                        if ("ItemIssuance".equals(currentValue.getEntityName())) {
                         shipmentItemBilling.put("shipmentItemSeqId", currentValue.get("shipmentItemSeqId"));
-                        }
                         shipmentItemBilling.create();
                     }