You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/08/06 06:47:10 UTC

svn commit: r982872 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy

Author: doogie
Date: Fri Aug  6 04:47:10 2010
New Revision: 982872

URL: http://svn.apache.org/viewvc?rev=982872&view=rev
Log:
Also check OrderAdjustmentBilling for an orderId linkages when
displaying InventoryItem records.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy?rev=982872&r1=982871&r2=982872&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy Fri Aug  6 04:47:10 2010
@@ -38,6 +38,15 @@ if (invoiceItemList) {
         if (orderItemBilling) {
             orderId = orderItemBilling.orderId;
             invoiceItemMap.orderId = orderId;
+        } else {
+            orderAdjustmentBilling = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustmentBilling", [invoiceId : invoiceId, invoiceItemSeqId : invoiceItemSeqId]));
+            if (orderAdjustmentBilling) {
+                orderAdjustment = EntityUtil.getFirst(delegator.findByAnd("OrderAdjustment", [orderAdjustmentId : orderAdjustmentBilling.orderAdjustmentId]))
+                if (orderAdjustment) {
+                    orderId = orderAdjustment.orderId;
+                    invoiceItemMap.orderId = orderId;
+                }
+            }
         }
         invoiceItems.add(invoiceItemMap);
     }