Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032206Openbravo ERP09. Financial managementpublic2016-02-11 13:312016-03-17 10:56
vmromanos 
vmromanos 
normalmajoralways
closedfixed 
5
 
3.0PR16Q2 
aferraz
Core
No
0032206: System should avoid to reactivate an invoice linked to a Manual Cash VAT Settlement
When an invoice has any payment associated, the system avoids to reactivate the invoice. Thus we can control the cash vat information for the invoice.

The same logic should be applied when the invoice is linked to a manual cash vat settlement
Install and configure Cash VAT module. Apply its dataset to * org
Create a cash vat tax rate
Create a purchase invoice with the previous cash vat tax rate. Complete and post it.
Go to Manual Cash VAT Settlement window, create a new record for this year and include the previously created invoice. Complete it.
Go to the invoice and try to reactivate it. The system allows to do it, but it shouldn't
No tags attached.
blocks defect 00321003.0PR16Q2 closed vmromanos Error when processing CashVAT invoice that has been previously reactivated 
Issue History
2016-02-11 13:31vmromanosNew Issue
2016-02-11 13:31vmromanosAssigned To => vmromanos
2016-02-11 13:31vmromanosModules => Core
2016-02-11 13:31vmromanosTriggers an Emergency Pack => No
2016-02-11 13:31vmromanosRelationship addedblocks 0032100
2016-02-11 13:31vmromanosStatusnew => scheduled
2016-02-11 16:12vmromanosNote Added: 0084113
2016-02-12 09:19psanjuanNote Added: 0084141
2016-02-12 09:20psanjuanNote Edited: 0084141bug_revision_view_page.php?bugnote_id=0084141#r11083
2016-02-12 09:22psanjuanNote Edited: 0084141bug_revision_view_page.php?bugnote_id=0084141#r11084
2016-02-12 09:24psanjuanNote Edited: 0084141bug_revision_view_page.php?bugnote_id=0084141#r11085
2016-02-12 09:24psanjuanNote Edited: 0084141bug_revision_view_page.php?bugnote_id=0084141#r11086
2016-02-12 13:12psanjuanNote Edited: 0084113bug_revision_view_page.php?bugnote_id=0084113#r11109
2016-02-12 13:13psanjuanNote Edited: 0084113bug_revision_view_page.php?bugnote_id=0084113#r11110
2016-02-12 13:15psanjuanNote Edited: 0084113bug_revision_view_page.php?bugnote_id=0084113#r11111
2016-02-12 13:18psanjuanNote Edited: 0084113bug_revision_view_page.php?bugnote_id=0084113#r11112
2016-02-12 13:20psanjuanNote Edited: 0084113bug_revision_view_page.php?bugnote_id=0084113#r11113
2016-02-12 13:21psanjuanNote Added: 0084153
2016-02-15 11:14hgbotCheckin
2016-02-15 11:14hgbotNote Added: 0084174
2016-02-15 11:14hgbotStatusscheduled => resolved
2016-02-15 11:14hgbotResolutionopen => fixed
2016-02-15 11:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5543dcdb0d5fb093f5df6ea63b4114a4ab113167 [^]
2016-02-15 11:14aferrazReview Assigned To => aferraz
2016-02-15 11:14aferrazNote Added: 0084176
2016-02-15 11:14aferrazStatusresolved => closed
2016-02-15 11:14aferrazFixed in Version => 3.0PR16Q2
2016-03-17 10:56hudsonbotCheckin
2016-03-17 10:56hudsonbotNote Added: 0085137

Notes
(0084113)
vmromanos   
2016-02-11 16:12   
(edited on: 2016-02-12 13:20)
Test plan:
Install and configure Cash VAT module. Apply its dataset to * org
Create a cash vat tax rate
Create a purchase invoice with the previous cash vat tax rate. Complete and post it.
Go to Manual Cash VAT Settlement window, create a new record for this year and include the previously created invoice. Complete it.
Go to the invoice and try to reactivate it. Verify an error message is shown, saying: "The invoice is already included into a Manual Cash VAT Settlement".

Go to Manual Cash VAT Settlement and reactivate it by choosing the option "Reactivate" therefore lines tab is not empty.

Go to the invoice and try to reactivate it.
The system allows you to reactivate the invoice.

Add a new line to the invoice for another product with the same cash vat tax rate. Complete the invoice.

Go to Manual Cash VAT Settlement window and check that regardless there is a line pointing to the invoice, you need to one more press Pick Lines & Complete.

Once in the Pick Lines & Complete window, check that the invoice reflects the proper Grand Total Amount (by taking into account the change done in the invoice).

Repeat same flow for sales invoice.

(0084141)
psanjuan   
2016-02-12 09:19   
(edited on: 2016-02-12 09:24)
Issue verified. Issue can be reproduced, it is possible to reactivate the invoice regardless there is a manual VAT settlement assigned to it.
an error will be shown whenever you try now to change the invoice quantity or the net unit price, or the tax rate, of any data of the purchase invoice line.

Only action allowed is to add a new line and then complete. Invoice Posting is not correct because all VAT is considered Temporary VAT while there is already a Cash VAT amount settle as "final" VAT.

That invoice can not be included in a Manual Cash VAT Settle anymore.

If a payment of the invoice is created, no new record in the Cash VAT tab would be created, which is not correct.

Due to all this inconsistency data that can be created, the fix to this issue will be not to allow reactivating an invoice which do have related a manual cash vat unless manual cash vat is unpost and reactivated.

(0084153)
psanjuan   
2016-02-12 13:21   
Test Plan above verified.

Issue can be code reviewed and closed.
(0084174)
hgbot   
2016-02-15 11:14   
Repository: erp/devel/pi
Changeset: 5543dcdb0d5fb093f5df6ea63b4114a4ab113167
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Feb 11 15:59:45 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5543dcdb0d5fb093f5df6ea63b4114a4ab113167 [^]

Fixed bug 32206: Invoice reactivation with Manual Cash VAT Settlement

Avoid to reactivate an invoice linked to a Manual Cash VAT Settlement

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
---
(0084176)
aferraz   
2016-02-15 11:14   
Code review OK
(0085137)
hudsonbot   
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