Author: jleroux
Date: Fri Sep 25 04:58:33 2009
New Revision: 818716
URL:
http://svn.apache.org/viewvc?rev=818716&view=revLog:
A patch from Arun Patidar "Error in cancel complete received inventory item of purchase order.." (
https://issues.apache.org/jira/browse/OFBIZ-2951) - OFBIZ-2951
When we goes for canceling a complete received inventory item of purchase order in 'Receive Inventory' tab it gives an error.
Steps for regenerating error:
1). Create and approve a purchase order of more than one item.
2). Click on 'Receive' link from order detail page.
3) Selects Shipment to Receive
4) Complete receive any one product of order.
5). Now Cancel that received item.
6). It gives an error .
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=818716&r1=818715&r2=818716&view=diff==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Fri Sep 25 04:58:33 2009
@@ -512,10 +512,12 @@
<entity-and entity-name="OrderItemBilling" list="orderItemBillings">
<field-map field-name="orderId" from-field="orderItem.orderId"/>
</entity-and>
- <first-from-list list="orderItemBillings" entry="orderItemBilling"/>
- <set field="invoiceStatusMap.invoiceId" from-field="orderItemBilling.invoiceId"/>
- <set field="invoiceStatusMap.statusId" value="INVOICE_CANCELLED"/>
- <call-service service-name="setInvoiceStatus" in-map-name="invoiceStatusMap"/>
+ <if-not-empty field="orderItemBillings">
+ <first-from-list list="orderItemBillings" entry="orderItemBilling"/>
+ <set field="invoiceStatusMap.invoiceId" from-field="orderItemBilling.invoiceId"/>
+ <set field="invoiceStatusMap.statusId" value="INVOICE_CANCELLED"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="invoiceStatusMap"/>
+ </if-not-empty>
</if-compare>
</simple-method>
</simple-methods>
\ No newline at end of file