Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041024Openbravo ERP09. Financial managementpublic2019-05-28 17:192019-06-05 16:46
ngarcia 
nonofrancisco 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q1.23.0PR19Q1.2 
Sandrahuguet
Core
Production - Confirmed Stable
2017-10-10
3.0PR18Q1
https://code.openbravo.com/erp/devel/pi/rev/9cf1f8c7de280894eb268e310a732b3e61cd128d [^]
No
0041024: Cannot open Payment Execution form if there are more than 1000 payment methods
Cannot open Payment Execution form if there are more than 1000 payment methods
Log in with 'The White Valley Group Admin' role
Open the Payment Execution window
Check the following error is shown:
   "org.hibernate.exception.SQLGrammarException: could not execute query"
The log shows:
   
ERROR org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution - Error captured:
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
...
    at org.openbravo.dal.service.OBCriteria.list(OBCriteria.java:103) ~[OBCriteria.class:?]
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getFilteredPaymentMethods(AdvPaymentMngtDao.java:874) ~[AdvPaymentMngtDao.class:?]
    at org.openbravo.advpaymentmngt.utility.FIN_Utility.getPaymentMethodList(FIN_Utility.java:505) ~[FIN_Utility.class:?]
    at org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution.printPageDataSheet(BatchPaymentExecution.java:205) ~[BatchPaymentExecution.class:?]
    at org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution.doPost(BatchPaymentExecution.java:85) ~[BatchPaymentExecution.class:?]
The problem is in the addPaymentMethodList function of AdvPaymentMngtDao class. The following line is leaving the paymentMethods empty

paymentMethods.removeAll(paymentMethodsToRemove);

and the following instruction is not calculating the size correctly:

      paymentMethodsSize = paymentMethodsSize - 999;

so the following condition is included in the query:

or this_.Fin_Paymentmethod_ID in ()
No tags attached.
blocks defect 0040964 closed nonofrancisco Cannot open Payment Execution form if there are more than 1000 payment methods 
Issue History
2019-06-04 15:50nonofranciscoTypedefect => backport
2019-06-04 15:50nonofranciscoTarget Version => 3.0PR19Q1.2
2019-06-05 16:44hgbotCheckin
2019-06-05 16:44hgbotNote Added: 0112431
2019-06-05 16:44hgbotStatusscheduled => resolved
2019-06-05 16:44hgbotResolutionopen => fixed
2019-06-05 16:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/115d0e089e84f08e4950e402a07fa7b6af2c856c [^]
2019-06-05 16:44hgbotCheckin
2019-06-05 16:44hgbotNote Added: 0112432
2019-06-05 16:46SandrahuguetReview Assigned To => Sandrahuguet
2019-06-05 16:46SandrahuguetNote Added: 0112438
2019-06-05 16:46SandrahuguetStatusresolved => closed
2019-06-05 16:46SandrahuguetFixed in Version => 3.0PR19Q1.2

Notes
(0112431)
hgbot   
2019-06-05 16:44   
Repository: erp/backports/3.0PR19Q1.2
Changeset: 115d0e089e84f08e4950e402a07fa7b6af2c856c
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu May 30 11:36:20 2019 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/115d0e089e84f08e4950e402a07fa7b6af2c856c [^]

Fixes issue 41024: Fixes getting Filter by Payment Method

Avoids duplicates in list of payment method Id's.
Fixes the way the filter is build when there are more than 1000 payment methods
for filtering

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0112432)
hgbot   
2019-06-05 16:44   
Repository: erp/backports/3.0PR19Q1.2
Changeset: 398a4b82da1c980565d5d66c1abd534802cddd84
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Jun 05 16:17:24 2019 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/398a4b82da1c980565d5d66c1abd534802cddd84 [^]

related to issue 41024 reimplement the way to split the paymentMethods

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0112438)
Sandrahuguet   
2019-06-05 16:46   
code review + testing ok