Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006546Openbravo ERP03. Procurement managementpublic2008-12-15 10:382009-01-13 19:35
rafaroda 
rafaroda 
highmajoralways
closedout of date 
20Ubuntu 7.10
2.35MP9 
 
Core
No
0006546: 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.
related to defect 0006558 closed AinhoaPagola SL_Order_Amt callout does not round all price fields but only some 
blocks defect 0006163 closed shuehner Format.xml not correctly taken 
Issue History
2008-12-15 10:38rafarodaNew Issue
2008-12-15 10:38rafarodaAssigned To => shuehner
2008-12-15 10:38rafarodaStatusnew => scheduled
2008-12-15 17:24shuehnerRelationship addedrelated to 0006558
2008-12-15 17:26shuehnerNote Added: 0011379
2008-12-15 17:26shuehnerAssigned Toshuehner => rafaroda
2009-01-13 19:35AinhoaPagolaRegression testing => No
2009-01-13 19:35AinhoaPagolaStatusscheduled => closed
2009-01-13 19:35AinhoaPagolaNote Added: 0012159
2009-01-13 19:35AinhoaPagolaResolutionopen => out of date

Notes
(0011379)
shuehner   
2008-12-15 17:26   
The issue 6558 seems to be a general case of this problem. In this 6558 issue there are steps how to reproduce this problem without changing the Format.xml definition.
(0012159)
AinhoaPagola   
2009-01-13 19:35   
The fix for 0006558 fixes this one aswell.

https://issues.openbravo.com/view.php?id=6558 [^]