Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020399Openbravo ERP09. Financial managementpublic2012-05-03 12:302012-05-30 09:10
xabiermerino 
ioritzCia 
urgentmajoralways
closedfixed 
5
3.0MP10.1 
3.0MP12 
Advanced Payables and Receivables Mngmt
No
0020399: It is not possible delete a Payment depending its creation
You have a Payment method with automatic execution type and the field deferred unchecked. IE:

You create a POS Order with this payment method. A PL creates and completes the invoice, this is why it is not possible execute it. In this case a register is saved in the table aprm_pending_paymentinvoice.

Then, you reactivate the Payment but it is not possible delete it. This is the DB error:

ERROR: update or delete on table "fin_payment" violates foreign key constraint "aprm_pending_payinv_payment" on table "aprm_pending_paymentinvoice"

In other cases that the payment is created and executed automatically you are able to undo the steps (you can eliminate the transaction created, reactivate the payment and delete it)
- As admin create a payment method:
---> Payment In:
 * Automatic receipt checked
 * Automatic deposit checked
 * Execution type: automatic
 * Execution Process: Simple execution process
 * Deferred NOT checked

- Create a POS Order with this payment methodm and book it
- Go to the invoice created and navigate to the payment related
- Reactivate it
- Realize that you are not able to delete it
- This error apeears:
This record cannot be deleted because it is associated with other existing elements. Please see Linked Items

No tags attached.
Issue History
2012-05-03 12:30xabiermerinoNew Issue
2012-05-03 12:30xabiermerinoAssigned To => vmromanos
2012-05-03 12:30xabiermerinoModules => Advanced Payables and Receivables Mngmt
2012-05-03 12:30xabiermerinoResolution time => 1339020000
2012-05-03 12:30xabiermerinoIssue Monitored: networkb
2012-05-03 12:51miruritaAssigned Tovmromanos => jonalegriaesarte
2012-05-10 17:11ioritzCiaAssigned Tojonalegriaesarte => ioritzCia
2012-05-21 18:13ioritzCiaStatusnew => scheduled
2012-05-21 18:13ioritzCiafix_in_branch => pi
2012-05-28 13:41hgbotCheckin
2012-05-28 13:41hgbotNote Added: 0049366
2012-05-28 13:41hgbotStatusscheduled => resolved
2012-05-28 13:41hgbotResolutionopen => fixed
2012-05-28 13:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ceacf7881e5719f51399fd854e872f5032a55729 [^]
2012-05-29 03:27hudsonbotCheckin
2012-05-29 03:27hudsonbotNote Added: 0049392
2012-05-30 09:10xabiermerinoNote Added: 0049455
2012-05-30 09:10xabiermerinoStatusresolved => closed

Notes
(0049366)
hgbot   
2012-05-28 13:41   
Repository: erp/devel/pi
Changeset: ceacf7881e5719f51399fd854e872f5032a55729
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Mon May 21 17:16:25 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ceacf7881e5719f51399fd854e872f5032a55729 [^]

Fixes issue 20399: It is not possible delete a Payment depending its creation.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/tables/APRM_PENDING_PAYMENTINVOICE.xml
---
(0049392)
hudsonbot   
2012-05-29 03: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/ced2fdfb9aee [^]

Maturity status: Test
(0049455)
xabiermerino   
2012-05-30 09:10   
verified