Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0030155Localization Pack: SpainAEAT 303 Cash VAT compatiblepublic2015-06-11 12:272015-06-11 15:21
vmromanos 
vmromanos 
immediatemajoralways
closedfixed 
5
 
 
0030155: Wrong amounts calculated in scenarios where invoice's amount is higher that order's amount
In case an invoice is generated from an order, and the invoice's amount is higher that order's amount, the 303 wrongly calculates the tax %.

The reason is that the negative tax amount in Invoice | Tax | Cash VAT tab is added to the total 303 tax amount (boxes [03] [06] [09]) as positive value. As a consequence, the rate % calculated for boxes [02] [05] [08] would be wrong too.
Create a Sales Order with a Cash VAT tax rate. Total amount 10.000€
Create an invoice from the previous order. Edit the net unit price and set a lower amount. Complete the invoice and post it.
Launch the 303. Verify tax amount is not properly calculated
No tags attached.
related to defect 00274843.0PR14Q4 closed AtulOpenbravo Openbravo ERP Wrong cash vat lines when payment is automatically created and invoice's amount is higher that order's amount 
Issue History
2015-06-11 12:27vmromanosNew Issue
2015-06-11 12:27vmromanosAssigned To => vmromanos
2015-06-11 12:28vmromanosRelationship addedrelated to 0027484
2015-06-11 12:29vmromanosIssue cloned0030156
2015-06-11 12:30vmromanosStatusnew => scheduled
2015-06-11 12:44hgbotCheckin
2015-06-11 12:44hgbotNote Added: 0078207
2015-06-11 12:44hgbotStatusscheduled => resolved
2015-06-11 12:44hgbotResolutionopen => fixed
2015-06-11 12:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat303.es/rev/e96a7a7a97118fe7d19370d18dc3bbdf46c7cde4 [^]
2015-06-11 12:59ngarciaResolution time => 1437516000
2015-06-11 15:21psanjuanNote Added: 0078209
2015-06-11 15:21psanjuanStatusresolved => closed

Notes
(0078207)
hgbot   
2015-06-11 12:44   
Repository: erp/pmods/org.openbravo.module.aeat303.es
Changeset: e96a7a7a97118fe7d19370d18dc3bbdf46c7cde4
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 11 12:37:45 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat303.es/rev/e96a7a7a97118fe7d19370d18dc3bbdf46c7cde4 [^]

Fixed bug 30155: Wrong amounts calculated in scenarios where invoice's amount is higher that order's amount
In this scenario, the ITCV tax amount was added as a positive value to the total tax amount. Now we add it to the total tax amount taking into account its sign.
This should be safe because Cash VAT taxes don't have complex scenarios with several child tax rates with negative rates

---
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/module/aeat303/es/util/AEAT303CalculationsHelper.java
---
(0078209)
psanjuan   
2015-06-11 15:21   
Verified.

Positive line (Payment details line) working ok.
Positive and negative lines working ok.
Negative line working ok.