Fixes issue 22906: Using a BOM product in sales management
authorJavier Etxarri <javier.echarri@openbravo.com>
Mon, 28 Jan 2013 13:03:19 +0100
changeset 19482 06da080dd39f
parent 19481 cc72a8879a12
child 19483 f0be705eaf76
Fixes issue 22906: Using a BOM product in sales management
document is not possible to close the document
src-db/database/model/functions/C_ORDER_POST1.xml
--- a/src-db/database/model/functions/C_ORDER_POST1.xml	Mon Jan 28 12:20:13 2013 +0100
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml	Mon Jan 28 13:03:19 2013 +0100
@@ -543,6 +543,7 @@
 					(CASE WHEN (QtyDelivered < 0 AND qtyinvoiced < 0) THEN LEAST(QtyDelivered, qtyinvoiced) ELSE GREATEST(QtyDelivered, qtyinvoiced) END) END) END)
                                   FROM C_ORDERLINE COL
                                   WHERE COL.C_ORDERLINE_ID = C_ORDERLINE.C_ORDERLINE_ID)
+                AND m_product_id IS NOT NULL
             )
             LOOP
               v_QtyOrdered := CASE WHEN (Cur_Inventory.QtyDelivered < 0) THEN LEAST(Cur_Inventory.QtyDelivered, Cur_Inventory.QtyInvoiced) ELSE GREATEST(Cur_Inventory.QtyDelivered, Cur_Inventory.QtyInvoiced) END;