Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007318Openbravo ERP06. Material requirement planning (MRP)public2009-02-02 17:192009-02-03 11:15
joan 
gorkaion 
normalmajoralways
closedduplicate 
30Debian Etch
2.40 
 
No
Core
No
0007318: MRP_PurchaseOrder function wrong discount calculation
On the function MRP_PurchaseOrder, it calculates bad the discount due to parenthesis mistake.
Around line 221 it says something like
v_PriceStd, v_PriceActual*Cur_workproposal.QTY,((v_PriceList-v_PriceStd) / (v_PriceList * 100)),

And it should say
v_PriceStd, v_PriceActual*Cur_workproposal.QTY,((v_PriceList-v_PriceStd) / v_PriceList) * 100,

Launch an mrp with purchase sugestions
Launch the purchase sugestion to purchase orders
See that the lines of the purchase orders doens't have the discount correctly.
v_PriceStd, v_PriceActual*Cur_workproposal.QTY,((v_PriceList-v_PriceStd) / v_PriceList) * 100,
instead of
v_PriceStd, v_PriceActual*Cur_workproposal.QTY,((v_PriceList-v_PriceStd) / (v_PriceList * 100)),
No tags attached.
duplicate of defect 0005504 closed AinhoaPagola The discount field of the purchase order line is not correctly informed when using Purchase MRP 
depends on backport 0007335 closed gorkaion MRP_PurchaseOrder function wrong discount calculation 
Issue History
2009-02-02 17:19joanNew Issue
2009-02-02 17:19joanAssigned To => rafaroda
2009-02-02 17:19joansf_bug_id0 => 2557422
2009-02-03 10:57psarobeStatusnew => scheduled
2009-02-03 10:57psarobeAssigned Torafaroda => gorkaion
2009-02-03 10:57psarobefix_in_branch => trunk
2009-02-03 11:15AinhoaPagolaRegression testing => No
2009-02-03 11:15AinhoaPagolaRelationship addedduplicate of 0005504
2009-02-03 11:15AinhoaPagolaStatusscheduled => closed
2009-02-03 11:15AinhoaPagolaNote Added: 0013067
2009-02-03 11:15AinhoaPagolaDuplicate ID0 => 5504
2009-02-03 11:15AinhoaPagolaResolutionopen => duplicate

Notes
(0013067)
AinhoaPagola   
2009-02-03 11:15   
This bug was already reported and solved. Thank you anyway.