Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007335Openbravo ERP06. Material requirement planning (MRP)public2009-02-02 17:192009-02-03 11:16
joan 
gorkaion 
normalmajoralways
closedduplicate 
30Debian Etch
2.40 
 
No
Core
No
0007335: 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 
blocks defect 0007318 closed gorkaion MRP_PurchaseOrder function wrong discount calculation 
Issue History
2009-02-03 10:57psarobeTypedefect => backport
2009-02-03 10:57psarobefix_in_branch => 2.40
2009-02-03 11:09rafarodaAssigned Torafaroda => gorkaion
2009-02-03 11:16AinhoaPagolaRegression testing => No
2009-02-03 11:16AinhoaPagolaRelationship addedduplicate of 0005504
2009-02-03 11:16AinhoaPagolaStatusscheduled => closed
2009-02-03 11:16AinhoaPagolaNote Added: 0013068
2009-02-03 11:16AinhoaPagolaDuplicate ID0 => 5504
2009-02-03 11:16AinhoaPagolaResolutionopen => duplicate

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