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 18030 b18b8ff429dd
parent 18029 605a9d2ce412
child 18031 e7a6a7368d30
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 12:44:29 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