Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0017016Openbravo ERP07. Sales managementpublic2011-04-19 10:282011-05-25 16:39
AinhoaPagola 
jonalegriaesarte 
urgentmajorhave not tried
closedunable to reproduce 
5
3.0RC7 
 
OBPS
Core
No
0017016: Invoice Total Amount not properly updated when lines are deleted
The invoice total amount is not properly updated when a line is deleted.
In an invoice with more than one line with the same tax amount, when a line is deleted the Total Amount of the header is not properly updated.
With sampledata in Openbravo 2.50:
- Create a new header.
- Create a new line for a product. Set unit price to 100 and taxes 16%.
The header has total amount 116 (correct) and a line is created in the tax tab.
- Create a second line for a product. Set unit price to 100 and taxes to 16.
The header has total amount 232 (correct) and the line in the tax tab is updated to 32
- Delete a line.
The tax tab is properly updated. The header has a total amount of 132, instead of 116. That is, the line net amount is decreased from the total amount, but the taxes are not.
Error is possibly on line 243 in c_orderline_trg2.
No tags attached.
related to defect 00171172.50MP30 closed adrianromero When leaving an invoice without lines tax amount still appears in invoice header 
blocks backport 00168452.50MP31 closed jonalegriaesarte Invoice Total Amount not properly updated when lines are deleted 
Issue History
2011-05-05 08:43AinhoaPagolaTypedefect => backport
2011-05-05 08:43AinhoaPagolafix_in_branch => 2.50
2011-05-12 10:05maiteRelationship addedrelated to 0017117
2011-05-13 11:02AinhoaPagolaAssigned ToAinhoaPagola => jonalegriaesarte
2011-05-25 11:43adrianromeroTypebackport => defect
2011-05-25 11:43adrianromeroversion2.50MP28 => 3.0RC7
2011-05-25 11:43adrianromeroTarget Version2.50MP30 =>
2011-05-25 16:39adrianromeroNote Added: 0037435
2011-05-25 16:39adrianromeroStatusscheduled => closed
2011-05-25 16:39adrianromeroResolutionopen => unable to reproduce

Notes
(0037435)
adrianromero   
2011-05-25 16:39   
This issue cannot be reproduced in an 3.0 environment. The reason is probably because in 3.0 hibernate is in charge of deleting the line taxes when deleting lines in invoices and orders and not the on delete cascade option of the foreign key constraig of line taxes.