Fixed issue 20151 Applied patch provided by DAL
authorSandra Huguet <sandra.huguet@openbravo.com>
Tue, 24 Apr 2012 17:56:40 +0200
changeset 16210 985cbe917a34
parent 16209 52d3acc5d1d4
child 16211 c8a9f6fc04d6
Fixed issue 20151 Applied patch provided by DAL
src-db/database/model/functions/C_INVOICE_CREATE.xml
--- a/src-db/database/model/functions/C_INVOICE_CREATE.xml	Wed Apr 25 16:55:56 2012 +0200
+++ b/src-db/database/model/functions/C_INVOICE_CREATE.xml	Tue Apr 24 17:56:40 2012 +0200
@@ -25,7 +25,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -655,13 +655,13 @@
                   ELSE sh.DocumentNo
                 END
                 ) AS DocumentNo,
-                sh.Description,
-                sh.C_BPartner_ID,
+                coalesce(sh.Description, o.Description) as description,
+                coalesce(sh.C_BPartner_ID,o.c_bpartner_id) as c_bpartner_id,
                 o.BillTo_ID,
                 o.C_BPartner_Location_ID,
                 sh.AD_User_ID,
                 sh.DateOrdered,
-                sh.C_Order_ID,
+                coalesce(sh.C_Order_ID,o.C_Order_ID) as C_Order_ID,
                 o.SalesRep_ID,
                 COALESCE(o.C_PaymentTerm_ID, bp.C_PaymentTerm_ID) AS C_PaymentTerm_ID,
                 COALESCE(o.IsDiscountPrinted, bp.IsDiscountPrinted) AS IsDiscountPrinted,