Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015719Openbravo ERP09. Financial managementpublic2011-01-11 18:002011-02-28 13:43
gmauleon 
dalsasua 
immediatemajoralways
closedfixed 
5
2.50MP25 
2.50MP26 
Core
No
0015719: Payment monitor process fails
In some special scenario the payment monitor is failling. See steps to reporduce
-Create a purchase invoice. For instance with amount 100€
-Create another purchase invoinces with the same amount but negative -100€
-Create a settlement incluiding both effects.
-In the same settlement include also some "Created payments"
-So in this scenario we have a pair of callcelled payment one calcelling the other and a some entries in the "created payments" tab
-Now return to the created invoices and try to launch the payment monitor process in the invoice header tab. Error image attached
-The main error come from the class payment monitor line 205 [1]. In this line is trying to divide something with cancelledNotPaidAmount (0 in this case)




[1] https://code.openbravo.com/erp/devel/main/file/67254b289f54/src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java#l205 [^]
No tags attached.
blocks defect 00156172.50MP26 closed dalsasua Payment monitor process fails 
diff fix15719.diff (2,069) 2011-01-27 17:23
https://issues.openbravo.com/file_download.php?file_id=3553&type=bug
Issue History
2011-01-20 18:29dalsasuaTypedefect => backport
2011-01-20 18:29dalsasuafix_in_branch => 2.50
2011-01-20 18:36dalsasuaNote Added: 0033798
2011-01-27 17:23dalsasuaFile Added: fix15719.diff
2011-01-27 17:23dalsasuaNote Added: 0033930
2011-02-01 12:12hgbotCheckin
2011-02-01 12:12hgbotNote Added: 0033981
2011-02-01 12:12hgbotStatusscheduled => resolved
2011-02-01 12:12hgbotResolutionopen => fixed
2011-02-01 12:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/00c537cdbb45620490b1da1ccdc3cc44fabfa30c [^]
2011-02-28 13:43adrianromeroNote Added: 0034420
2011-02-28 13:43adrianromeroStatusresolved => closed

Notes
(0033798)
dalsasua   
2011-01-20 18:36   
As part of the process of the payment monitor, system needs to determine whether a settlement is a cancellation settlement, or a transformation one. In the reported case, this cannot be determined, as it has got sum of canceled payments equals to zero, but do also have some created ones.
In order to fix the issue, I will consider this case, as a cancellation settlement, so debt is over, as we have all canceled payments sums zero.
(0033930)
dalsasua   
2011-01-27 17:23   
The bug is fixed since days ago, but repository is frozen. I attach the patch, just in case is useful.
(0033981)
hgbot   
2011-02-01 12:12   
Repository: erp/stable/2.50
Changeset: 00c537cdbb45620490b1da1ccdc3cc44fabfa30c
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Mon Jan 24 11:22:49 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/00c537cdbb45620490b1da1ccdc3cc44fabfa30c [^]

Fixes issue 15719: Payment monitor process fails.
If a payment monitor process founds a settlement where sum of the amounts of cancelled payments is zero, will interpretate that payment is paid

---
M src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java
---
(0034420)
adrianromero   
2011-02-28 13:43   
Verified.