Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012788Openbravo ERP07. Sales managementpublic2010-03-24 11:152010-05-18 12:12
arunkumar 
alostale 
urgentmajorhave not tried
closedfixed 
5
2.50MP9 
2.50MP17 
Core
No
0012788: Precision error in simple sales order
Precision error in simple sales order.Configure the Format.xml to 4 decimal places and configure the Price precision as 4 in general setup -> Application -> currency.If the product price has four decimal places for example 5.6748 then while selecting the product in simple sales order and changing the quantity to 2 then the price is rounded off to 5.6750.
Prerequisite:

Format.xml -> priceRelation and priceEdition are set as 0.0000

General Setup -> Application -> currency. For Euro Standard precision=2,
Price precision=4, Costing precision=2

Create a business partner CUSTOMER A.

Pricelist -> Create a pricelist CUSTOMER A - product : A Final Goods

List price = Standard Price = Price Limit = 6.7849 for the product.

Steps to reproduce the issue:

** Go to Sales Management || Transactions || Simple Sales Order || Header
** Create a new record and select the business partner CUSTOMER A which has
the Price List "CUSTOMER A"
** Go to lines and select the product A Final Goods. If the ordered quantity
is 1 then the net unit price is set as 6.7849. But if I change the
quantity to 2 then the net unit price changes to 6.7850.

Since the Format.xml and Price precision are configured to hold 4 decimal places rounding off should not be done here.
Regression
duplicate of defect 00128322.50MP17 closed alostale Precision error in sales invoice 
has duplicate defect 0012844 closed alostale Price precision error in purchase invoice 
Issue History
2010-03-24 11:15arunkumarNew Issue
2010-03-24 11:15arunkumarAssigned To => adrianromero
2010-03-24 11:15arunkumarStatusnew => scheduled
2010-03-24 11:15arunkumarfix_in_branch => pi
2010-03-24 13:07arunkumarNote Added: 0025700
2010-03-24 13:07arunkumarfix_in_branchpi =>
2010-03-24 13:07arunkumarSummaryPrecision error in simple sales order => Precision error in simple sales order & sales invoice
2010-03-25 09:57hgbotCheckin
2010-03-25 09:57hgbotNote Added: 0025720
2010-03-25 09:57hgbotStatusscheduled => resolved
2010-03-25 09:57hgbotResolutionopen => fixed
2010-03-25 09:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/91ef4d9b399418face9ad7ac66c275c5e9e26692 [^]
2010-03-25 09:59adrianromeroNote Added: 0025721
2010-03-29 11:24arunkumarNote Added: 0025768
2010-03-29 11:24arunkumarStatusresolved => new
2010-03-29 11:24arunkumarResolutionfixed => open
2010-03-29 11:24arunkumarStatusnew => scheduled
2010-03-29 11:24arunkumarfix_in_branch => pi
2010-03-29 11:40arunkumarStatusscheduled => closed
2010-03-29 11:40arunkumarResolutionopen => fixed
2010-03-29 13:19adrianromeroRelationship addedrelated to 0012832
2010-03-29 18:57sureshbabuRelationship addedblocks 0012844
2010-03-30 00:00anonymoussf_bug_id0 => 2978875
2010-03-30 10:52hgbotCheckin
2010-03-30 10:52hgbotNote Added: 0025799
2010-03-30 10:59adrianromeroAssigned Toadrianromero => alostale
2010-03-30 10:59adrianromeroPriorityimmediate => urgent
2010-03-30 10:59adrianromeroStatusclosed => new
2010-03-30 10:59adrianromeroTarget Version => 2.50MP15
2010-03-30 10:59adrianromerofix_in_branchpi =>
2010-03-30 11:11adrianromeroRelationship replacedhas duplicate 0012832
2010-03-30 11:13adrianromeroRelationship replacedhas duplicate 0012844
2010-03-31 11:40psarobeStatusnew => scheduled
2010-03-31 11:40psarobefix_in_branch => pi
2010-04-06 12:41psarobefix_in_branchpi =>
2010-04-06 12:41psarobeSummaryPrecision error in simple sales order & sales invoice => Precision error in simple sales order
2010-04-06 15:29psarobeversionmain => 2.50MP1
2010-04-06 15:30psarobeTag Attached: Regression
2010-04-06 17:26alostaleRelationship replacedduplicate of 0012832
2010-04-06 17:26alostaleStatusscheduled => closed
2010-04-06 17:26alostaleResolutionfixed => duplicate
2010-04-07 12:30psarobeStatusclosed => new
2010-04-07 12:30psarobeResolutionduplicate => open
2010-04-07 12:31psarobeStatusnew => scheduled
2010-04-07 12:31psarobefix_in_branch => pi
2010-04-07 12:31psarobeStatusscheduled => resolved
2010-04-07 12:31psarobeResolutionopen => fixed
2010-04-07 12:31psarobeversion2.50MP1 => 2.50MP9
2010-04-07 12:31psarobefix_in_branchpi =>
2010-04-15 10:30iperdomoNote Added: 0026231
2010-04-15 10:30iperdomoStatusresolved => closed
2010-04-19 21:11hudsonbotCheckin
2010-04-19 21:11hudsonbotNote Added: 0026387
2010-04-19 21:11hudsonbotCheckin
2010-04-19 21:11hudsonbotNote Added: 0026398
2010-05-18 12:12gorka_gilTarget Version2.50MP15 => 2.50MP17

Notes
(0025700)
arunkumar   
2010-03-24 13:07   
The same type of issue happens in sales invoice also
(0025720)
hgbot   
2010-03-25 09:57   
Repository: erp/devel/pi
Changeset: 91ef4d9b399418face9ad7ac66c275c5e9e26692
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Mar 25 10:05:44 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/91ef4d9b399418face9ad7ac66c275c5e9e26692 [^]

Fixes issue 0012788: Precision error in simple sales order & sales invoice

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
---
(0025721)
adrianromero   
2010-03-25 09:59   
To test the issue, just follow the reproduction steps and notice that when you assign select the product and when you change the quantity, the price remains 6.7849 and does not change to 6.7850
(0025768)
arunkumar   
2010-03-29 11:24   
I have tested the fix in simple sales order. The net unit price is not rounded off to three decimal places.It was working fine.

But still while testing the sales invoice I can see when the invoiced quantity changes, the net unit price is changed from 6.7849 to 6.7850
(0025799)
hgbot   
2010-03-30 10:52   
Repository: erp/devel/pi
Changeset: ac0d4f5ea8309dac1bcea2d3ddc769522f1c6367
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Mar 30 11:01:49 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ac0d4f5ea8309dac1bcea2d3ddc769522f1c6367 [^]

Reverting changes in issue 0012788: Precision error in simple sales order sales invoice

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
---
(0026231)
iperdomo   
2010-04-15 10:30   
Tested on PI @ rev 7076c219cdd9

Unquoted amounts when returning values in callout response.
(0026387)
hudsonbot   
2010-04-19 21:11   
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/91ef4d9b3994 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]
(0026398)
hudsonbot   
2010-04-19 21:11   
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/ac0d4f5ea830 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]