Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026082Openbravo ERP09. Financial managementpublic2014-03-25 14:162014-05-08 13:45
psanjuan 
Sandrahuguet 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
 
Internet Explorer
Core
No
0026082: A very ugly error is shown after reactivating a payment in/out of a sales/purchase invoice including CASH VAT
A very ugly error is shown after reactivating a payment in/out of a sales/purchase invoice including CASH VAT.

It is fine that Openbravo does not allow to reactivate a payment in/out of a sales/purchase invoice, because payment in/out information is now included in the VAT books (issued and received invoice books).

What needs to be improved is the error message which now is:

ERROR: update or delete on table "c_invoicetax_cashvat" violates foreign key constraint "obirb_invbline_cinvtaxcvat_fk" on table "obirb_invbookline" Detail: Key (c_invoicetax_cashvat_id)=(41E8CB9147684C9F8A4DE6F254293703) is still referenced from table "obirb_invbookline".

Set F&B España Organization as a Cash VAT organization and as Double Cash Criteria.

Make sure that you have install and applied below modules:
Cash VAT Spain Taxes
Invoice Register Books
Configuración de los Libros Facturas 2014
Configuración de los Libros Facturas 2014 IVA de Caja

Navigate to the purchase invoice window and create a new purchase invoice for any product. This purchase invoice can be dated on January 2014 for instance.

Make sure that the VAT tax rate selected is a CASH VAT rate.

Complete and Post the invoice

Add a payment of that invoice dated on February 2014. Post the payment.

Navigate to the Invoice Register Book window and create a new one for F&B España
the name of the book could be "Libro de facturas recibidas Enero 2014", select
"Libro de Facturas Recibidas 2014" and 2014 year, and Jan-14 as from period to period.

Create the book and realize that the purchase invoice just created is in the book and no information is filled in the columns:
payment/collection date
amount paid/collected
payment method
and bank

Create a new book for F&B España, this time for February period.
the name of the book could be "Libro de facturas recibidas Febrero 2014", select "Libro de Facturas Recibidas 2014" and 2014 year, and Feb-14 as from period to period.

Create the book and realize that the purchase invoice just created is in the book together with the payment information in below columns:
payment/collection date
amount paid/collected
payment method
and bank

Go back to the payment out window and get the payment unposted.
Try now to reactivate it.
You will get the error, which is fine but it should be a more intuitive error.

This error will not be shown whenever the invoice line and therefore the payment information is removed from February Invoice Received book.
The error should say something like:

"It is not possible to reactive a payment which is included in an Invoice Register Book. Please remove the payment information from the book by removing the invoice lines linked to the payment from the corresponding book.

Note that whenever you create the same book once again, the corresponding invoice lines will be included once again in the book together with the payment information if the invoice is paid/collected"
No tags attached.
related to design defect 0026492 closed vmromanos Localization Pack: Spain Payment information should be shown only in one line in the Invoice Register Books. 
png error_reactivate_paymentIn.png (109,574) 2014-03-25 14:16
https://issues.openbravo.com/file_download.php?file_id=6773&type=bug
png

png error_reactivate_paymentout.png (135,232) 2014-03-25 14:17
https://issues.openbravo.com/file_download.php?file_id=6774&type=bug
png
Issue History
2014-03-25 14:16psanjuanNew Issue
2014-03-25 14:16psanjuanAssigned To => dmiguelez
2014-03-25 14:16psanjuanWeb browser => Internet Explorer
2014-03-25 14:16psanjuanModules => Core
2014-03-25 14:16psanjuanTriggers an Emergency Pack => No
2014-03-25 14:16psanjuanFile Added: error_reactivate_paymentIn.png
2014-03-25 14:17psanjuanFile Added: error_reactivate_paymentout.png
2014-03-25 14:25psanjuanWeb browserInternet Explorer => Internet Explorer
2014-03-25 14:25psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5616#r5616
2014-03-25 14:30psanjuanWeb browserInternet Explorer => Internet Explorer
2014-03-25 14:30psanjuanProposed Solution updated
2014-03-25 14:36psanjuanWeb browserInternet Explorer => Internet Explorer
2014-03-25 14:36psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5617#r5617
2014-03-25 14:36psanjuanProposed Solution updated
2014-04-23 09:30hgbotCheckin
2014-04-23 09:30hgbotNote Added: 0066546
2014-04-23 09:30hgbotStatusnew => resolved
2014-04-23 09:30hgbotResolutionopen => fixed
2014-04-23 09:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.invoicesregisterbook/rev/3987c98f9dcdff1bd9ca7a91818540899c958a41 [^]
2014-04-23 09:37hgbotCheckin
2014-04-23 09:37hgbotNote Added: 0066548
2014-05-07 18:12hudsonbotCheckin
2014-05-07 18:12hudsonbotNote Added: 0066963
2014-05-08 12:24SandrahuguetAssigned Todmiguelez => Sandrahuguet
2014-05-08 13:45psanjuanWeb browserInternet Explorer => Internet Explorer
2014-05-08 13:45psanjuanNote Added: 0067024
2014-05-08 13:45psanjuanStatusresolved => closed
2014-05-08 13:46psanjuanRelationship addedrelated to 0026492

Notes
(0066546)
hgbot   
2014-04-23 09:30   
Repository: erp/pmods/org.openbravo.module.invoicesregisterbook
Changeset: 3987c98f9dcdff1bd9ca7a91818540899c958a41
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Apr 23 09:30:00 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.invoicesregisterbook/rev/3987c98f9dcdff1bd9ca7a91818540899c958a41 [^]

Fixed bug 26082 A very ugly error is shown after reactivating a payment including CASH VAT

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_MODULE.xml
---
(0066548)
hgbot   
2014-04-23 09:37   
Repository: erp/devel/pi
Changeset: bb6effdf978997a28e6c99260e6cba4f8d8b2c47
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Apr 22 18:24:23 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bb6effdf978997a28e6c99260e6cba4f8d8b2c47 [^]

Related to issue 26082 reactivate and delete lines not shown a correct message

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0066963)
hudsonbot   
2014-05-07 18:12   
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/02ca2648bcdc [^]
Maturity status: Test
(0067024)
psanjuan   
2014-05-08 13:45   
fixed and working