Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006163Openbravo ERP03. Procurement managementpublic2008-11-23 13:122008-12-15 10:39
rafaroda 
shuehner 
highmajoralways
closedunable to reproduce 
20Ubuntu 7.10
2.35MP9 
 
No
Core
No
0006163: Format.xml not correctly taken
In 2.3x, Format.xml is not correctly taken for Unit Price.

This causes miss-calculations in the discount (see attached image).

This issue does not reproduce in 2.40 nor in trunk.
1) Edit the following line inside config/Format.xml file:
<Number name="priceEdition"
       decimal="." grouping="," formatOutput="#0.0000" formatInternal="#0.0000" />
2) Compile this change: ant compile.development -Dtab="order" -Dtr="no"
3) Create a new purchase order in 'Procurement Management || Transactions || Purchase Order'
4) Go to Lines tab and add a new line.
5) Set 'Unit Price' and 'List Price' equals to '0.0008'.

Discount is calculated as -25, as if 'Unit Price' = 0.001 and 'List Price' = 0.0008

In the database the price data are correct, both 0.0008, but discount is saved incorrectly (-25.00): select pricelist, priceactual, discount from c_orderline order by updated desc;
No tags attached.
depends on backport 0006546 closed rafaroda Format.xml not correctly taken 
png round-discount.png (78,875) 2008-11-23 13:12
https://issues.openbravo.com/file_download.php?file_id=459&type=bug
png
Issue History
2008-11-23 13:12rafarodaNew Issue
2008-11-23 13:12rafarodaAssigned To => rafaroda
2008-11-23 13:12rafarodaFile Added: round-discount.png
2008-11-23 13:12rafarodaOBNetwork customer => No
2008-11-23 13:12rafarodaRegression testing => No
2008-11-23 13:12rafarodafix_in_branch => 2.3x
2008-11-25 13:50rafarodaTypebackport => defect
2008-12-02 13:02jaimetorresf_bug_id0 => 2377115
2008-12-15 10:38rafarodaStatusnew => scheduled
2008-12-15 10:38rafarodaAssigned Torafaroda => shuehner
2008-12-15 10:38rafarodafix_in_branch2.3x => trunk
2008-12-15 10:39rafarodaStatusscheduled => closed
2008-12-15 10:39rafarodaNote Added: 0011355
2008-12-15 10:39rafarodaResolutionopen => unable to reproduce

Notes
(0011355)
rafaroda   
2008-12-15 10:39   
This issue does not reproduce in trunk but only in 2.3x branch.