Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020798Openbravo ERP09. Financial managementpublic2012-06-19 10:372012-06-19 17:08
mirurita 
eduardo_Argal 
highminoralways
closedno change required 
20Community Appliance
pi 
 
Advanced Payables and Receivables Mngmt
No
0020798: Reactivate Payment: TADPI.FIN_PAYMENT_ORIGSCHEDDETAIL violated - child record found
Configure the payment method of the invoice to generate automatically the payment.
Put in the same invoice two orders and complete the invoice.
If you reactivate this payment and then try to generate credit reusing the same payment it fails (see attached screenshot).

Caused by: java.sql.BatchUpdateException: ORA-02292: integrity constraint (TADPI.FIN_PAYMENT_ORIGSCHEDDETAIL) violated - child record found

    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10296)
    at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:216)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
1) Create a Sales Order (SO1) for Alimentos. Total= 46.5€
2) Create a Sales Order (SO2) for Alimentos. Total= 4.9€
3) Configure payment method for Alimentos to create automatically the payment when completing the invoice.
4) Create a Sales Invoice (SI1) for Alimentos. Invoice both orders. Total= 51.4€
5) Complete the Invoice
6) Reactivate automatically created payment
7) Click on add details button
8) Unmark the selected lines in the grid. The total amount will be left as credit.
9) Click Process button
See attached screenshot
No tags attached.
related to defect 0020771 closed naiaramartinez Automatic payment completing the invoice: two orders in same invoice creates incorrect payment 
png Reactivate Payment orig error.png (11,211) 2012-06-19 10:37
https://issues.openbravo.com/file_download.php?file_id=5305&type=bug
png
Issue History
2012-06-19 10:37miruritaNew Issue
2012-06-19 10:37miruritaAssigned To => eduardo_Argal
2012-06-19 10:37miruritaFile Added: Reactivate Payment orig error.png
2012-06-19 10:37miruritaModules => Advanced Payables and Receivables Mngmt
2012-06-19 17:08eduardo_ArgalRelationship addedrelated to 0020771
2012-06-19 17:08eduardo_ArgalNote Added: 0049928
2012-06-19 17:08eduardo_ArgalStatusnew => closed
2012-06-19 17:08eduardo_ArgalResolutionopen => no change required

Notes
(0049928)
eduardo_Argal   
2012-06-19 17:08   
Bug was present due to a wrong behavior in invoice processing (payment generation)