Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0033213 | Retail Modules | Web POS | public | 2016-06-06 15:05 | 2016-07-05 18:45 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | Retail | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | RR16Q2.1 | Fixed in Version | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | No | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0033213: CashCloseProcessor.createReconciliation missing limit 1 to find last created one (reads all) | |||||||||||
Description | The code in createReconciliation wants to read the last reconciliation (ordered b y date) but does not add any limit to query. so instead it loads all of the entries (for this account) instead of the single entry it needs. | |||||||||||
Steps To Reproduce | OBCriteria<FIN_Reconciliation> reconciliationsForAccount = OBDal.getInstance() .createCriteria(FIN_Reconciliation.class); reconciliationsForAccount.add(Restrictions.eq("account", account)); reconciliationsForAccount.addOrderBy("creationDate", false); List<FIN_Reconciliation> reconciliations = reconciliationsForAccount.list(); if (reconciliations.size() == 0) { startingBalance = account.getInitialBalance(); } else { startingBalance = reconciliations.get(0).getEndingBalance(); } | |||||||||||
Proposed Solution | add setMaxResults(1) | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-06-10 09:09 | marvintm | Type | defect => backport | |||||||||
2016-06-10 09:09 | marvintm | Target Version | => RR16Q2.1 | |||||||||
2016-06-10 10:49 | shuehner | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ee2aa06af166b613e26d63fa3ff302ffce35f4b8 [^] => | |||||||||
2016-06-13 16:29 | shuehner | Assigned To | shuehner => Retail | |||||||||
2016-07-05 10:11 | migueldejuana | Note Added: 0088195 | ||||||||||
2016-07-05 10:11 | migueldejuana | Status | scheduled => resolved | |||||||||
2016-07-05 10:11 | migueldejuana | Resolution | open => fixed | |||||||||
2016-07-05 18:45 | marvintm | Status | resolved => closed |
Notes | |||||
|
|||||
|
|