Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032549
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2016-03-29 15:162016-06-17 19:36
ReporterngarciaView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revision714ea45ce839
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2015-11-20
Regression introduced in release3.0PR16Q1
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/77f1cb4dd278c84913938db669a62c4c52796486 [^]
Triggers an Emergency PackNo
Summary

0032549: Cash VAT field of document header is updated to 'N' when you insert a tax rate of 0

DescriptionCash VAT field of document header is updated to 'N' when you insert a tax rate of 0
Steps To ReproduceAs group admin role:
   Create a Tax Rate and set it as Cash VAT
   Create an exempt tax rate (Rate = 0)
   Create a Sales Order header and check the Cash VAT field is 'N'
   Add a line and select the Cash Vat Tax Rate
   Check the Cash VAT field of the header is modified to 'Y'. This is correct
   Add a new line and select the Exempt tax rate
   Check the Cash VAT field of the header is modified to 'N'. This is not correct
   Try to book the sales order and check the following error message is raised:
     "Any of the tax rates in the document doesn't match the Cash VAT configured at the header"
Proposed SolutionThe update should not be done for withholding tax rates or tax rates with 0 rate with summary level = 'N'
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00325943.0PR16Q2 closedAtulOpenbravo Cash VAT field of document header is updated to 'N' when you insert a tax rate of 0 
depends on backport 00325953.0PR16Q1.1 closedAtulOpenbravo Cash VAT field of document header is updated to 'N' when you insert a tax rate of 0 
caused by defect 0031184 closedvmromanos Cannot process a POS Order if it has a summary level tax rate with rate = 0 set as Cash VAT 

-  Notes
(0085332)
psanjuan (manager)
2016-03-30 12:50

Issue verified.
(0085383)
AtulOpenbravo (developer)
2016-04-01 12:28

Test Plan A

- Login as group admin role:
- Create a Tax Rate and set it as Cash VAT.
- Create an exempt tax rate (Rate = 0).
- Create a Sales Order header and check the Cash VAT field is 'N'
- Add a line and select the Cash Vat Tax Rate
- Check the Cash VAT field of the header is modified to 'Y'.
- Add a new line and select the Exempt tax rate.
- Check the Cash VAT field of the header is not modified.
- Try to book the sales order and check that order is processed successfully.

Test Plan B

- Login as group admin role.
- Create a Tax Rate and set it as Cash VAT.
- Create an exempt tax rate (Rate = 0). Non cash vat.
- Create a Sales Order header and check the Cash VAT field is 'N'
- Add a line and select the Cash Vat Tax Rate
- Check the Cash VAT field of the header is modified to 'Y'.
- Add a new line and select the Exempt tax rate.
- Check the Cash VAT field of the header is not modified.
- Add a new line and select the non zero, non cash vat tax rate
- Check the Cash VAT field of the header is modified to 'N'.
- Try to book the sales order and check the following error message is raised:
     "Any of the tax rates in the document doesn't match the Cash VAT configured at the header"
(0085384)
AtulOpenbravo (developer)
2016-04-01 13:09

Test Plan C

- Login as group admin role:
- Create a Tax Rate (Rate = 10) and set it as Cash VAT.
- Create a Withholding tax (Rate = 10).
- Create a Sales Order header and check the Cash VAT field is 'N'
- Add a line and select the Cash Vat Tax Rate
- Check the Cash VAT field of the header is modified to 'Y'.
- Add a new line and select the Withholding tax rate.
- Check the Cash VAT field of the header is not modified.
- Try to book the sales order and check that order is processed successfully.
(0085385)
AtulOpenbravo (developer)
2016-04-01 14:09

Above Test Plan A, B and C verified for Sales Invoice document.
(0085401)
psanjuan (manager)
2016-04-04 09:55
edited on: 2016-04-11 14:12

Above test plan (A, B and C) verify.

Besides below

Test Plan

Setup:

Install Cash VAT management module.
Install Cash VAT Spanish taxes module and apply it to F&B España org.

Go to organization window, select F&B España and check it is not configured as Cash VAT.

Scenario 1 - Fist tax rate a Cash VAT rate in a non Cash VAT invoice; together with 0 VAT rates and withholding and after that a non Cash VAT rate.

Go to Sales Invoice window and create a new one for F&B España, Alimentos y Supermercados business partner.
Save it.
Verify Cash VAT check in the header is set as "No".
Go to lines. Select any product, ie: Cerveza Ale 0.5L
Check that "Entregas IVA 21%" tax rate is seleted which is OK.
Change tax rate to "Entregas IVA 21% IVA de Caja".
Check that Cash VAT check in the header has changed to "Yes".

Create another line and select a new product, for instance "Vino Tinto 0.75L" check that "Entregas IVA 21% IVA de Caja" is selected, this is OK.
Change this tax to "Entregas no sujetas con dcho a deducción", that is a 0 tax rate.
Check that Cash VAT check in the header remains as "Yes" which is correct.

Create another line and select a new product, for instace "cola 0.5L". check that "Entregas IVA 21% IVA de Caja" is selected, this is OK.
Change this tax to "Servicios prestados nacional 21& -15%R IVA de cja", that is summary tax rate including a withholding tax rate.
Check that Cash VAT check in the header remains as "Yes" which is correct.

Complete the invoice.
Check it can be completed without any problem.

Post the invoice.
Check it is posted correctly as just withholding tax amount is post in final tax ledger account.

Reactivate the invoice.

Add a new line by selecting another product, ie. "Limonada 0,5L". Check that "Entregas IVA 21% IVA de Caja" is selected, this is correct.
Change that tax rate to "Entregas IVA 21%" which is not a Cash VAT tax rate.
Save.
Check that Cash VAT check is now set to "No". This is correct.
Try to complete the invoice.
Check that below error is shown:

"Any of the tax rates in the document does not match the Cash VAT configured at the header."

This is correct as an invoice can not mix cash vat rates and non cash vat rates, except 0 tax rates and withholding.

Change last tax rate "Entregas IVA 21%" to "Entregas Bienes Inversión 21% IVA de Caja".
Check that Cash VAT check in the header is set to "Yes" which is correct.
Verify that the invoice can be completed successfully.


Scenario 2 - Fist tax rate a 0 VAT rate in a non Cash VAT invoice, together with Cash VAT rates and withholding and after that a non Cash VAT rate.

Go to Sales Invoice window and create a new one for F&B España, Alimentos y Supermercados business partner.
Save it.
Verify Cash VAT check in the header is set as "No".
Go to lines. Select any product, ie: Cerveza Ale 0.5L
Check that "Entregas IVA 21%" tax rate is seleted which is OK.
Change tax rate to "Entregas no sujetas con decho deducción".
Check that Cash VAT check in the header remains as "NO", this is correct.

Create another line and select a new product, for instance "Vino Tinto 0.75L" check that "Entregas IVA 21%" is selected, this is OK.
Change this tax to "Entregas IVA 10% IVA de Caja", that is a cash tax rate.
Check that Cash VAT check in the header changes to "Yes" which is correct.

Check that the invoice can be completed successfully.

Scenario 3 - Fist tax rate a 0 VAT rate in a Cash VAT invoice, together with Cash VAT rates and withholding and after that a non Cash VAT rate.

Go to Sales Invoice window and create a new one for F&B España, Alimentos y Supermercados business partner.
Save it.
Check Cash VAT check in the header to "Yes".
Go to lines. Select any product, ie: Cerveza Ale 0.5L
Check that "Entregas IVA 21% IVA de caja" tax rate is seleted which is OK.
Change tax rate to "Entregas no sujetas con decho deducción".
Check that Cash VAT check in the header remains as "Yes", this is correct.

Create another line and select a new product, for instance "Vino Tinto 0.75L" check that "Entregas IVA 21% IVA de Caja" is selected, this is OK.
Change this tax to "Servicios prestados nacional 21% -19%R IVA de Caja", that is a cash tax rate, including a withholding tax rate.
Check that Cash VAT check in the header remains as "Yes" which is correct.

Check that the invoice can be completed successfully.

Scenario 4 - Different BP country than Organization country.

Configure F&B España as Cash VAT org.
Create a vendor and a customer located abroad, for instance France.

Go to Sales Invoice window and create a new one, check that "Cash VAT" check in the header is set as "yes", that is OK.

Select the customer located in France. Save.

Check that Cash VAT check in the header changes to NO. That is OK.

Repeat same test as above for:

- Sales order (POS Order)
- Purchase order
- Purchase Invoice

Repeat same test for tax rates set as summary (rate = 0) that at least one children tax rate is set as "Cash VAT" = Yes. Check that Cash VAT check in the header changes and remains as Yes, after selecting this tax rate in the line.

Repeat same test for BOM taxes as described below:

Scenario 5:

Create a tax category named "BOM Tax Category", set up as "As per BOM".
Create a tax rate related to that tax category, named "BOM Tax Rate" with below setup:
- Summary = yes
- rate = 0
- Cash VAT = Yes
Do not include any children tax rate as there is no need for it.

Create a BOM product related to BOM Tax Category. This BOM product has two products one of them relate to a "IVA Normal" tax category (Product A, BOM Quantity = 1, BOM Price = 100.00) and the other one related to an "Exempt" tax category (Product B, BOM Quantity = 1, BOM Price = 100.00).
Relate BOM Product to a sales price with a unit/list Price = 200.00

Set F&B España as Cash VAT org.

Create a Sales Invoice and verify that "Cash VAT" check is Yes.
Go to lines and select BOM product, 1 unit, line net amount = 200.00.
Save.
Check that "Cash VAT" check remains as Yes. This is correct.
Check there are two lines in tax tab, one of them related to a cash VAT tax rate (Product A, taxable amount = 100.00, Tax amount = 21.00), and the other one related to an exempt VAT rate (Product B, taxable amount = 100.00, Tax Amount = 0.00).
 
Complete the invoice and verify it can be completed without any problem.

Scenario 6

Go to F&B España and set it as Cash VAT org.
Verify that summary "BOM Tax Rate" related to "BOM Tax Category" has a rate = 0
Save and check it as summary.

Go to sales invoice and create a new one. Verify that "Cash VAT" check is = Yes.
Go to lines and select the "BOM product", 1 unit. Check that BOM tax rate is selected, which is OK.
Save.

Go to "Tax" tab and verify that there are two lines, one of them related to a cash VAT tax rate (Product A, taxable amount = 100.00, Tax amount = 21.00), and the other one related to an exempt VAT rate (Product B, taxable amount = 100.00, Tax Amount = 0.00).
 
Complete and save.

Scenario 7

Repeat scenario 6 above but changing summary BOM Tax rate to 1.
Enter additional lines in the sales invoice, by selecting an exempt tax rate and a withholding tax rate, together with BOM Tax rate. Complete and post the invoice.
Same results are obtained.The invoice can be completed without any problem.

Repeat scenarios above for sales order, purchase order and purchase invoice.

In the case of scenario 6 and 7 above, make sure that:
1) vendor selected is mark as Cash VAT, if organization is not set as Cash VAT org
2) vendor selected is not marked as Cash VAT, if organization is set as Cash VAT org (Double cash criteria) check.

Verify all scenarios in end-customer environment.

(0085402)
vmromanos (manager)
2016-04-04 09:57

Set as minor, since the flag can be manually changed before booking the document as an easy workaround
(0085487)
psanjuan (manager)
2016-04-07 12:59

Change to major as this is not a minor bug, that caused confusion.
(0085572)
psanjuan (manager)
2016-04-11 15:37

Test plan above verified.

Running test plan above (together with specific customer scenarios) in customer environment.
(0085664)
psanjuan (manager)
2016-04-15 12:36
edited on: 2016-04-15 12:42

Test in customer environment OK (also tested automatic process such as: Create Lines From (Invoice - create lines from - Order) & Generar Factura; by using products having summary tax rate and "As per BOM" tax category, together with exempt rates (set as Traslado IVA = No).

Also tested quotation and POS Order, invoices automatically created OK (set as Traslado de IVA = Yes).

(0085672)
hgbot (developer)
2016-04-15 14:50

Repository: erp/devel/pi
Changeset: 714ea45ce839a94bc28270fb15b0bfff1b1b0f00
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Apr 08 14:51:17 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/714ea45ce839a94bc28270fb15b0bfff1b1b0f00 [^]

Fixes Issue 32549:Cash VAT field of document header is updated to 'N'
when you insert a tax rate of 0

Added condition prior to update the order cash flag vat, to check
whether tax is non withholding tax and non zero tax.

Code is now shifted to C_OrderTax and C_InvoiceTax Triggers instead
of C_OrderLine and C_InvoiceLine Triggers.

---
M src-db/database/model/triggers/C_INVOICELINE_TRG.xml
M src-db/database/model/triggers/C_INVOICETAX_TRG.xml
M src-db/database/model/triggers/C_ORDERLINE_TRG.xml
M src-db/database/model/triggers/C_ORDERTAX_TRG.xml
---
(0085676)
aferraz (manager)
2016-04-15 15:01

Code review OK
(0087452)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2016-03-29 15:16 ngarcia New Issue
2016-03-29 15:16 ngarcia Assigned To => Triage Finance
2016-03-29 15:16 ngarcia Modules => Core
2016-03-29 15:16 ngarcia Resolution time => 1461880800
2016-03-29 15:16 ngarcia Triggers an Emergency Pack => No
2016-03-29 15:16 ngarcia Issue Monitored: networkb
2016-03-29 15:16 ngarcia Relationship added caused by 0031184
2016-03-29 15:28 ngarcia Steps to Reproduce Updated View Revisions
2016-03-30 12:50 psanjuan Note Added: 0085332
2016-03-31 13:44 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2016-03-31 13:45 AtulOpenbravo Status new => scheduled
2016-04-01 09:19 AtulOpenbravo Regression date => 2015-11-20
2016-04-01 09:19 AtulOpenbravo Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/77f1cb4dd278c84913938db669a62c4c52796486 [^]
2016-04-01 12:28 AtulOpenbravo Note Added: 0085383
2016-04-01 13:09 AtulOpenbravo Note Added: 0085384
2016-04-01 14:09 AtulOpenbravo Note Added: 0085385
2016-04-04 09:55 psanjuan Note Added: 0085401
2016-04-04 09:57 vmromanos Note Added: 0085402
2016-04-04 09:57 vmromanos Severity major => minor
2016-04-04 10:05 psanjuan Note Edited: 0085401 View Revisions
2016-04-04 10:25 psanjuan Note Edited: 0085401 View Revisions
2016-04-04 10:31 psanjuan Note Edited: 0085401 View Revisions
2016-04-04 11:06 psanjuan Note Edited: 0085401 View Revisions
2016-04-04 11:23 psanjuan Note Edited: 0085401 View Revisions
2016-04-04 12:26 psanjuan Note Edited: 0085401 View Revisions
2016-04-05 11:41 aferraz Status scheduled => feedback
2016-04-05 11:41 aferraz Status feedback => scheduled
2016-04-06 10:01 aferraz Regression level => Production - QA Approved
2016-04-06 10:01 aferraz Regression introduced in release => 3.0PR16Q1
2016-04-07 10:05 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 10:15 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 10:24 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 10:36 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 10:43 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 11:54 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 11:55 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 12:59 psanjuan Note Added: 0085487
2016-04-07 12:59 psanjuan Severity minor => major
2016-04-07 13:00 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 13:34 psanjuan Note Edited: 0085401 View Revisions
2016-04-07 15:45 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 13:00 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 13:18 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 13:55 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 13:55 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 14:12 psanjuan Note Edited: 0085401 View Revisions
2016-04-11 15:37 psanjuan Note Added: 0085572
2016-04-15 12:36 psanjuan Note Added: 0085664
2016-04-15 12:42 psanjuan Note Edited: 0085664 View Revisions
2016-04-15 14:50 hgbot Checkin
2016-04-15 14:50 hgbot Note Added: 0085672
2016-04-15 14:50 hgbot Status scheduled => resolved
2016-04-15 14:50 hgbot Resolution open => fixed
2016-04-15 14:50 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/714ea45ce839a94bc28270fb15b0bfff1b1b0f00 [^]
2016-04-15 15:01 aferraz Review Assigned To => aferraz
2016-04-15 15:01 aferraz Note Added: 0085676
2016-04-15 15:01 aferraz Status resolved => closed
2016-04-15 15:01 aferraz Fixed in Version => 3.0PR16Q3
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087452


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker