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

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

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

doogie-3
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);
     }