Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039028Retail ModulesWeb POSpublic2018-07-24 13:042018-08-13 16:33
guilleaer 
ranjith_qualiantech_com 
normalcriticalhave not tried
closedfixed 
5
 
RR18Q2.2RR18Q2.2 
marvintm
Production - Confirmed Stable
2017-04-05
RR17Q3
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/741c14452bce [^]
No
0039028: Terminal with empty cache receives an error retrieving current cashup when it have all payment methods inactive
Login cannot be done in a terminal which match with the following conditions

a) Empty cache
b) Valid cashup (not processed)
c) Terminal should have several INACTIVE payment types (defined in POS terminal window)
c) Valid cashup should have a payment method cashup created for each inactive payment type

Under these circumstances, a null pointer exception is raised by org.openbravo.retail.posterminal.master.Cashup
Method: GetPayments

Below query results is null

      OBCriteria<OBPOSAppPayment> paymentAppMethodCriteria = OBDal.getInstance().createCriteria(
          OBPOSAppPayment.class);
      paymentAppMethodCriteria.add(Restrictions.eq(OBPOSAppPayment.PROPERTY_ID,
          paymentMethodJSON.get("paymentType")));
      OBPOSAppPayment paymentAppMethod = (OBPOSAppPayment) paymentAppMethodCriteria.uniqueResult();

Later on code tries to pick the lineNo field of the object created above which is null. It results in a NullPointerException

paymentMethodJSON.put("lineNo", paymentAppMethod.getLine());
Generate above scenario
Login
When a payment method cashup is connected with an inactive payment type, then lineNo should be 1
No tags attached.
blocks defect 0039026 closed ranjith_qualiantech_com Terminal with empty cache receives an error retrieving current cashup when it have all payment methods inactive 
Issue History
2018-07-24 13:07guilleaerTypedefect => backport
2018-07-24 13:07guilleaerTarget Version => RR18Q2.2
2018-07-26 09:05ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-07-30 12:37hgbotCheckin
2018-07-30 12:37hgbotNote Added: 0106013
2018-07-30 12:37hgbotStatusscheduled => resolved
2018-07-30 12:37hgbotResolutionopen => fixed
2018-07-30 12:37hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR18Q2.2/org.openbravo.retail.posterminal/rev/8aea5aa424c2a7af8cf590d9a3049902920c9e4d [^]
2018-08-13 16:33marvintmReview Assigned To => marvintm
2018-08-13 16:33marvintmStatusresolved => closed
2018-08-13 16:33marvintmFixed in Version => RR18Q2.2

Notes
(0106013)
hgbot   
2018-07-30 12:37   
Repository: retail/backports/3.0RR18Q2.2/org.openbravo.retail.posterminal
Changeset: 8aea5aa424c2a7af8cf590d9a3049902920c9e4d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jul 30 16:06:56 2018 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR18Q2.2/org.openbravo.retail.posterminal/rev/8aea5aa424c2a7af8cf590d9a3049902920c9e4d [^]

Fixed issue 39028 : Validate Invalid Payment Method while retrieving Cashup

* For generating Payment Method lineNo while retrieving cashup, if Payment Method is not available then it should be replaced with one

---
M src/org/openbravo/retail/posterminal/master/Cashup.java
---