Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035471Openbravo ERP09. Financial managementpublic2017-03-09 17:162017-03-20 15:12
aferraz 
aferraz 
normalminorhave not tried
closedfixed 
30Professional Appliance
 
3.0PR17Q23.0PR17Q2 
vmromanos
Core
Pre packaging ( pi )
2017-03-03
pi
https://code.openbravo.com/erp/devel/pi/rev/86dcf5d294d9 [^]
No
0035471: Order line amounts and taxes added by Add Pack not rounded when booking
OrderLine net amount, OrderLineTax tax base and tax amount and OrderTax tax base and tax amount not rounded for lines added by Add Pack when completing the document
Install org.openbravo.retail.discounts module.
As White Valley Group Admin:

- Create a new Sales Order for Arturo Montoro.
- Click on Add Pack and press Ok.
- Book the order.
- Check in database C_OrderLine.LineNetAmt, C_OrderLineTax.TaxBaseAmt, C_OrderLineTax.TaxAmt, C_OrderTax.TaxBaseAmt and C_OrderTax.TaxAmt are not rounded to currency standard precision.
No tags attached.
caused by design defect 0032265 closed aferraz [SER QA 1434] Taxes at document level are not properly calculated in some cases 
Issue History
2017-03-09 17:16aferrazNew Issue
2017-03-09 17:16aferrazAssigned To => aferraz
2017-03-09 17:16aferrazModules => Core
2017-03-09 17:16aferrazTriggers an Emergency Pack => No
2017-03-09 17:17aferrazRelationship addedcaused by 0032265
2017-03-09 17:34aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14761#r14761
2017-03-09 17:35aferrazRegression level => Pre packaging ( pi )
2017-03-09 17:35aferrazRegression date => 2017-03-03
2017-03-09 17:35aferrazRegression introduced in release => pi
2017-03-09 17:35aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/86dcf5d294d9 [^]
2017-03-10 10:26hgbotCheckin
2017-03-10 10:26hgbotNote Added: 0094901
2017-03-10 10:26hgbotStatusnew => resolved
2017-03-10 10:26hgbotResolutionopen => fixed
2017-03-10 10:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/af56683ab963a4ab97696134f4adc6bd6f274e76 [^]
2017-03-10 10:26hgbotCheckin
2017-03-10 10:26hgbotNote Added: 0094902
2017-03-10 11:27hgbotCheckin
2017-03-10 11:27hgbotNote Added: 0094905
2017-03-10 16:05hgbotCheckin
2017-03-10 16:05hgbotNote Added: 0094926
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095285
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095286
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095287
2017-03-15 20:22hudsonbotCheckin
2017-03-15 20:22hudsonbotNote Added: 0095290
2017-03-20 15:12vmromanosReview Assigned To => vmromanos
2017-03-20 15:12vmromanosNote Added: 0095429
2017-03-20 15:12vmromanosStatusresolved => closed
2017-03-20 15:12vmromanosFixed in Version => 3.0PR17Q2
2018-02-06 11:33dmiguelezRelationship addedcauses 0037789
2018-02-06 11:59dmiguelezRelationship deletedcauses 0037789

Notes
(0094901)
hgbot   
2017-03-10 10:26   
Repository: erp/devel/pi
Changeset: af56683ab963a4ab97696134f4adc6bd6f274e76
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 10 10:23:51 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/af56683ab963a4ab97696134f4adc6bd6f274e76 [^]

Fixes issue 35471: Order Line amounts and taxes not rounded after booking

M_PROMOTION_CALCULATE was run after rounding and adjusting the order, and it was updating the order lines, so triggers were run again calculating line net amount and taxes without rounding.
Now, round, adjust and recalculate will be done at the end of c_order_post and c_invoice_post, just before finish process extension point.
Also, line net amount will always be rounded to standard precision to avoid problems. In case we need to calculate taxes without rounding (price including taxes and taxes at document level), we will calculate again the line net amount in line after trigger to use it for calculating taxes at line level and document level without rounding.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/C_ORDER_POST1.xml
M src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml
M src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M src-db/database/model/triggers/C_ORDERLINE_TRG.xml
M src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
A src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
A src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml
---
(0094902)
hgbot   
2017-03-10 10:26   
Repository: erp/devel/pi
Changeset: 165521c4ee6ebe50d5c7d3e34986766327883833
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Mar 09 17:47:15 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/165521c4ee6ebe50d5c7d3e34986766327883833 [^]

Related to issue 35471: Do not round line net amount in TaxesTest

---
M src-test/src/org/openbravo/test/taxes/TaxesTest.java
---
(0094905)
hgbot   
2017-03-10 11:27   
Repository: erp/devel/pi
Changeset: c89bd10e88cc541ed38a393cbba3b5c859e6241a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 10 10:47:38 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c89bd10e88cc541ed38a393cbba3b5c859e6241a [^]

Related to issue 35471: Fix variables definition

---
M src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
M src-db/database/model/functions/C_ORDERLINETAX_INSERT.xml
M src-db/database/model/triggers/C_INVOICELINETAX_TRG.xml
M src-db/database/model/triggers/C_ORDERLINETAX_TRG.xml
---
(0094926)
hgbot   
2017-03-10 16:05   
Repository: erp/devel/pi
Changeset: ee2bac8741535b8b83c0d65a028bd68529db8f62
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 10 15:57:33 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ee2bac8741535b8b83c0d65a028bd68529db8f62 [^]

Related to bug 35471: Add last TaxAmt when calculating cascade/dependant taxes

---
M src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
M src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml
M src-db/database/model/triggers/C_INVOICELINETAX_TRG.xml
M src-db/database/model/triggers/C_ORDERLINETAX_TRG.xml
---
(0095285)
hudsonbot   
2017-03-15 20:21   
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/54e102bef53e [^]
Maturity status: Test
(0095286)
hudsonbot   
2017-03-15 20:21   
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/54e102bef53e [^]
Maturity status: Test
(0095287)
hudsonbot   
2017-03-15 20:21   
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/54e102bef53e [^]
Maturity status: Test
(0095290)
hudsonbot   
2017-03-15 20:22   
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/54e102bef53e [^]
Maturity status: Test
(0095429)
vmromanos   
2017-03-20 15:12   
Code review OK