Fixes issue 0023923: Book POS order is failing under some conditions
authorJon Alegría <jon.alegria@openbravo.com>
Mon, 27 May 2013 17:54:17 +0200
changeset 20476 7716d145ea66
parent 20475 8a750c29825c
child 20477 51de13657be6
Fixes issue 0023923: Book POS order is failing under some conditions
src-db/database/model/functions/C_INVOICE_CREATE.xml
--- a/src-db/database/model/functions/C_INVOICE_CREATE.xml	Mon May 27 17:09:04 2013 +0200
+++ b/src-db/database/model/functions/C_INVOICE_CREATE.xml	Mon May 27 17:54:17 2013 +0200
@@ -544,14 +544,14 @@
                     v_Reference, NULL, 0, 0,
                     0, 0, 0, NULL,
                     0, NULL, NULL, 0, 
-                    ptr_ol.explode, (SELECT c_invoiceline_id 
+                    ptr_sl.explode, (SELECT c_invoiceline_id 
                                             FROM c_invoiceline 
                                             WHERE c_invoice_id=p_Invoice_ID 
                                                and c_orderline_id = (SELECT BOM_parent_id 
                                                                      FROM c_orderline 
-                                                                     WHERE c_orderline_id = ptr_ol.c_orderline_id)),
-                    ptr_ol.C_Project_ID, ptr_ol.C_Bpartner_ID, ptr_ol.A_Asset_ID,
-                    ptr_ol.C_Costcenter_ID, ptr_ol.User1_ID, ptr_ol.User2_ID
+                                                                     WHERE c_orderline_id = ptr_sl.c_orderline_id)),
+                    ptr_sl.C_Project_ID, ptr_sl.C_Bpartner_ID, ptr_sl.A_Asset_ID,
+                    ptr_sl.C_Costcenter_ID, ptr_sl.User1_ID, ptr_sl.User2_ID
                   )
                   ;
               END IF;