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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012487
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2010-02-26 14:212010-04-16 00:00
ReporternetworkbView Statuspublic 
Assigned Togorkaion 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf718ec3e327c
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

0012487: m_generate_average_costs doesn't round to Cost Precision

DescriptionIn an application with:
* Format.xml showing 5 decimals
* Currency precisions set to: StandardPrecision=2; CostPrecision=3; PricePrecision=4.
* Currency Conversion from EUR to CUP and CUP to EUR
* PriceList with currency=CUP and any price for a certain product with 4 decimals

If you have a Goods Receipt and its associated Purchase Invoice, and you run "Generate Average cost" process, cost and price values are calculated using 2 decimals (StdPrecision) instead of 3 (CostPrecision).

The problem is function C_Currency_Convert (which is called by M_Generate_Average_Costs) calls function C_Currency_Round with last parameter 'p_costing' always set to NULL. Due to that, C_Currency_Round takes StandardPrecision instead of CostPrecision.
Steps To Reproduce1. Modify Format.xml to set euroRelation,euroEdition,priceRelation,priceEdition fields with 5 decimals.
2. Compile application: ant compile.development -Dtab=xxx
3. Logged as System Administrator, Go to General Setup || Application || Currency and set EUR to
Standard Precision=2
Price Precision=4
Cost Precision=3
4. General Setup || Application || Conversion Rates:
EUR - CUP Validfrom= 01-01-2006 validto=31-12-2006 Multiply=2
CUP - EUR Validfrom= 01-01-2006 validto=31-12-2006 Multiply=0.5
5. Master Data Management || Pricing || Price List: create price list in CUP setting; Price list version valid from 01-01-2006; Product Price for Hammer product as 1.12345
6. Procurement Management || Transactions || Goods Receipt:
date= 03-05-2006
partner=mcgiver
product=hammer
qty=1
complete
7. Procurement Management || Transactions || Purchase Invoice:
date=03-05-2006
partner=mcgiver
pricelist=cup
create lines from good receipt already created
go to line and ensure that price=1.12345
complete
8. Warehouse Management and run "Generate Average Cost" process.
9. Master Data Management || Product || Product >> Costing : check that price is 0.56 instead of 0.562 (as it should be taken 3 decimals instead of 2)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0024879)
hgbot (developer)
2010-02-26 18:57

Repository: erp/devel/pi
Changeset: f718ec3e327c7548843652384ea64e2b9dcbab61
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Fri Feb 26 18:58:16 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f718ec3e327c7548843652384ea64e2b9dcbab61 [^]

Fixes issue 12487. m_generate_average_costs doesn't round to Cost Precision

---
M src-db/database/model/functions/C_CURRENCY_CONVERT.xml
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
A src-db/database/model/functions/C_CURRENCY_CONVERT_PRECISION.xml
---
(0025356)
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/f718ec3e327c [^]
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 [^]
(0026258)
sureshbabu (reporter)
2010-04-15 13:52

Tested working fine

- Issue History
Date Modified Username Field Change
2010-02-26 14:21 networkb New Issue
2010-02-26 14:21 networkb Assigned To => adrianromero
2010-02-26 16:26 networkb Assigned To adrianromero => dalsasua
2010-02-26 16:26 networkb Priority urgent => immediate
2010-02-26 16:46 dalsasua Assigned To dalsasua => gorkaion
2010-02-26 18:57 hgbot Checkin
2010-02-26 18:57 hgbot Note Added: 0024879
2010-02-26 18:57 hgbot Status new => resolved
2010-02-26 18:57 hgbot Resolution open => fixed
2010-02-26 18:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f718ec3e327c7548843652384ea64e2b9dcbab61 [^]
2010-03-08 16:05 jpabloae Target Version 2.50MP13 => 2.50MP14
2010-03-12 22:40 hudsonbot Checkin
2010-03-12 22:40 hudsonbot Note Added: 0025356
2010-04-15 13:52 sureshbabu Note Added: 0026258
2010-04-15 13:52 sureshbabu Status resolved => closed
2010-04-16 00:00 anonymous sf_bug_id 0 => 2987959


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker