Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038302Openbravo ERP07. Sales managementpublic2018-04-09 10:512018-05-09 19:29
maite 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3 
dmiguelez
Core
No
0038302: Tax tab info is not correctly recalculated when negative child tax defined as "cascade" is modified
When changing the tax in an already created purchase/sales order line (problem is NOT reproducible in invoices) Tax tab is not correctly recalculated (while Line Tax tab is)
1. Access "Tax rate" window and set rate "Adquisiciones intracomunitarias 10% (-10%)" as "Cascade"
2. Create Purchase/sales Order record. Add line, set any product and Tax= Adquisiciones intracomunitarias 10%
3. Realize that both "Tax line" tab and "Tax" tab has children taxes correctly calculated
4. Access order line and change tax to set any other value (ie Entregas IVA 21% or Adquisiciones IVA 4%)
5. Access "Line tax" tab and realize that correct tax appears
6. However access "Tax" tab and realize that still one rate belonging to previous tax is there, which is wrong
No tags attached.
related to defect 0037989 closed markmm82 Tax tab info is not correctly recalculated when tax defined as "Line Net Amount + Tax Amount" is modified 
Issue History
2018-04-09 10:51maiteNew Issue
2018-04-09 10:51maiteAssigned To => Triage Finance
2018-04-09 10:51maiteModules => Core
2018-04-09 10:51maiteResolution time => 1525039200
2018-04-09 10:51maiteTriggers an Emergency Pack => No
2018-04-09 10:51maiteIssue Monitored: networkb
2018-04-09 10:57jfrancesIssue Monitored: jfrances
2018-04-09 15:40mgonzalezhIssue Monitored: mgonzalezh
2018-04-09 18:21aferrazRelationship addedrelated to 0037989
2018-04-09 19:43aferrazAssigned ToTriage Finance => collazoandy4
2018-04-18 02:36collazoandy4Statusnew => scheduled
2018-04-18 15:47collazoandy4Statusscheduled => feedback
2018-04-19 09:54maiteStatusfeedback => new
2018-04-19 17:27maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17033#r17033
2018-04-27 02:12collazoandy4Statusnew => scheduled
2018-04-30 16:03collazoandy4Note Added: 0104171
2018-05-03 09:41hgbotCheckin
2018-05-03 09:41hgbotNote Added: 0104222
2018-05-03 09:41hgbotStatusscheduled => resolved
2018-05-03 09:41hgbotResolutionopen => fixed
2018-05-03 09:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/07cbc0d9c389d4c79b0e3bf69f7d51f5cb9cfd0d [^]
2018-05-03 09:43dmiguelezReview Assigned To => dmiguelez
2018-05-03 09:43dmiguelezNote Added: 0104223
2018-05-03 09:43dmiguelezStatusresolved => closed
2018-05-03 09:43dmiguelezFixed in Version => 3.0PR18Q3
2018-05-09 19:29hudsonbotCheckin
2018-05-09 19:29hudsonbotNote Added: 0104425

Notes
(0104171)
collazoandy4   
2018-04-30 16:03   
Test Plan
  Go to Tax Rate window and edit Adquisiciones intracomunitarias 10% (-10%) record set Cascade = Y
  Go to Purchase Order and create a new record for Bebidas Alegres, S.L. BP
    Create a new record in Line tab:
      Product: Cerveza Ale 0,5L
      Tax: Adquisiciones intracomunitarias 10%
      Check two new record in Line Tax tab and Tax tab:
        1. Tax: Adquisiciones intracomunitarias 10% (+10%) - IVA Reducido, Taxable Amount: 1.36, Tax Amount: 0.14
        2. Tax: Adquisiciones intracomunitarias 10% (-10%) - IVA Reducido, Taxable Amount: 1.50, Tax Amount: -0.15
      Edit the Tax in the previous line created set Adquisiciones IVA 21% and check only one line in Line Tax and Tax tabs:
        1. Tax: Adquisiciones IVA 21% - IVA Normal, Taxable Amount: 1.36, Tax Amount: 0.29
(0104222)
hgbot   
2018-05-03 09:41   
Repository: erp/devel/pi
Changeset: 07cbc0d9c389d4c79b0e3bf69f7d51f5cb9cfd0d
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Apr 27 19:14:34 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/07cbc0d9c389d4c79b0e3bf69f7d51f5cb9cfd0d [^]

Fixes issue 38302:Tax tab info is not correctly recalculated when negative child
tax defined as "cascade" is modified

When an orderlinetax is removed and the line order it's not take into account
the triggers calculations can be incorrect.

Now the orderlinetax are removed in the proper order (lineno asc) to avoid
wrong calculations in the triggers.

---
M src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
---
(0104223)
dmiguelez   
2018-05-03 09:43   
Code Review + Testing Ok
(0104425)
hudsonbot   
2018-05-09 19:29   
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/2be7d3efe606 [^]
Maturity status: Test