details:   /erp/stable/2.50/rev/5280ca88645d
changeset: 9139:5280ca88645d
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Mon Jan 17 18:26:12 2011 +0100
summary:   Fixes issue 0011248: Work Requirement: Rounding issue for Quantity 
field for WR created by MRP
It has been removed the fixed rouding to 3 decimals and added as rounding 
parameter the standard precision of the product UOM

diffstat:

 src-db/database/model/functions/MRP_WORKREQUIREMENT.xml |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 4b40fcfb60fe -r 5280ca88645d 
src-db/database/model/functions/MRP_WORKREQUIREMENT.xml
--- a/src-db/database/model/functions/MRP_WORKREQUIREMENT.xml   Mon Jan 17 
16:19:34 2011 +0100
+++ b/src-db/database/model/functions/MRP_WORKREQUIREMENT.xml   Mon Jan 17 
18:26:12 2011 +0100
@@ -67,11 +67,13 @@
     FOR Cur_workproposal IN (
       SELECT MRP_RUN_PRODUCTIONLINE.* , MA_PROCESSPLAN.EXPLODEPHASES, 
       MA_PROCESSPLAN.CONVERSIONRATE, MA_PROCESSPLAN.SECONDARYUNIT,
-      ROUND((MRP_RUN_PRODUCTIONLINE.qty/A.PROQTY)+0.0005,3) AS PROCESSPLANQTY, 
MRP_RUN_PRODUCTIONLINE.AD_ORG_ID AS ADORG_ID
-      FROM MRP_RUN_PRODUCTIONLINE, MA_PROCESSPLAN, 
+      ROUND((MRP_RUN_PRODUCTIONLINE.qty/A.PROQTY), C_UOM.STDPRECISION) AS 
PROCESSPLANQTY, MRP_RUN_PRODUCTIONLINE.AD_ORG_ID AS ADORG_ID
+      FROM MRP_RUN_PRODUCTIONLINE, M_PRODUCT, C_UOM, MA_PROCESSPLAN, 
         (SELECT DISTINCT produced, proqty, ma_processplan_id
          FROM MA_PROCESSPLAN_TOTALIZED) A
-      WHERE MRP_RUN_PRODUCTIONLINE.MA_PROCESSPLAN_ID = 
MA_PROCESSPLAN.MA_PROCESSPLAN_ID
+      WHERE MRP_RUN_PRODUCTIONLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
+        AND M_PRODUCT.C_UOM_ID = C_UOM.C_UOM_ID
+        AND MRP_RUN_PRODUCTIONLINE.MA_PROCESSPLAN_ID = 
MA_PROCESSPLAN.MA_PROCESSPLAN_ID
         AND MA_PROCESSPLAN.MA_PROCESSPLAN_ID = A.MA_PROCESSPLAN_ID
         AND A.PRODUCED = MRP_RUN_PRODUCTIONLINE.M_PRODUCT_ID
         AND MRP_RUN_PRODUCTION_ID = v_Record_ID

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to