Openbravo Issue Tracking System - Retail Modules
View Issue Details
0024241Retail ModulesWeb POSpublic2013-07-01 23:282013-07-16 15:31
jecharri 
guilleaer 
urgentmajoralways
closedfixed 
5
 
RMP25RMP25 
marvintm
No
0024241: Impossible to print the cash up report in the backend
Impossible to print the cash up report in the backend
-Create a cash up with two transactions with with the same g/L item as the "G/L Item for Cash drop/deposit" of the payment method.

You will get an error in java code:
filemodules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/ad_reports/CashUpReport.java --> line 382

Change:
if (!cashToDepositQuery.list().isEmpty()) {
  cashToDeposit = (BigDecimal) cashToDepositQuery.list().get(0);
} else {
  cashToDeposit = BigDecimal.ZERO;
}

to

if (!cashToDepositQuery.list().isEmpty()) {
  Iterator iter = cashToDepositQuery.iterate();
  while (iter.hasNext()){
    cashToDeposit = cashToDeposit.add((BigDecimal) iter.next());
  }
} else {
  cashToDeposit = BigDecimal.ZERO;
}
No tags attached.
Issue History
2013-07-01 23:28jecharriNew Issue
2013-07-01 23:28jecharriAssigned To => marvintm
2013-07-01 23:28jecharriResolution time => 1375567200
2013-07-03 15:16guilleaerAssigned Tomarvintm => guilleaer
2013-07-05 16:21guilleaerNote Added: 0059905
2013-07-08 12:21guilleaerNote Added: 0059912
2013-07-08 15:19hgbotCheckin
2013-07-08 15:19hgbotNote Added: 0059913
2013-07-08 15:19hgbotStatusnew => resolved
2013-07-08 15:19hgbotResolutionopen => fixed
2013-07-08 15:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/058b83730d13cae2cf93b123fd243f8439740724 [^]
2013-07-08 15:19hgbotCheckin
2013-07-08 15:19hgbotNote Added: 0059914
2013-07-08 15:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/058b83730d13cae2cf93b123fd243f8439740724 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/722cf0fbb2a86d426baed0df8176ca495e084ad2 [^]
2013-07-08 15:26hgbotCheckin
2013-07-08 15:26hgbotNote Added: 0059926
2013-07-08 15:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/722cf0fbb2a86d426baed0df8176ca495e084ad2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/058b83730d13cae2cf93b123fd243f8439740724 [^]
2013-07-08 15:26hgbotCheckin
2013-07-08 15:26hgbotNote Added: 0059927
2013-07-08 15:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/058b83730d13cae2cf93b123fd243f8439740724 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/722cf0fbb2a86d426baed0df8176ca495e084ad2 [^]
2013-07-16 15:31marvintmReview Assigned To => marvintm
2013-07-16 15:31marvintmStatusresolved => closed
2013-07-16 15:31marvintmFixed in Version => RMP25

Notes
(0059905)
guilleaer   
2013-07-05 16:21   
This issue is happening because a wrong configuration. GL Item for cash up should be used only for this proposal.

If other transaction are using the same gl item the problem happens.
(0059912)
guilleaer   
2013-07-08 12:21   
final Proposed solution:

Try to not fail adding the amount of transaction but informing about the error to the user.

Also try to validate GL items, to ensure that Cash up GL item is unique.
(0059913)
hgbot   
2013-07-08 15:19   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 058b83730d13cae2cf93b123fd243f8439740724
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 08 14:28:59 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/058b83730d13cae2cf93b123fd243f8439740724 [^]

fixed issue 24241: [part1] if more tha one transaction with the cashup gl item are found for a defined reconciliation, cash up report is printed and a warn is shown in the log of openbravo

---
M src/org/openbravo/retail/posterminal/ad_reports/CashUpReport.java
---
(0059914)
hgbot   
2013-07-08 15:19   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 722cf0fbb2a86d426baed0df8176ca495e084ad2
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 08 15:18:59 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/722cf0fbb2a86d426baed0df8176ca495e084ad2 [^]

fixed issue 24241: [part2] Validate using triggers that G/L items used by a payment method are different for each event

---
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-db/database/model/triggers/OBPOS_APP_PAYMENT_UNIQUEGL.xml
---
(0059926)
hgbot   
2013-07-08 15:26   
Repository: erp/pmods/org.openbravo.retail.posterminal.multiorder
Changeset: 058b83730d13cae2cf93b123fd243f8439740724
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 08 14:28:59 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/058b83730d13cae2cf93b123fd243f8439740724 [^]

fixed issue 24241: [part1] if more tha one transaction with the cashup gl item are found for a defined reconciliation, cash up report is printed and a warn is shown in the log of openbravo

---
M src/org/openbravo/retail/posterminal/ad_reports/CashUpReport.java
---
(0059927)
hgbot   
2013-07-08 15:26   
Repository: erp/pmods/org.openbravo.retail.posterminal.multiorder
Changeset: 722cf0fbb2a86d426baed0df8176ca495e084ad2
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 08 15:18:59 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/722cf0fbb2a86d426baed0df8176ca495e084ad2 [^]

fixed issue 24241: [part2] Validate using triggers that G/L items used by a payment method are different for each event

---
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-db/database/model/triggers/OBPOS_APP_PAYMENT_UNIQUEGL.xml
---