Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032463Openbravo ERP09. Financial managementpublic2016-03-11 13:132016-06-17 19:36
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0032463: "Total payment" field not correctly calculated in ReportRegisterByVatJR.jrxml report
"Total payment" field is current adding sales and purchase tax when it should subtract purchase tax from sales tax amount
0. Configure Tax Payment functionality following this guide: http://wiki.openbravo.com/wiki/Tax_Payment [^]
1. Create Tax Payment record for valid date range and BP ans set "generate payment" option
2. Run "Create VAT register" process and "Process" tax payment
3. Press "Print" icon from tax payment record, select "Report Tax Payment by VAT" in the report type combo and print it
4. Realize that "Total Payment" amount is not correct
No tags attached.
Issue History
2016-03-11 13:13maiteNew Issue
2016-03-11 13:13maiteAssigned To => Triage Finance
2016-03-11 13:13maiteModules => Core
2016-03-11 13:13maiteResolution time => 1460844000
2016-03-11 13:13maiteTriggers an Emergency Pack => No
2016-03-11 13:13maiteTarget Version => 3.0PR16Q2
2016-03-11 13:14maiteIssue Monitored: networkb
2016-03-30 08:59AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2016-03-30 08:59AtulOpenbravoStatusnew => scheduled
2016-03-30 12:27AtulOpenbravoNote Added: 0085330
2016-03-30 15:13psanjuanNote Added: 0085339
2016-03-31 13:21psanjuanNote Edited: 0085330bug_revision_view_page.php?bugnote_id=0085330#r11596
2016-03-31 13:39psanjuanNote Added: 0085360
2016-03-31 13:43psanjuanNote Edited: 0085360bug_revision_view_page.php?bugnote_id=0085360#r11598
2016-03-31 13:44psanjuanNote Added: 0085361
2016-04-04 10:14aferrazTarget Version3.0PR16Q2 =>
2016-04-04 19:26hgbotCheckin
2016-04-04 19:26hgbotNote Added: 0085423
2016-04-04 19:28hgbotStatusscheduled => resolved
2016-04-04 19:28hgbotResolutionopen => fixed
2016-04-04 19:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0d3069b6fb40b4b98adc9d3fff7f7edaa60294d4 [^]
2016-04-04 19:35aferrazReview Assigned To => aferraz
2016-04-04 19:35aferrazNote Added: 0085424
2016-04-04 19:35aferrazStatusresolved => closed
2016-04-04 19:35aferrazFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087417

Notes
(0085330)
AtulOpenbravo   
2016-03-30 12:27   
(edited on: 2016-03-31 13:21)
- Configure Tax Payment functionality following this guide: http://wiki.openbravo.com/wiki/Tax_Payment [^] [^]
- Login as F&B Admin.
- Go to GL Item and create a record with name "IVA GL Item".
- Go to Tax Register Type.
- Create a record with name as "IVA Sales", sales transaction = yes, GL Item as "IVA GL Item".
- Create a Line under it with "Entregas IVA 21% - IVA Normal" Tax and Document Type as "AR Invoice".
- In Tax Register Type.
- Create a record with name as "IVA Purchase", sales transaction = no, GL Item as "IVA GL Item".
- Create a Line under it with "Adquisiciones IVA 21% - IVA Normal" Tax and Document Type as "AP Invoice".
- Create Tax Payment record for valid date range and BP ans set "generate payment" option.
- Run "Create VAT register" process and "Process" tax payment.
- Press "Print" icon from tax payment record, select "Report Tax Payment by VAT" in the report type combo and print it.
- Check that "Total Payment" amount is correct as in the Payment linked in the Tax Payment record.

(0085339)
psanjuan   
2016-03-30 15:13   
Issue verified.
(0085360)
psanjuan   
2016-03-31 13:39   
(edited on: 2016-03-31 13:43)
Test Plan

Scenario 1 - Purchase VAT > Sales VAT

Configure Tax Payment functionality following this guide:
http://wiki.openbravo.com/wiki/Tax_Payment [^]

Login as F&B Admin. Use F&B España Org.

Go to GL Item and create a record with name "IVA GL Item".
Accounting tab:

F&B España Euro Gl item Debit account = 47000 HP deudora por IVA
F&B España Euro Gl item Credit account = 475000 HP acreedora por IVA

Go to Tax Register Type.
- Create a record for "IVA Sales", sales transaction = yes, GL Item as "IVA GL Item".
- Create a Line under it with "Entregas IVA 21% - IVA Normal" Tax and Document Type as "AR Invoice".
- Create another record for "IVA Purchase", sales transaction = no, GL Item as "IVA GL Item".
- Create a Line under it with "Adquisiciones IVA 21% - IVA Normal" Tax and Document Type as "AP Invoice".

Create Tax Payment record for valid date range (01-01-2016 - 31-03-2016) and BP (Tax Authority) and set "generate payment" option.

Run "Create VAT register" process and "Process" tax payment.

Check that Purchase VAT shown is for instance = 93.75 and Sales VAT shown is for instance = 2.14, therefore Sales VAT - Purchase VAT = -91.31


Press "Print" icon from tax payment record, select "Report Tax Payment by VAT" in the report type combo and print it either in HTML format or in PDF format.

Check that "Total Payment" amount is = -91.31 that means a negative VAT Settlement that implies a payment in from Tax Authorities.

Check that the payment created is a payment in for an amount = 91.31

Scenario 1 - Purchase VAT < Sales VAT

Dated on April 2014 enter a sales invoice and a purchase invoice by using the sales/purchase tax rates set up in both sales tax register and purchase tax register. Make sure that the amount of the sales invoice is > than the amount of the purchase invoice.

complete and post the invoices.

Go to Tax Payment window and create a new one for the period 01-04-2016 to 30-04-2016. Create VAT Register. Check below data:

Sales VAT = 3213.00

Purchase VAT = 74.55

Process it.

check that a payment out has been created for an amount = 3138.45 which is correct. That needs to be paid to the Tax Authorities.

Go back to tax payment window and press print option. Select Report Tax Payment By VAT in either HTML or PDF format.

Check that the total amount shown there is = 3138.45 which is OK.

(0085361)
psanjuan   
2016-03-31 13:44   
Test plan above verified.

Issue can be code reviewed and closed.
(0085423)
hgbot   
2016-04-04 19:26   
Repository: erp/devel/pi
Changeset: 0d3069b6fb40b4b98adc9d3fff7f7edaa60294d4
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Mar 30 15:32:26 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0d3069b6fb40b4b98adc9d3fff7f7edaa60294d4 [^]

Fixes Issue 32463: "Total payment" not correct in ReportRegisterByVatJR report

IsSale value in the data file was compared with different name as in jrxml query to negate tax line values in case of sales or purchase transaction in variable calculation. Now they are kept uniform in both jrxml as well as data xsql file.

---
M src/org/openbravo/erpReports/ReportRegisterByVatJR.jrxml
---
(0085424)
aferraz   
2016-04-04 19:35   
Code review OK
(0087417)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test