Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012386
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 01. General setupmajoralways2010-02-22 13:362010-03-12 22:40
ReporternetworkbView Statuspublic 
Assigned Toharikrishnan 
PriorityurgentResolutionopenFixed in Version2.50MP14
StatusclosedFix in branchFixed in SCM revision825d188f527d
ProjectionnoneETAnoneTarget Version2.50MP14
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP11SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012386: Price Precision error

DescriptionYou modify your Format.xml file to be able to show 4 decimals in prices (and also your Price Precision in the application is set to 4), and then set a price with 4 decimals for a certain product.
When you create a purchase order line using this product the Unit, Standard and Price List prices are rounded to 2 decimals (which is standard precision, not price precision) instead of 4.

The problem is in c_currency_round function, where StdPrecision is always taken instead of PricePrecision, in this case.
Steps To Reproduce1. Modify Format.xml to set priceRelation and priceEdition fields with 4 decimals.
2. Compile application: ant compile.development -Dtab=xxx
3. Go to General Setup || Application || Currency and realize that
Standard Precision=2
Price Precision=4
Cost Precision=4
4. Go to Master Data Management || Product || Product >> Price : set any price to '1.1234'
5. Procurement Management || Transactions || Purchase Order: create new record and go to its lines
6. Procurement Management || Transactions || Purchase Order || Header >> Lines : add a new line choosing the certain product and realize that Unit Price is set to '1.1200' (instead of '1.1234')
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0024867)
hgbot (developer)
2010-02-26 13:32

Repository: erp/devel/pi
Changeset: 825d188f527d6a6beb46abcacc45193d74150ff4
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Fri Feb 26 18:03:54 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/825d188f527d6a6beb46abcacc45193d74150ff4 [^]

Fixes Issue 12386: Price Precision error.

---
M src-db/database/model/functions/M_BOM_PRICELIMIT.xml
M src-db/database/model/functions/M_BOM_PRICELIST.xml
M src-db/database/model/functions/M_BOM_PRICESTD.xml
A src-db/database/model/functions/C_GET_CURRENCY_PRECISION.xml
---
(0024868)
harikrishnan (reporter)
2010-02-26 13:39

Steps to Test:

* Go to file Format.xml in workspace/config/Format.xml and change the values as given below.
    <Number name="priceRelation"
       decimal="." grouping="," formatOutput="#,##0.0000" formatInternal="#0.0000" />
   <Number name="priceEdition"
       decimal="." grouping="," formatOutput="#0.0000" formatInternal="#0.0000" />
*Then run the ant task ant compile.development -Dtab="xxx"

*Then go to Product (Master Data Management || Product || Product ) and then to Price(Master Data Management || Product || Product >> Price ), change the price to four decimal points for example " product = "hat" List price=35.1234 similar way do it for other two prices also".
*Then go to purchase order(Procurement Management || Transactions || Purchase Order || Header ) and create a new header.Then go to lines and select a product that we changed above.In this case the product will be "Hat".You can notice the four digits will be displayed in net unit price.
(0024926)
sureshbabu (reporter)
2010-03-02 08:20

Hi Hari,

I am still finding the same issue, i tried to reproduce the issue by modifying the Format.xml to set priceRelation and priceEdition fields with 6 decimals instead of 4 decimal places. Then i entered the product price as 2.123456. When i used the product in transaction window i am finding the price as 2.123500 instead of 2.123456.

Kindly let me know if you are not able to reproduce the issue.
(0024936)
harikrishnan (reporter)
2010-03-02 12:41
edited on: 2010-03-02 12:41

Steps to Test:

* Go to file Format.xml in workspace/config/Format.xml and change the values as given below.
    <Number name="priceRelation"
       decimal="." grouping="," formatOutput="#,##0.0000" formatInternal="#0.0000" />
   <Number name="priceEdition"
       decimal="." grouping="," formatOutput="#0.0000" formatInternal="#0.0000" />
*Then run the ant task ant compile.development -Dtab="xxx"
*Change the price precision in Currency(General Setup || Application || Currency || Currency ) according to the precision you want.In this case you want update to 6.
*Then go to Product (Master Data Management || Product || Product ) and then to Price(Master Data Management || Product || Product >> Price ), change the price to four decimal points for example " product = "hat" List price=35.1234 similar way do it for other two prices also".
*Then go to purchase order(Procurement Management || Transactions || Purchase Order || Header ) and create a new header.Then go to lines and select a product that we changed above.In this case the product will be "Hat".You can notice the four digits will be displayed in net unit price.

(0024940)
sureshbabu (reporter)
2010-03-02 13:09

i have retested as per the updated steps, its working fine.
(0024941)
sureshbabu (reporter)
2010-03-02 13:17

i have retested as per the updated steps, its working fine.
(0025348)
hudsonbot (developer)
2010-03-12 22:40

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/825d188f527d [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]

- Issue History
Date Modified Username Field Change
2010-02-22 13:36 networkb New Issue
2010-02-22 13:36 networkb Assigned To => adrianromero
2010-02-22 13:49 adrianromero Status new => scheduled
2010-02-22 13:49 adrianromero fix_in_branch => pi
2010-02-26 13:25 harikrishnan Assigned To adrianromero => harikrishnan
2010-02-26 13:32 hgbot Checkin
2010-02-26 13:32 hgbot Note Added: 0024867
2010-02-26 13:32 hgbot Status scheduled => resolved
2010-02-26 13:32 hgbot Resolution open => fixed
2010-02-26 13:32 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/825d188f527d6a6beb46abcacc45193d74150ff4 [^]
2010-02-26 13:39 harikrishnan Note Added: 0024868
2010-03-02 08:20 sureshbabu Note Added: 0024926
2010-03-02 08:20 sureshbabu Status resolved => new
2010-03-02 08:20 sureshbabu Resolution fixed => open
2010-03-02 12:41 harikrishnan Note Added: 0024936
2010-03-02 12:41 harikrishnan Note Edited: 0024936 View Revisions
2010-03-02 13:09 sureshbabu Note Added: 0024940
2010-03-02 13:09 sureshbabu Status new => acknowledged
2010-03-02 13:16 adrianromero Status acknowledged => scheduled
2010-03-02 13:16 adrianromero fix_in_branch pi =>
2010-03-02 13:16 adrianromero Status scheduled => resolved
2010-03-02 13:17 sureshbabu Note Added: 0024941
2010-03-02 13:17 sureshbabu Status resolved => closed
2010-03-02 13:17 sureshbabu Fixed in Version => 2.50MP13
2010-03-08 16:04 jpabloae Fixed in Version 2.50MP13 => 2.50MP14
2010-03-08 16:05 jpabloae Target Version 2.50MP13 => 2.50MP14
2010-03-10 17:24 anonymous sf_bug_id 0 =>
2010-03-10 18:30 anonymous sf_bug_id => 2968093
2010-03-12 22:40 hudsonbot Checkin
2010-03-12 22:40 hudsonbot Note Added: 0025348


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker