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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034392
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2016-11-04 10:482018-02-22 17:22
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityimmediateResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revisiond991f91e1a2f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2015-07-16
Regression introduced in release3.0PR15Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^]
Triggers an Emergency PackNo
Summary

0034392: Tax are duplicated in voided Sales Invoices if the original include a basic discount. Total Gross Amount does not match

DescriptionTax are duplicated in voided Sales Invoices if the original include a basic discount. Total Gross Amount does not match
Steps To ReproduceAs group admin role:
   Create a Sales Invoice, add a line and 'Descuento 10%' basic discount to it and complete it
   Void it
   Check two records are created in the tax tab of the automatically created invoice and that the total gross amount does not match the original total gross amount
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00344343.0PR16Q4 closedmarkmm82 Tax are duplicated in voided Sales Invoices if the original include a basic discount. Total Gross Amount does not match 
depends on backport 00344353.0PR16Q3.3 closedmarkmm82 Tax are duplicated in voided Sales Invoices if the original include a basic discount. Total Gross Amount does not match 
depends on backport 00344363.0PR16Q2.4 closedmarkmm82 Tax are duplicated in voided Sales Invoices if the original include a basic discount. Total Gross Amount does not match 
caused by feature request 0028366 closedadrianromero Add new functionality to calculate taxes per product BOM 

-  Notes
(0091166)
ngarcia (developer)
2016-11-04 10:49

Wrongly created data should be corrected as voided invoices cannot be reactivated
(0091251)
markmm82 (developer)
2016-11-08 17:24
edited on: 2016-11-09 14:58

Test Plan 1
As group admin role:
   Create a Sales Invoice header for Alimentos y Supermercados BP.
   Add a line:
     Product: Cerveza Ale 0,5 L
     Qty: 100
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 204.00
   Save and go to the Tax tab, notice a new tax is created:
     Taxable Amount: 204.00
     Tax Amount: 42.84
   Go to Basic Discounts and add a 'Descuento 10%' to it
   Complete the invoice.
   Notice after complete the sales invoice header shows:
     Total Gross Amount: 226.16
     Total Net Amount: 183.60
   Void it
   Go to the generated reversed Sales invoice and notice the information in header and tabs does match the original one, including total gross amount, lines, discounts and taxes.

Test Plan 2
As group admin role:
   Create a Sales Invoice header for Alimentos y Supermercados BP.
   Add a line:
     Product: Cerveza Ale 0,5 L
     Qty: 100
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 204.00
   Save and go to the Tax tab, notice a new tax is created:
     Taxable Amount: 204.00
     Tax Amount: 42.84
   Add a new tax to the invoice:
     Tax: Adquisiciones IVA 8% - IVA Reducido
     Taxable Amount: 204.00
     Tax Amount: 16.32
   Go to Basic Discounts and add a 'Descuento 10%' to it
   Complete the invoice.
   Notice after complete the sales invoice header shows:
     Total Gross Amount: 238.48
     Total Net Amount: 183.60
   Void it
   Go to the generated reversed Sales invoice and notice the information in header and tabs does match the original one, including total gross amount, lines, discounts and taxes.

(0091285)
psanjuan (manager)
2016-11-09 14:38

Issue verified.
(0091286)
psanjuan (manager)
2016-11-09 14:53

Test Plan

Test Case 1

Check that original sales and purchase invoice without including any discount product but two or more product at the same tax rate or different one, once voided, voided ones are equal to the original ones.
(0091287)
psanjuan (manager)
2016-11-09 15:10
edited on: 2016-11-09 15:43

Test Case 2 - one tax rate

As group admin role:
   Create a Sales Invoice header for Alimentos y Supermercados BP.
   Add a line:
     Product: Cerveza Ale 0,5 L
     Qty: 100
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 204.00
   Save and go to the Tax tab, notice a new tax is created:
     Taxable Amount: 204.00
     Tax Amount: 42.84
   Go to Basic Discounts and add a 'Descuento 10%' to it
   Complete the invoice.
   Notice after complete the sales invoice header shows:
     Total Gross Amount: 226.16
     Total Net Amount: 183.60
   Void it
   Go to the generated reversed Sales invoice and notice the information in header and tabs does match the original one, including total gross amount, lines, discounts and taxes.

Repeat same test for Purchase Invoice.

Repeat same test as above including more than 1 discount.

Repeat same test as above for a AR Credit Memo

Test Case 3 - more than one tax rate.


As group admin role:
   Create a Sales Invoice header for Alimentos y Supermercados BP.
   Add a line:
     Product: Cerveza Ale 0,5 L
     Qty: 100
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 204.00
   Save and go to the Tax tab, notice a new tax is created:
     Taxable Amount: 204.00
     Tax Amount: 42.84

     Add a new line:
     Product: Cerveza Ale 0,5 L
     Qty: 200
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 408.00
Save and go to the Tax tab, notice that tax amoutn has changed to:
     Taxable Amount: 612.00
     Tax Amount: 128.52

Add a new line:
   Product: Cerveza Ale 0,5 L
     Qty: 150
     Change tax to : Entregas IVA 10%
     Net Unit Price: 2.04
     Line Net Amount: 306.00
Save and go to the Tax tab, notice that there is a new tax line:
     Taxable Amount: 306.00
     Tax Amount: 30.60

   
   Go to Basic Discounts and add a 'Descuento 10%' to it
   Complete the invoice.

   Notice after complete the sales invoice header shows:
     Total Gross Amount: 969.41
     Total Net Amount: 826.20

   Check that two discount lines have been created with below info:
     Line related to tax "Entregas IVA 21% Line Net Amount = -61.20 (10% of 612.00)
     Line related to tax "Entregas IVA 10" Line Net Amount = -30.60 (10% of 306.00)

   Void it

   Go to voided sales invoice and check below data:

    Total Gross Amount = -969.41
    Total Net Amount = -826.20
    In tax tab there are only two records

Check that two discount lines have been created with below info:
     Line related to tax "Entregas IVA 21% Line Net Amount = 61.20 (10% of 612.00)
     Line related to tax "Entregas IVA 10" Line Net Amount = 30.60 (10% of 306.00)

Repeat same test as above including more than 1 discount.

Repeat same test as above for a AR Credit Memo

Repeat same test for Purchase Invoice.

Repeat same test for Purchase Invoice including Intracommunity tax rates (summary tax rate including two children tax rates).

(0091288)
psanjuan (manager)
2016-11-09 15:26
edited on: 2016-11-09 15:45

Test Case 4 - new tax line added.

As group admin role:
   Create a Sales Invoice header for Alimentos y Supermercados BP.
   Add a line:
     Product: Cerveza Ale 0,5 L
     Qty: 100
     Tax: Entregas IVA 21%
     Net Unit Price: 2.04
     Line Net Amount: 204.00
   Save and go to the Tax tab, notice a new tax is created:
     Taxable Amount: 204.00
     Tax Amount: 42.84
   
   Add another line:
     Product: Cerveza Ale 0.5L
     Qty = 150
     Tax = Entregas IVA 10%
     Net Unit Price = 2.04
     Line Net Amount = 306.00

   Go to tax tab and check there are two lines in there, one for each tax rate.
     Create a new tax line in Tax tab. Enter below information:

     Tax = Entregas IVA 21%
     Tax Amount = 0.01
     Taxable Amount = 0.05

   Save and check Total Gross Amount = 583.45 and Total Net Amount = 510.00
   
   Go to Basic Discounts and add a 'Descuento 10%' to it
   
   Complete the invoice.

   Notice after complete the sales invoice header shows:
   Total Gross Amount = 459.00+66.11= 525.11
   Total Net Amoun = 510.00 - 20.40-30.60 = 459.00

   Void the invoice. Check below info is shown for voided invoice.
   Total Gross Amount = -525.11
   Total Net Amount = -459.00

Repeat same test including more than one discount.

Repeat same test as above for a AR Credit Memo

Repeat same test for Purchase Invoice.

(0091391)
hgbot (developer)
2016-11-11 12:54

Repository: erp/devel/pi
Changeset: d991f91e1a2fbb16b949d63d358d8282be388f5c
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Nov 07 16:43:46 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/d991f91e1a2fbb16b949d63d358d8282be388f5c [^]

Fixes issue 34392: Avoid duplicated taxes in voided Sales Invoices if discounts

When taxes of the reversed invoice are created only manual taxes are taken into
account (reacalculate flag set as Y).

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0091393)
aferraz (manager)
2016-11-11 12:55

Code review + Testing OK
(0092610)
hudsonbot (developer)
2016-12-16 18:38

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/dc8bf00badd0 [^]
Maturity status: Test
(0102625)
hgbot (developer)
2018-02-22 17:22

Repository: tools/automation/int
Changeset: bab0f433ea5fa802ee7c0a296486c7f7c445932f
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Sep 05 16:48:59 2017 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/bab0f433ea5fa802ee7c0a296486c7f7c445932f [^]

Related to issue 34392: Added some automated test

---
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/PurchaseInvoiceHeaderTab.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesinvoice/SalesInvoiceHeaderTab.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRO_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SAL_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/procurement/transactions/PurchaseInvoice.java
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesInvoice.java
A src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/BasicDiscountsTab.java
A src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/TaxTab.java
A src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesinvoice/BasicDiscountsTab.java
A src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesinvoice/TaxTab.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression34392Out.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression34392In.java
---

- Issue History
Date Modified Username Field Change
2016-11-04 10:48 ngarcia New Issue
2016-11-04 10:48 ngarcia Assigned To => Triage Finance
2016-11-04 10:48 ngarcia Modules => Core
2016-11-04 10:48 ngarcia Resolution time => 1480028400
2016-11-04 10:48 ngarcia Triggers an Emergency Pack => No
2016-11-04 10:49 ngarcia Note Added: 0091166
2016-11-04 10:49 ngarcia Issue Monitored: networkb
2016-11-04 12:06 aferraz Assigned To Triage Finance => markmm82
2016-11-07 17:50 markmm82 Status new => acknowledged
2016-11-08 17:09 markmm82 Regression level => Production - Confirmed Stable
2016-11-08 17:09 markmm82 Regression date => 2015-07-16
2016-11-08 17:09 markmm82 Regression introduced in release => 3.0PR15Q4
2016-11-08 17:09 markmm82 Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^]
2016-11-08 17:22 markmm82 Status acknowledged => scheduled
2016-11-08 17:22 markmm82 Relationship added caused by 0028366
2016-11-08 17:24 markmm82 Note Added: 0091251
2016-11-09 14:38 psanjuan Note Added: 0091285
2016-11-09 14:53 psanjuan Note Added: 0091286
2016-11-09 14:58 psanjuan Note Edited: 0091251 View Revisions
2016-11-09 15:10 psanjuan Note Added: 0091287
2016-11-09 15:12 psanjuan Note Edited: 0091287 View Revisions
2016-11-09 15:16 psanjuan Note Edited: 0091287 View Revisions
2016-11-09 15:26 psanjuan Note Added: 0091288
2016-11-09 15:26 psanjuan Note Edited: 0091288 View Revisions
2016-11-09 15:29 psanjuan Note Edited: 0091287 View Revisions
2016-11-09 15:34 psanjuan Note Edited: 0091288 View Revisions
2016-11-09 15:43 psanjuan Note Edited: 0091287 View Revisions
2016-11-09 15:45 psanjuan Note Edited: 0091288 View Revisions
2016-11-11 12:54 hgbot Checkin
2016-11-11 12:54 hgbot Note Added: 0091391
2016-11-11 12:54 hgbot Status scheduled => resolved
2016-11-11 12:54 hgbot Resolution open => fixed
2016-11-11 12:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d991f91e1a2fbb16b949d63d358d8282be388f5c [^]
2016-11-11 12:55 aferraz Review Assigned To => aferraz
2016-11-11 12:55 aferraz Note Added: 0091393
2016-11-11 12:55 aferraz Status resolved => closed
2016-11-11 12:55 aferraz Fixed in Version => 3.0PR17Q1
2016-12-16 18:38 hudsonbot Checkin
2016-12-16 18:38 hudsonbot Note Added: 0092610
2018-02-22 17:22 hgbot Checkin
2018-02-22 17:22 hgbot Note Added: 0102625


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker