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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032428
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2016-03-07 16:562018-02-22 17:22
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revisionb5115ab17d95
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

0032428: Wrong Tax Amount and Total Gross Amount in orders created by the Copy Record process if price list includes taxes

DescriptionWrong Tax Amount and Total Gross Amount in orders created by the Copy Record process if price list includes taxes
Steps To ReproduceAs group admin role:
   Create a Sales Price List
   Set it as Price Includes Tax
   Add a version and a product to it
   Create a Sales Order with that price list and product and book it
   Click on the Copy record button of the toolbar and check the Total Gross Amount field of the status bar is wrong
   The tax amount of the tax tab is also wrong
   Book it and check the values do not change
   Repeat the process in the purchase flow and check the problem is also reproducible
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00324373.0PR16Q1 closedmarkmm82 Openbravo ERP Wrong Tax Amount and Total Gross Amount in orders created by the Copy Record process if price list includes taxes 
depends on backport 00324383.0PR15Q4.5 closedmarkmm82 Openbravo ERP Wrong Tax Amount and Total Gross Amount in orders created by the Copy Record process if price list includes taxes 
caused by feature request 0028366 closedadrianromero Openbravo ERP Add new functionality to calculate taxes per product BOM 
related to defect 0032472 closedmarkmm82 Modules Purchase Invoices with Total Gross Amount of 0 created from Procurement Contract Billing Process 
related to defect 0032844 closedmarkmm82 Modules Wrong total net and gross amounts when generating an invoice with the Mass Invoicing process 

-  Notes
(0084850)
markmm82 (developer)
2016-03-09 17:24
edited on: 2016-03-09 17:27

Test plan:
As group admin role:
   Create a Sales Price List
   Set it as Price Includes Tax
   Add a version and a product to it
   Create a Sales Order with that price list and product and book it
   Click on the Copy record button of the toolbar and check the Total Gross Amount field of the status bar are the same like the original.
   The tax amount of the tax tab is also right
   Book it and check the values do not change (everything was calculated where cloning, including taxes)
   Repeat the process in the purchase flow and check the problem is also corrected.

(0084863)
psanjuan (manager)
2016-03-10 10:52

Issue verified.
(0084864)
psanjuan (manager)
2016-03-10 10:53
edited on: 2016-03-11 12:51

Test Plan

Test case 1 - sales price list including taxes, without basic discounts.

Create a Sales Price List for F&B España
Set it as Price Includes Tax
Add a version and a product to it, for instance "Agua sin Gas 1L" Unit/List Price = 100.00€
Create a Sales Order for F&B España, BP= Alimentos y Supermercados. Select Sales Price list including taxes.

Go to Lines and select the product, add 1 unit. Save it.
Go to Basic Discounts and remove it.
Check that Total Gross Amount = 100, Total Net Amount = 82.64 (100/1.21). This is correct.

Go to Tax tab and check below values:
Taxable Amount = 82.64
Tax Amount = 17.36
This is correct.
Book the order. (ie. order 1000237)

Go back to the header and click on the Copy record button of the toolbar.
Check that the order has been cloned into a new one (ie. order 1000238).
Remove the discount if any.
In the new order check below data is shown:

Total Gross Amount = 100.00
Total Net Amount = 82.64
Taxable Amount = 82.64
Tax Amount = 17.36

Book the order and check that all values above remains which is correct.


Test case 2 - sales price list including taxes, with basic discounts.

Create a Sales Price List for F&B España
Set it as Price Includes Tax
Add a version and a product to it, for instance "Agua sin Gas 1L" Unit/List Price = 100.00€
Create a Sales Order for F&B España, BP= Alimentos y Supermercados. Select Sales Price list including taxes.

Go to Lines and select the product, add 1 unit. Save it.

Check that Total Gross Amount = 100, Total Net Amount = 82.64 (100/1.21). This is correct.

Go to Tax tab and check below values:
Taxable Amount = 82.64
Tax Amount = 17.36
This is correct.
Book the order. (ie. order 1000239)

Check now that the values have changed due to basic discount of 10%.

Total Gross Amount = 90.00 (100.00-10%s100.00)
Total Net Amount = 74.38 (90/1.21)
Tax Amount = 74.38
Taxable Amount = 15.62

Go back to the header and click on the Copy record button of the toolbar.
Check that the order has been cloned into a new one (ie. order 1000240).
In the new order check below data is shown:

Total Gross Amount = 90.00
Total Net Amount = 74.38
Taxable Amount = 74.38
Tax Amount = 15.62

Book the order and check that all values above remains which is correct.


Test case 3 - sales price list do not including taxes, without discount.

Create a Sales Price List for F&B España
Do not set it as Price Includes Tax
Add a version and a product to it, for instance "Agua sin Gas 1L" Unit/List Price = 100.00€
Create a Sales Order for F&B España, BP= Alimentos y Supermercados. Select Sales Price just created.

Go to Lines and select the product, add 1 unit. Save it.
Go to Basic Discounts and remove it.
Check that Total Gross Amount = 121, Total Net Amount = 100 . This is correct.

Go to Tax tab and check below values:
Taxable Amount = 100.00
Tax Amount = 21.00
This is correct.
Book the order. (ie. order 1000237)

Go back to the header and click on the Copy record button of the toolbar.
Check that the order has been cloned into a new one (ie. order 1000238).
Remove the discount if any.
In the new order check below data is shown:

Total Gross Amount = 121.00
Total Net Amount = 100.00
Taxable Amount = 100.00
Tax Amount = 21.00

Book the order and check that all values above remains which is correct.


Test case 4 - sales price list do not including taxes, with discounts.

Create a Sales Price List for F&B España
Do not set it as Price Includes Tax
Add a version and a product to it, for instance "Agua sin Gas 1L" Unit/List Price = 100.00€
Create a Sales Order for F&B España, BP= Alimentos y Supermercados. Select Sales Price list just created.

Go to Lines and select the product, add 1 unit. Save it.
Check that Total Gross Amount = 121, Total Net Amount = 100. This is correct.

Go to Tax tab and check below values:
Taxable Amount = 100.00
Tax Amount = 21.00
This is correct.
Book the order. (ie. order 1000237)

Check that the values have been updated, due to the discount 10%:
Total Gross Amount = 108.90
Total Net Amount = 90.00
Taxable Amount = 90.00
Tax Amount = 18.90

Go back to the header and click on the Copy record button of the toolbar.
Check that the order has been cloned into a new one (ie. order 1000238).
In the new order check below data is shown:

Total Gross Amount = 108.90
Total Net Amount = 90.00
Taxable Amount = 90.00
Tax Amount =18.90

Book the order and check that all values above remains which is correct.


(repeat all test cases above for purchase orders, in the case of purchase orders with discount, after copy the order we need to make sure that the discount is selected in the tab "Basic Discounts", because that info is not copied by default. see issue: 32462)

(0084878)
hgbot (developer)
2016-03-10 18:17

Repository: erp/devel/pi
Changeset: b5115ab17d95d8abfb51fad53c18cff1ed1da6da
Author: Mark <m.molina <at> nectus.com>
Date: Wed Mar 09 18:53:24 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/b5115ab17d95d8abfb51fad53c18cff1ed1da6da [^]

Fixes issue 32428: Wrong orders created by the Copy Record process

Fixed the wrong Tax Amount and Total Gross Amount calculation in orders created by the Copy Record process
if price list includes taxes. These amounts are calculated when related triggers are fired, due that when
the order is cloned from the original order was necessary to reset calculated amounts and then triggers updates
them again when lines are added to the cloned order.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
---
(0084879)
hgbot (developer)
2016-03-10 18:17

Repository: erp/devel/pi
Changeset: 201577aba6ba46850f4e4d3a2eff9f6a5fa9e78e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Mar 10 17:56:11 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/201577aba6ba46850f4e4d3a2eff9f6a5fa9e78e [^]

Related to issue 32428: Code review improvements

Use BigDecimal.ZERO instead of new BigDecimal(0).

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
---
(0084880)
aferraz (manager)
2016-03-10 18:19

Code review + Testing OK
(0084967)
eduardo_Argal (developer)
2016-03-14 19:03

Review ConvertQuotationIntoOrder and OrderGroupingProcess. This problem may be present there.
Please test to ensure this is not happening.
(0085007)
psanjuan (manager)
2016-03-16 13:27
edited on: 2016-03-16 13:29

Review of ConvertQuotatonIntoOder process

Scenario 1

Go to Sales Quotation window.
Create a new one for Alimentos y Supermercados.
Select the previously created Sales price list including taxes.
Go to lines and select "Agua sin Gas 1L".
Check that unit price changes from 100 to 82.64 as it does include a 21% VAT.
(100/1.21) = 82.64

Save it.

Check total gross Amount = 100.00
Total Net amount = 82.64
Taxable Amount = 82.64
Tax Amount = 17.36

All of that is correct.

Go to basic discount tab and remove the discount shown there, if any.
Book it.

Click on "Create Order" process button. Select Firm Quote. Press OK.

Go to the sales order just created and verify it does shown same amounts/figures as above.

Scenario 2

Go to Sales Quotation window.
Create a new one for Alimentos y Supermercados.
Select the previously created Sales price list including taxes.
Go to lines and select "Agua sin Gas 1L".
Check that unit price changes from 100 to 82.64 as it does include a 21% VAT.
(100/1.21) = 82.64

Save it.

Check total gross Amount = 100.00
Total Net amount = 82.64
Taxable Amount = 82.64
Tax Amount = 17.36

All of that is correct.

Make sure that a basic discount of 10% for instance is set in the basic discount tab.

Book it.

Check that figures above have changed as shown below:

Check total gross Amount = 90.00
Total Net amount = 74.38
Taxable Amount = 74.38
Tax Amount = 15.62

Click on "Create Order" process button. Select Firm Quote. Press OK.

Go to the sales order just created and verify it does shown same amounts/figures as above.

(0085193)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test
(0085194)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test
(0090354)
nonofrancisco (developer)
2016-09-28 17:55

Test Cases in TestLink

URL:https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10200 [^]
URL:https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10201 [^]
(0102613)
hgbot (developer)
2018-02-22 17:22

Repository: tools/automation/int
Changeset: 4f3a78e849c3344985638d23f058b56e46965936
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Tue Sep 27 15:38:44 2016 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/4f3a78e849c3344985638d23f058b56e46965936 [^]

Related to issue 32428: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/data/masterdata/pricing/pricelist/PriceListData.java
M src-test/com/openbravo/test/integration/erp/data/masterdata/pricing/pricelist/ProductPriceData.java
M src-test/com/openbravo/test/integration/erp/gui/masterdata/pricing/pricelist/ProductPriceTab.java
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseorder/PurchaseOrderHeaderTab.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesorder/HeaderTab.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/masterdata/pricing/pricelist/PriceList.java
M src-test/com/openbravo/test/integration/erp/testscripts/masterdata/pricing/pricelist/ProductPriceScript.java
M src-test/com/openbravo/test/integration/erp/testscripts/procurement/transactions/PurchaseOrder.java
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesOrder.java
A src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseorder/TaxTab.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression32428.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression32428.java
---
(0102614)
hgbot (developer)
2018-02-22 17:22

Repository: tools/automation/int
Changeset: 5271449cfd2bc776eb9b44858904be1f1afcbbf4
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon Aug 07 14:16:45 2017 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/5271449cfd2bc776eb9b44858904be1f1afcbbf4 [^]

Related to issue 32428:Fix tax amount and price list name in sales flow

---
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression32428.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression32428.java
---

- Issue History
Date Modified Username Field Change
2016-03-07 16:56 ngarcia New Issue
2016-03-07 16:56 ngarcia Assigned To => Triage Finance
2016-03-07 16:56 ngarcia Modules => Core
2016-03-07 16:56 ngarcia Resolution time => 1460325600
2016-03-07 16:56 ngarcia Triggers an Emergency Pack => No
2016-03-07 16:56 ngarcia Issue Monitored: networkb
2016-03-07 16:59 ngarcia Steps to Reproduce Updated View Revisions
2016-03-07 17:41 eugeni Issue Monitored: eugeni
2016-03-08 17:49 markmm82 Status new => scheduled
2016-03-08 17:49 markmm82 Assigned To Triage Finance => markmm82
2016-03-08 17:55 aferraz Status scheduled => feedback
2016-03-08 17:55 aferraz Status feedback => new
2016-03-08 18:14 aferraz Regression level => Production - Confirmed Stable
2016-03-08 18:14 aferraz Regression date => 2015-07-16
2016-03-08 18:14 aferraz Regression introduced in release => 3.0PR15Q4
2016-03-08 18:14 aferraz Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^]
2016-03-08 18:17 aferraz Status new => scheduled
2016-03-08 18:19 aferraz Relationship added caused by 0028366
2016-03-09 17:24 markmm82 Note Added: 0084850
2016-03-09 17:27 markmm82 Note Edited: 0084850 View Revisions
2016-03-10 10:52 psanjuan Note Added: 0084863
2016-03-10 10:53 psanjuan Note Added: 0084864
2016-03-10 11:16 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 11:17 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 11:26 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 13:54 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 14:01 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 14:10 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 14:11 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 14:14 psanjuan Note Edited: 0084864 View Revisions
2016-03-10 18:17 hgbot Checkin
2016-03-10 18:17 hgbot Note Added: 0084878
2016-03-10 18:17 hgbot Status scheduled => resolved
2016-03-10 18:17 hgbot Resolution open => fixed
2016-03-10 18:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b5115ab17d95d8abfb51fad53c18cff1ed1da6da [^]
2016-03-10 18:17 hgbot Checkin
2016-03-10 18:17 hgbot Note Added: 0084879
2016-03-10 18:19 aferraz Review Assigned To => aferraz
2016-03-10 18:19 aferraz Note Added: 0084880
2016-03-10 18:19 aferraz Status resolved => closed
2016-03-10 18:19 aferraz Fixed in Version => 3.0PR16Q2
2016-03-11 12:51 psanjuan Note Edited: 0084864 View Revisions
2016-03-14 19:03 eduardo_Argal Note Added: 0084967
2016-03-15 17:27 aferraz Relationship added related to 0032472
2016-03-16 13:27 psanjuan Note Added: 0085007
2016-03-16 13:29 psanjuan Note Edited: 0085007 View Revisions
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085193
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085194
2016-05-04 10:04 aferraz Relationship added related to 0032844
2016-09-28 17:55 nonofrancisco Note Added: 0090354
2018-02-22 17:22 hgbot Checkin
2018-02-22 17:22 hgbot Note Added: 0102613
2018-02-22 17:22 hgbot Checkin
2018-02-22 17:22 hgbot Note Added: 0102614


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker