fixes issue 21532: Line net amount not updating properly in Oracle
authorCarlos Aristu <carlos.aristu@openbravo.com>
Mon, 03 Sep 2012 13:12:56 +0200
changeset 17849 bb5ec0f1781c
parent 17848 8d78c37391b6
child 17850 3020127b4f3a
fixes issue 21532: Line net amount not updating properly in Oracle
src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Product_data.xsql
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Product_data.xsql	Mon Sep 03 14:24:49 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Product_data.xsql	Mon Sep 03 13:12:56 2012 +0200
@@ -24,9 +24,9 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
-        SELECT M_BOM_PriceStd(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceStd,
-        M_BOM_PriceList(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceList,
-        M_BOM_PriceLimit(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceLimit,
+        SELECT TRIM(TO_CHAR(M_BOM_PriceStd(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00'))  AS PriceStd,
+        TRIM(TO_CHAR(M_BOM_PriceList(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00'))  AS PriceList,
+        TRIM(TO_CHAR(M_BOM_PriceLimit(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00'))  AS PriceLimit,
         p.C_UOM_ID,pv.ValidFrom,pl.C_Currency_ID 
         FROM M_Product p, M_ProductPrice pp, M_Pricelist pl, M_PriceList_Version pv 
         WHERE p.M_Product_ID=pp.M_Product_ID
@@ -45,9 +45,9 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
-        SELECT M_BOM_PriceStd(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceStd,
-        M_BOM_PriceList(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceList,
-        M_BOM_PriceLimit(p.M_Product_ID,pv.M_PriceList_Version_ID) AS PriceLimit,
+        SELECT TRIM(TO_CHAR(M_BOM_PriceStd(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00')) AS PriceStd,
+        TRIM(TO_CHAR(M_BOM_PriceList(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00'))  AS PriceList,
+        TRIM(TO_CHAR(M_BOM_PriceLimit(p.M_Product_ID,pv.M_PriceList_Version_ID), '9999999990D00'))  AS PriceLimit,
         p.C_UOM_ID,pv.ValidFrom,pl.C_Currency_ID 
         FROM M_Product p, M_ProductPrice pp, M_Pricelist pl, M_Pricelist bpl, M_PriceList_Version pv
         WHERE p.M_Product_ID=pp.M_Product_ID