Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0021137 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 06. Material requirement planning (MRP) | major | always | 2012-07-18 11:03 | 2012-07-26 11:17 | |||
Reporter | dmiguelez | View Status | public | |||||
Assigned To | dmiguelez | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | d1623e828d4d | |||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | pi | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0021137: Net Unit Price Of Costing Tab In Product Window is not correctly calculated. | |||||||
Description | In Product Window, in Costing Tab, there are two fields, Cost and Net Unit Price. Following the steps to Reproduce, both should be 27.50, but Net Unit Price is 28. This is due to a problem when rounding the quantity. | |||||||
Steps To Reproduce | Login as: Username: Openbravo Password: openbravo [Average Cost Per Invoice Price module must be installed] Create the Product Go to Master Data Management || Product: Click New and select: "Organization": USA "Search Key": CostingProduct "Name": CostingProduct Go to Price List: Select "Be Soft Drinker Price List" Go to Price List Version tab and select "Be Soft Drinker Price List" Go to Product Price tab. Click new and select: "Product": CostingProduct "Unit Price": 50.00 "List Price": 50.00 Create the Costing Rule Create the Costing Rule Go to Master Data Management || Product Setup || Costing Rules: Click New and select: "Organization": USA "Costing Algorithm": Average per Invoice Price "Starting Date": Today's date "Warehouse Dimension": Unchecked Click on "Validate Costing Rule" and then OK. Create a Purchase Order. Go to Procurement Management || Transactions || Purchase Order: Click New and select: "Organization": USA “Business Partner”: Costing Business Partner Move to Lines. Click new and select: “Product”: CostingACPIProduct “Order Quantity”: 100 Click the “Book” button. Click OK. Create a Goods Receipt. Go to Procurement Management || Transactions || Goods Receipt: Click New and select: "Organization": USA “Business Partner”: Costing Business Partner Click on Create Lines From: "Order": The Order created in [ACIa040] Select the line that appears and set: "Storage Bin": Costing Warehouse Click the “Complete” button. Click OK. Create a Purchase Invoice. Go to Sales Management || Transactions || Purchase Invoice: Click New and select: "Organization": USA “Business Partner”: Costing Business Partner Click on Create Lines From: "Shipment/Receipt": The Goods Receipt created in [ACIa050] Select the line that appears. Move to Lines and select the line. Modify the "Invoiced Quantity": 50 Click the “Complete” button. Click OK. Create a Purchase Invoice. Go to Sales Management || Transactions || Purchase Invoice: Click New and select: "Organization": USA “Business Partner”: Costing Business Partner Click on Create Lines From: "Shipment/Receipt": The Goods Receipt created in [ACIa050] Select the line that appears. Move to Lines and select the line. Modify the "Net Unit Price": 5.00 Reschedule the Process Go to General Setup || Process Scheduling || Process Request: Select the process Costing Background Process. Click on "Reschedule Process" A popup should appear with the message: "Process completed succesfully" Click the “Complete” button. Click OK. Check Go to Product: Select CostingProduct. Move to Costing Tab and check that Cost is 27.50 and Net Unit Price is 28 | |||||||
Proposed Solution | diff --git a/src/org/openbravo/costing/AverageAlgorithm.java b/src/org/openbravo/costing/AverageAlgorithm.java --- a/src/org/openbravo/costing/AverageAlgorithm.java +++ b/src/org/openbravo/costing/AverageAlgorithm.java @@ -138,7 +138,7 @@ cost.setPrice(newCost); } else { cost.setPrice(trxCost.divide(transaction.getMovementQuantity(), costCurrency - .getCostingPrecision().intValue())); + .getPricePrecision().intValue(), BigDecimal.ROUND_HALF_UP)); } cost.setCostType("AVA"); cost.setManual(false); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0050731) hgbot (developer) 2012-07-18 16:27 |
Repository: erp/devel/pi Changeset: d1623e828d4d8d2947c472a47469ae42bcf7f690 Author: David Miguelez <david.miguelez <at> openbravo.com> Date: Wed Jul 18 16:25:58 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/d1623e828d4d8d2947c472a47469ae42bcf7f690 [^] Fixes issue 0021137: Fixes rounding problems. --- M src/org/openbravo/costing/AverageAlgorithm.java --- |
(0050852) hudsonbot (developer) 2012-07-26 02:42 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5edf203d5780 [^] Maturity status: Test |
(0050894) eduardo_Argal (developer) 2012-07-26 11:17 |
Code reviewed, fixes possible exception when dividing a BigDecimal |
Issue History | |||
Date Modified | Username | Field | Change |
2012-07-18 11:03 | dmiguelez | New Issue | |
2012-07-18 11:03 | dmiguelez | Assigned To | => mirurita |
2012-07-18 11:03 | dmiguelez | Modules | => Core |
2012-07-18 16:25 | dmiguelez | Assigned To | mirurita => dmiguelez |
2012-07-18 16:25 | dmiguelez | Status | new => scheduled |
2012-07-18 16:25 | dmiguelez | fix_in_branch | => pi |
2012-07-18 16:27 | hgbot | Checkin | |
2012-07-18 16:27 | hgbot | Note Added: 0050731 | |
2012-07-18 16:27 | hgbot | Status | scheduled => resolved |
2012-07-18 16:27 | hgbot | Resolution | open => fixed |
2012-07-18 16:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d1623e828d4d8d2947c472a47469ae42bcf7f690 [^] |
2012-07-26 02:42 | hudsonbot | Checkin | |
2012-07-26 02:42 | hudsonbot | Note Added: 0050852 | |
2012-07-26 11:17 | eduardo_Argal | Note Added: 0050894 | |
2012-07-26 11:17 | eduardo_Argal | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |