Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0032100 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 03. Procurement management | major | always | 2016-02-02 17:58 | 2016-03-17 10:56 | |||
Reporter | maite | View Status | public | |||||
Assigned To | vmromanos | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR16Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 1124bbf1942d | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | aferraz | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 40364 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0032100: Error when processing CashVAT invoice that has been previously reactivated | |||||||
Description | Error when processing CashVAT invoice that has been previously reactivated | |||||||
Steps To Reproduce | 0. Install CashVat Management module and apply dataset 1. Register Purchase Order and set it as "CashVAT". Add any line and set CashVat tax. Process Order 2. Register Payment Out related with the order and process 3. Create Purchase Invoice and set it as "CashVAT". Run "Create Lines From" and select previous order. Process Invoice 4. Reactivate Invoice 5. Try to process invoice again and following error is obtained "This record cannot be deleted because it is associated with other existing elements. Please see Linked Items" Problem could be that information from CashVat tab has not been deleted when reactivating the invoice | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0084091) vmromanos (viewer) 2016-02-10 18:37 |
When an invoice has any associate payment, there is a validation that avoids to reactivate the invoice. Deleting the Cash VAT info is currently done when reactivating the associated payment (not the invoice), because the cash vat can be settled when the payment has been registered. However, only in the concrete case of prepayments, we could be interested in deleting the Cash VAT info related to the prepayment when reactivating the invoice. This is a scenario that is not covered right now and it's exactly what the bug is reporting. |
(0084104) vmromanos (viewer) 2016-02-11 13:48 edited on: 2016-02-12 12:10 |
Test plan I . total prepayment - no change in the invoice amount. 0. Install CashVat Management module and apply dataset 1. Register Purchase Order and set it as "CashVAT". Add any line and set CashVat tax. Process Order 2. Register Payment Out related with the order and process 3. Create Purchase Invoice and set it as "CashVAT". Run "Create Lines From" and select previous order. Process Invoice. Verify a record is shown in Cash VAT tab, showing a 100 percentage. 4. Reactivate Invoice. Verify the Cash VAT tab is empty 5. Process the invoice again. Verify a record is shown in Cash VAT tab, showing a 100 percentage. Test plan II . partial prepayment - no change in the invoice amount. 1. Register Purchase Order and set it as "CashVAT". Add any line and set CashVat tax. Process Order. 2. Register a partial (50%) Payment Out related with the order and process 3. Create Purchase Invoice and set it as "CashVAT". Run "Create Lines From" and select previous order. Process Invoice. Verify a prepayment amount is shown in there (i.e. 30250) Verify a record is shown in Cash VAT tab, showing a 50 percentage. 4. Reactivate Invoice. Verify the Cash VAT tab is empty 5. Process the invoice again. Verify a record is shown in Cash VAT tab, showing a 50 percentage. 6. Post the order, posting looks like: 50.000 (6000) Compra Mercaderias DEBIT 5.250 (4720T) HP IVA soportado temporal DEBIT 5.250 (47200) HP IVA soportado DEBIT 30.250 (4070) Anticipo Proveedores 30.250 (4000) Proveedores Repeat same flow for Sales. |
(0084140) psanjuan (viewer) 2016-02-12 09:10 edited on: 2016-02-12 09:11 |
While trying to reproduce this issue, it is clear that Cash VAT information is not removed after reactivating the invoice, moreover it is possible to complete the invoice once again but the very same record is created once more in the Cash VAT tab. At the end, there will be as many records in that tab as times the invoice has been reactivated and complete. |
(0084145) psanjuan (viewer) 2016-02-12 10:11 edited on: 2016-02-16 10:31 |
Test Plan above verified for the case of Total Prepayment, invoice amount does not change. Test Plan I - total prepayment, invoice amount is increased. - Register purchase order set is as Cash VAT. Add a line: * Ordered quantity = 500 * Net unit price = 100.00 * Tax Rate = "Adquisiciones IVA 21% IVA de Caja". - Book the order. - Register payment out for the total gross amount of the order, that is Total Gross Amount = 60.500 - Create a purchase invoice from the order and Complete it. - Check that the purchase invoice is being shown as Payment complete = Yes, Prepayment = 60.500 - Check that a record has been created in the Cash VAT tab showing below information: Percentage = 100 Tax Amount = 10.500 Taxable Amount = 50.000 - Post the invoice, verify that the VAT is posted to a final VAT ledger account (i.e. 472000) - Unpost the invoice and reactivate it. - Go to the Cash VAT tab and check that there is no info in there. - Go to lines tab and change the Invoiced Quantity from 500 to 600 therefore total gross amount changes to 72.600 and total Net amount to 60.000. - Complete the invoice. - Check that Payment complete changes to NO - Check that Prepayment Amount remains as 60.500 - Check that Cash VAT tab does not shows now a 100% but an 83.33% that is Tax Amount = 10449.58 Taxable Amount = 49.998 - Post the invoice, verify below posting: 60.000 (60000) compra mercaderias DEBIT 10499.58 (47200) HP IVA soportado DEBIT 2100.42 (47200T) HP IVA soportado transitorio DEBIT 60.500 (407000) Anticipo a Proveedores CREDIT 12.100 (4000) Proveedores - Press Add payment and pay the rest of the invoice, that is 12.100 - Check that now the invoice is shown as Payment Complete = Yes - Go to Cash VAT tab and check that a new record has been created there with the aim of getting up to a 100% percentage of the temporary VAT settled. - Unpost the invoice - Reactivate and Delete the lines of the payment, therefore the purchase invoice can be reactivated once more. - Reactivate the invoice and check that there are no records in the Cash VAT tab. - Complete the invoice once more, and check that a new record is shown in the Cash VAT tab, the one related to the prepayment at a 83.33 percentage. Test Plan II - total prepayment, invoice amount is decreased. - Register purchase order set is as Cash VAT. Add a line: * Ordered quantity = 500 * Net unit price = 100.00 * Tax Rate = "Adquisiciones IVA 21% IVA de Caja". - Book the order. - Register payment out for the total gross amount of the order, that is Total Gross Amount = 60.500 - Create a purchase invoice from the order and Complete it. - Check that the purchase invoice is being shown as Payment complete = Yes, Prepayment = 60.500 - Check that a record has been created in the Cash VAT tab showing below information: Percentage = 100 Tax Amount = 10.500 Taxable Amount = 50.000 - Post the invoice, verify that the VAT is posted to a final VAT ledger account (i.e. 472000) - Unpost the invoice and reactivate it. - Go to the Cash VAT tab and check that there is no info in there. - Go to lines tab and change the Invoiced Quantity from 500 to 400, Complete the invoice. - Total Gross Amount is now 48.400, Total Net Amount = 40.000 - Check that Payment complete remains as YES - Check that Prepayment Amount remains as 60.500 - Go to the Cash VAT tab and check that below data is shown: Percentage = 100 Tax Amount = 8400 Taxable Amount = 40000 - Post the invoice, verify below posting: 40.000 (60000) compra mercaderias DEBIT 8.400 (47200) HP IVA soportado DEBIT 48.400 (407000) Anticipo a Proveedores CREDIT Test Plan III - partial prepayment, invoice amount is increased. - Register purchase order set is as Cash VAT. Add a line: * Ordered quantity = 500 * Net unit price = 100.00 * Tax Rate = "Adquisiciones IVA 21% IVA de Caja". - Book the order. - Register payment out for the 50% gross amount of the order, that is 30.250 - Create a purchase invoice from the order and Complete it. - Check that the purchase invoice is being shown as Payment complete = Yes, Prepayment = 30.250 - Check that a record has been created in the Cash VAT tab showing below information: Percentage = 50 - Post the invoice, verify that the 50% of VAT is posted to a final VAT ledger account (i.e. 472000) - Unpost the invoice and reactivate it. - Go to the Cash VAT tab and check that there is no info in there. - Go to lines tab and change the Invoiced Quantity from 500 to 600 therefore total gross amount changes to 72.600 and total Net amount to 60.000. - Complete the invoice. - Check that Payment complete is NO - Check that Prepayment Amount remains as 30.250 - Check that Cash VAT tab does not shows now a 50% but an 41.67% that is Tax Amount = 5.250.42 Taxable Amount = 25.002 - Post the invoice, verify below posting: 60.000 (60000) compra mercaderias DEBIT 5.250.42 (47200) HP IVA soportado DEBIT 7.349.58 (47200T) HP IVA soportado transitorio DEBIT 30.250 (407000) Anticipo a Proveedores CREDIT 42.350 (4000) Proveedores - Press Add payment and pay the rest of the invoice, that is 42.350 - Check that now the invoice is shown as Payment Complete = Yes - Go to Cash VAT tab and check that two new records have been created there with the aim of getting up to a 100% percentage of the temporary VAT settled. - Unpost the invoice - Reactivate and Delete the lines of the payment, therefore the purchase invoice can be reactivated once more. - Reactivate the invoice and check that there are no records in the Cash VAT tab. - Complete the invoice once more, and check that a new record is shown in the Cash VAT tab, the one related to the prepayment at a 41.67 percentage. Test Plan IV - partial prepayment, invoice amount is decreased. - Register purchase order set is as Cash VAT. Add a line: * Ordered quantity = 500 * Net unit price = 100.00 * Tax Rate = "Adquisiciones IVA 21% IVA de Caja". - Book the order. - Register payment out for the 50% gross amount of the order, that is 30.250 - Create a purchase invoice from the order and Complete it. - Check that the purchase invoice is being shown as Payment complete = No, Prepayment = 30.250 - Check that a record has been created in the Cash VAT tab showing below information: Percentage = 50 Tax Amount = 5.250 Taxable Amount = 25.000 - Post the invoice, verify that the 50% of VAT is posted to a final VAT ledger account (i.e. 472000) - Unpost the invoice and reactivate it. - Go to the Cash VAT tab and check that there is no info in there. - Go to lines tab and change the Invoiced Quantity from 500 to 400, Complete the invoice. - Total Gross Amount is now 48.400, Total Net Amount = 40.000 - Check that Payment complete is NO - Check that Prepayment Amount remains as 30.250 - Go to the Cash VAT tab and check that below data is shown: Percentage = 62.5 Tax Amount = 5.250 Taxable Amount = 25.000 - Post the invoice and verify below posting which is correct: 40.000 (60000) compra mercaderias DEBIT 5.250 (47200) HP IVA soportado DEBIT 3.150 (407000) Anticipo a Proveedores DEBIT 30.250 (407000) Anticipo a Proveedores CREDIT 18.150 (47200T) HP IVA soportado transitorio CREDIT Repeat Test II and IV above for Sales. Repeat Test I and III for Sales in the case of allowing "Is Quantity Variable" in the product. |
(0084156) psanjuan (viewer) 2016-02-12 14:16 |
Test Plan above verified. Issue can be code reviewed and closed. Prepaid Cash VAT related invoices can be reactivated, therefore Cash VAT info is removed and later on updated once invoice is completed once again. This issue is focus on "Reactivate" action, and that is working. What it is not working 100% ok is the action taken once a Cash VAT invoice is reactivated an after that is changed by decreasing invoice amount. See issue related 32216. |
(0084173) hgbot (developer) 2016-02-15 11:14 |
Repository: erp/devel/pi Changeset: 1124bbf1942dde08141e010e1ab02b70fc9d64f1 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Thu Feb 11 13:42:35 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/1124bbf1942dde08141e010e1ab02b70fc9d64f1 [^] Fixed bug 32100: Reactivation control of a prepaid cash vat invoice When an invoice is linked to a payment, the system currently avoids to reactivate it. You first need to reactivate the payment, so the cash vat information is deleted, and then you can reactivate the invoice. However for prepaid invoices, the system does allow to reactivate the invoice, but the cash vat information is wrongly kept. Now we delete all the cash vat info records linked to a prepayment for this invoice at invoice reactivation time. When the invoice is latter on processed, the cash vat records will be calculated again. --- M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml --- |
(0084175) aferraz (viewer) 2016-02-15 11:14 |
Code review OK |
(0085136) hudsonbot (viewer) 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 |
![]() |
|||
Date Modified | Username | Field | Change |
2016-02-02 17:58 | maite | New Issue | |
2016-02-02 17:58 | maite | Assigned To | => Triage Finance |
2016-02-02 17:58 | maite | OBNetwork customer | => Yes |
2016-02-02 17:58 | maite | Modules | => Core |
2016-02-02 17:58 | maite | Support ticket | => 40364 |
2016-02-02 17:58 | maite | Resolution time | => 1456873200 |
2016-02-02 17:58 | maite | Triggers an Emergency Pack | => No |
2016-02-02 17:58 | maite | Issue Monitored: networkb | |
2016-02-10 18:37 | vmromanos | Status | new => scheduled |
2016-02-10 18:37 | vmromanos | Note Added: 0084091 | |
2016-02-10 18:37 | vmromanos | Assigned To | Triage Finance => vmromanos |
2016-02-11 13:31 | vmromanos | Relationship added | depends on 0032206 |
2016-02-11 13:48 | vmromanos | Note Added: 0084104 | |
2016-02-12 09:10 | psanjuan | Note Added: 0084140 | |
2016-02-12 09:11 | psanjuan | Note Edited: 0084140 | View Revisions |
2016-02-12 10:11 | psanjuan | Note Added: 0084145 | |
2016-02-12 10:13 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 10:15 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 10:16 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 10:18 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 10:22 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 10:25 | psanjuan | Note Edited: 0084104 | View Revisions |
2016-02-12 10:30 | psanjuan | Note Edited: 0084104 | View Revisions |
2016-02-12 11:03 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:27 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:31 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:41 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:47 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:55 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 11:58 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 12:10 | psanjuan | Note Edited: 0084104 | View Revisions |
2016-02-12 13:58 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 14:04 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-02-12 14:08 | psanjuan | Relationship added | related to 0032216 |
2016-02-12 14:16 | psanjuan | Note Added: 0084156 | |
2016-02-15 11:14 | hgbot | Checkin | |
2016-02-15 11:14 | hgbot | Note Added: 0084173 | |
2016-02-15 11:14 | hgbot | Status | scheduled => resolved |
2016-02-15 11:14 | hgbot | Resolution | open => fixed |
2016-02-15 11:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/1124bbf1942dde08141e010e1ab02b70fc9d64f1 [^] |
2016-02-15 11:14 | aferraz | Review Assigned To | => aferraz |
2016-02-15 11:14 | aferraz | Note Added: 0084175 | |
2016-02-15 11:14 | aferraz | Status | resolved => closed |
2016-02-15 11:14 | aferraz | Fixed in Version | => 3.0PR16Q2 |
2016-02-16 10:31 | psanjuan | Note Edited: 0084145 | View Revisions |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085136 |
Copyright © 2000 - 2009 MantisBT Group |