Openbravo Issue Tracking System - Retail Modules
View Issue Details
0026118Retail ModulesWeb POSpublic2014-03-28 11:072014-12-16 22:29
migueldejuana 
Osmany 
normalminoralways
closedfixed 
5
 
RR15Q1 
mtaal
No
0026118: When we are in Multiorders if we press F5 we get an error.
When we are in Multiorders if we press F5 we get an error.
When we are in Multiorders if we press F5 we get an error.
No tags attached.
has duplicate defect 0028057 closed migueldejuana Undefined js error when refreshing page from pay open tickets 
has duplicate defect 0026032 closed marvintm If we are in multiorder window and we pres F5 we get an error 
Issue History
2014-03-28 11:07migueldejuanaNew Issue
2014-03-28 11:07migueldejuanaAssigned To => migueldejuana
2014-03-28 11:07migueldejuanaTriggers an Emergency Pack => No
2014-12-15 10:17mtaalRelationship addedhas duplicate 0028057
2014-12-15 17:29mario_castelloAssigned Tomigueldejuana => mario_castello
2014-12-16 15:02OsmanyAssigned Tomario_castello => Osmany
2014-12-16 15:04hgbotCheckin
2014-12-16 15:04hgbotNote Added: 0072556
2014-12-16 15:04hgbotStatusnew => resolved
2014-12-16 15:04hgbotResolutionopen => fixed
2014-12-16 15:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8e536acea0d11d6213bbb5cececd1221da37aef [^]
2014-12-16 16:02mtaalNote Added: 0072559
2014-12-16 16:02mtaalStatusresolved => new
2014-12-16 16:02mtaalResolutionfixed => open
2014-12-16 16:17OsmanyNote Added: 0072561
2014-12-16 16:24mtaalNote Added: 0072563
2014-12-16 20:26hgbotCheckin
2014-12-16 20:26hgbotNote Added: 0072575
2014-12-16 20:26hgbotStatusnew => resolved
2014-12-16 20:26hgbotResolutionopen => fixed
2014-12-16 20:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8e536acea0d11d6213bbb5cececd1221da37aef [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/929aa6ebf814eed09d87773bf6891754bb94c314 [^]
2014-12-16 22:29mtaalReview Assigned To => mtaal
2014-12-16 22:29mtaalNote Added: 0072580
2014-12-16 22:29mtaalStatusresolved => closed
2014-12-16 22:29mtaalFixed in Version => RR15Q1
2014-12-17 16:52mtaalRelationship addedhas duplicate 0026032

Notes
(0072556)
hgbot   
2014-12-16 15:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f8e536acea0d11d6213bbb5cececd1221da37aef
Author: Osmany Garcia Machado <osmany.machado <at> peoplewalking.com>
Date: Tue Dec 16 08:03:26 2014 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8e536acea0d11d6213bbb5cececd1221da37aef [^]

Fixed issue 26118: When we are in Multiorders if we press F5 we get an error.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0072559)
mtaal   
2014-12-16 16:02   
Hi,
Was checking it, but the code change means that the if this.receipt is null then it will end up in the else of the if-statement.

Is this indeed what you intend?
So instead of this:
    if (!isMultiOrders && !_.isNull(this.receipt)) {
      this.receipt.selectedPayment = payment.payment.searchKey;
      paymentstatus = this.receipt.getPaymentStatus();
    } else {
      this.model.get('multiOrders').set('selectedPayment', payment.payment.searchKey);
      paymentstatus = this.model.get('multiOrders').getPaymentStatus();
    }

I would do this:

if (!_.isNull(this.receipt)) {
    if (!isMultiOrders) {
      this.receipt.selectedPayment = payment.payment.searchKey;
      paymentstatus = this.receipt.getPaymentStatus();
    } else {
      this.model.get('multiOrders').set('selectedPayment', payment.payment.searchKey);
      paymentstatus = this.model.get('multiOrders').getPaymentStatus();
    }
}
(0072561)
Osmany   
2014-12-16 16:17   
Hi, I like idea, but if we do this:

    if (!isMultiOrders) {
       if (!_.isNull(this.receipt)) {
        this.receipt.selectedPayment = payment.payment.searchKey;
        paymentstatus = this.receipt.getPaymentStatus();
       }
    } else {
      this.model.get('multiOrders').set('selectedPayment', payment.payment.searchKey);
      paymentstatus = this.model.get('multiOrders').getPaymentStatus();
    }
What do you think?
Regards.
(0072563)
mtaal   
2014-12-16 16:24   
yes I guess this is best, can you try it and if it works push the change?

I will then close the issue.
(0072575)
hgbot   
2014-12-16 20:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 929aa6ebf814eed09d87773bf6891754bb94c314
Author: Osmany Garcia Machado <osmany.machado <at> peoplewalking.com>
Date: Tue Dec 16 13:25:57 2014 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/929aa6ebf814eed09d87773bf6891754bb94c314 [^]

Fixed issue 26118: Validation of paymentstatus and requiredCash when are undefined, because the receipt is null

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0072580)
mtaal   
2014-12-16 22:29   
Reviewed and tested