Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033859 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 07. Sales management | major | always | 2016-08-31 09:32 | 2016-09-19 16:27 | |||
Reporter | ngarcia | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0PR16Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | e5fb94b24cfc | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | aferraz | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | Production - Confirmed Stable | |||||||
Regression date | 2015-07-16 | |||||||
Regression introduced in release | 3.0PR15Q4 | |||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^] | |||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033859: Wrong Total Gross Amount in orders and invoices as the changes made in tax tab records do not recalculate it | |||||||
Description | Wrong Total Gross Amount in orders and invoices as the changes made in tax tab records do not recalculate it Should the user be able to edit or remove the records in tax tab with recalculate = 'Y'? | |||||||
Steps To Reproduce | As group admin role: Create a Sales Invoice Add a line with a product and a tax rate different from 0 Go to Tax tab and modify the tax amount. Check the recalculate checkbox is selected The total gross amount is not updated Complete it and check the total gross amount is not the total net amount plus tax amount Repeat the process with purchase invoice Repeat the process also by deleting the record in Tax tab instead of editing it In this case the problem is also reproducible in orders If you post the invoice the difference is posted in the Suspence Balancing Account | |||||||
Proposed Solution | It should not be posible to either modify or delete "Tax" set as "Recalculate" = Yes (the ones created automatically by Openbravo). For Purchase Order/Sales Order, Tax Tab should have UI Pattern as "Read Only". No insert/update/delete action allowed. Delete action for Tax tab of Sales Invoice/Purchase Invoice should be restricted by event handler in case record has Recalculate flag = Yes. Error message should be shown as "It is not possible to delete an invoice tax record with recalculate flag checked.". Invoice Tax Tab Fields: Tax Amount, Tax Base Amount and Tax should have read only logic in case of recalculate flag= yes. In this way user cannot edit the values for these fields. New invoice tax records should be created manually in case a given adjustment is required. This records will have recalculate flag=No hence update and delete action are allowed for this records. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0089582) psanjuan (manager) 2016-08-31 10:30 edited on: 2016-08-31 10:31 |
- sales order with only one unit of a product included at a net unit price of 100.00. VAT 21%. In that case what Openbravo first calculates is this: Line Net Amount = 100.00, that is equal to Taxable Amount = 100.00. Tax Amount = 21.00 - according to the issue now, "we go to the tax tab and modify the tax amount for instance to 22.50". We check that "recalculate" checkbox is selected. - In that case we are going to end up with below data: Line Net Amount = 100.00 that is Not equal to new Taxable Amount = 107.14. Tax Amount = 22.50 - Total gross amount is not longer 121.00 but 129.64, right. However Openbravo still shows a Total Gross Amount = 121.00 and a Total Net Amount = 100.00. It does not match. Posting would look like: 121.00 Clientes (Debit) 1.50 cuenta de cuadre (Debit) Ventas 100.00 (Credit) Iva 22.50 (Credit) This is not correct. However if instead of modifying that line a new line in tax tab is created with the difference (in our example 1.5), that makes total gross amount changes to 122.50 Therefore final figures are: Line Net Amont = 100.00 = Taxable Amount Tax Amount 22.50 and Total Gross Amount = 122.50 Posting: 122.50 Clientes (Debit) 100.00 Ventas (Credit) 22.50 Iva (Credit) This is correct. Proposed solution: It should not be posible to either modify or delete "Tax Lines" set as "Recalculate" = Yes (the ones created automatically by Openbravo) New lines should be created manually in case a given adjustment is required. |
(0089585) psanjuan (manager) 2016-08-31 10:37 edited on: 2016-08-31 10:37 |
This issue is a regression because it did correctly work for instance in 15Q2 before calculate taxes per product BOM feature was implemented. |
(0089951) AtulOpenbravo (developer) 2016-09-14 13:06 |
Test Plan - Create a Sales Invoice for "Moon Light Restaurants, Co." in F&B US Inc Org. - Create Line with Product "Ale Beer", Quantity = 1, Unit Price 100, Tax = CA Sales Tax. - Check Header info: Total Gross Amount = 108.25, Total Net Amount = 100. - Go to Tax Tab: Select record with CA Sales Tax. - Check Tax, Tax Amount, Taxable Amount fields are not editable, Recalculate flag = Yes. - Try to delete above record: Error message is shown:"Cannot delete invoice tax record with recalculate flag = yes." - Add new record in Invoice Tax Tab with Tax "FL Sales Tax",Taxable amount=100. - Check Tax, Tax Amount, Taxable Amount fields are editable, Recalculate flag = No. Tax Amount = 6. - Check Header info: Total Gross Amount = 114.25, Total Net Amount = 100. - Try to delete above record. Record is deleted successfully. - Check Header info: Total Gross Amount = 108.25, Total Net Amount = 100. - Try to delete Invoice Header. Record is deleted successfully. |
(0090020) hgbot (developer) 2016-09-16 09:24 |
Repository: erp/devel/pi Changeset: e5fb94b24cfcc0bc4aebf2c53db4c6e51007ae82 Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Wed Sep 14 15:36:20 2016 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/e5fb94b24cfcc0bc4aebf2c53db4c6e51007ae82 [^] Fixes issue 33859: Wrong Total Gross Amount in orders and invoices Wrong Total Gross Amount in orders and invoices as the changes made in tax tab records do not recalculate it. For Purchase Order and Sales Order, Tax tab is made read only so only record are created, modified and deleted only through order lines. Manual insertion, updation and deletion is not possible. In case of Sales Invoice and Purchase Invoices, records created by invoice line are marked with recalculate flag = Yes. Read Only logic based on this flag does not allow user to modify fields tax, tax amount and taxable amount of invoice tax records. Event handler restricts user to delete invoice tax records with recalculate flag = Yes. To avoid event handlers interference with ReorderCascadingChildDeletionsHandler.java, on Invoice deletetion, before deleting invoice tax records, flag recalculate is set = No --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ReorderCascadingChildDeletionsHandler.java M src-db/database/sourcedata/AD_COLUMN.xml M src-db/database/sourcedata/AD_MESSAGE.xml M src-db/database/sourcedata/AD_TAB.xml A src/org/openbravo/event/InvoiceTaxEventHandler.java --- |
(0090023) aferraz (manager) 2016-09-16 09:26 |
Code review + Testing OK |
(0090068) hudsonbot (developer) 2016-09-19 16:27 |
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/17da7ad0ad62 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2016-08-31 09:32 | ngarcia | New Issue | |
2016-08-31 09:32 | ngarcia | Assigned To | => Triage Finance |
2016-08-31 09:32 | ngarcia | Modules | => Core |
2016-08-31 09:32 | ngarcia | Resolution time | => 1505944800 |
2016-08-31 09:32 | ngarcia | Triggers an Emergency Pack | => No |
2016-08-31 09:33 | ngarcia | Issue Monitored: networkb | |
2016-08-31 09:33 | ngarcia | Relationship added | caused by 0028366 |
2016-08-31 09:34 | ngarcia | Steps to Reproduce Updated | View Revisions |
2016-08-31 09:43 | ngarcia | Steps to Reproduce Updated | View Revisions |
2016-08-31 10:30 | psanjuan | Note Added: 0089582 | |
2016-08-31 10:31 | psanjuan | Proposed Solution updated | |
2016-08-31 10:31 | psanjuan | Note Edited: 0089582 | View Revisions |
2016-08-31 10:37 | psanjuan | Note Added: 0089585 | |
2016-08-31 10:37 | psanjuan | Note Edited: 0089585 | View Revisions |
2016-08-31 12:15 | aferraz | Proposed Solution updated | |
2016-08-31 12:20 | aferraz | Proposed Solution updated | |
2016-08-31 12:21 | aferraz | Assigned To | Triage Finance => AtulOpenbravo |
2016-08-31 12:22 | aferraz | Status | new => scheduled |
2016-08-31 14:24 | ngarcia | Resolution time | 1505944800 => 1474408800 |
2016-09-13 10:52 | aferraz | Regression level | => Production - Confirmed Stable |
2016-09-13 10:52 | aferraz | Regression date | => 2015-07-16 |
2016-09-13 10:52 | aferraz | Regression introduced in release | => 3.0PR15Q4 |
2016-09-13 10:52 | aferraz | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^] |
2016-09-13 17:56 | AtulOpenbravo | Proposed Solution updated | |
2016-09-13 18:00 | AtulOpenbravo | Proposed Solution updated | |
2016-09-13 20:05 | AtulOpenbravo | Proposed Solution updated | |
2016-09-14 13:06 | AtulOpenbravo | Note Added: 0089951 | |
2016-09-14 17:51 | aferraz | Proposed Solution updated | |
2016-09-16 09:24 | hgbot | Checkin | |
2016-09-16 09:24 | hgbot | Note Added: 0090020 | |
2016-09-16 09:24 | hgbot | Status | scheduled => resolved |
2016-09-16 09:24 | hgbot | Resolution | open => fixed |
2016-09-16 09:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e5fb94b24cfcc0bc4aebf2c53db4c6e51007ae82 [^] |
2016-09-16 09:26 | aferraz | Review Assigned To | => aferraz |
2016-09-16 09:26 | aferraz | Note Added: 0090023 | |
2016-09-16 09:26 | aferraz | Status | resolved => closed |
2016-09-16 09:26 | aferraz | Fixed in Version | => 3.0PR16Q4 |
2016-09-19 16:27 | hudsonbot | Checkin | |
2016-09-19 16:27 | hudsonbot | Note Added: 0090068 |
Copyright © 2000 - 2009 MantisBT Group |