Fixes Issue 25532: Price list creation is not working fine
authorGaurav Deshmukh <gaurav.deshmukh@openbravo.com>
Wed, 05 Feb 2014 15:01:07 +0530
changeset 22018 12b3d243b293
parent 22017 af9e83d05902
child 22038 e6196eede0f8
Fixes Issue 25532: Price list creation is not working fine
src-db/database/model/functions/M_PRICELIST_CREATE.xml
--- a/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Thu Jan 30 11:29:06 2014 +0530
+++ b/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Wed Feb 05 15:01:07 2014 +0530
@@ -516,18 +516,18 @@
           ;       
         ELSE    
          UPDATE M_ProductPrice
-          SET PriceList=(
+          SET PriceList=ROUND((
           CASE Cur_DiscountLine.List_Base WHEN 'C' THEN PriceList*(1+Cur_DiscountLine.LIST_MARGIN/100) ELSE PriceList
           END
-          ),
-          PriceStd=(
+          ), v_StdPrecision),
+          PriceStd=ROUND((
           CASE Cur_DiscountLine.Std_Base WHEN 'C' THEN PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) ELSE PriceStd 
           END
-          ),
-          PriceLimit=(
+          ), v_StdPrecision),
+          PriceLimit=ROUND((
           CASE Cur_DiscountLine.Limit_Base WHEN 'C' THEN PriceLimit*(1+Cur_DiscountLine.LIMIT_MARGIN/100) ELSE PriceLimit
           END
-          ),
+          ), v_StdPrecision),
 	      updated=now()
         WHERE M_PriceList_Version_ID=v_PriceList_Version_ID
           AND EXISTS