Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040509Retail ModulesDiscount Matrix Managementpublic2019-04-02 17:422019-04-15 13:35
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q3 
adrianromero
No
0040509: Deleted orders go to Errors While Importing POS Data if they have a range discount approval
Deleted orders go to Errors While Importing POS Data if they have a range discount approval.

The WRONG approval section includes the following:

"approvals": [{
    "approvalType": {
        "approval": "...",
        "message": "...",
        "params": ["..."]
    },
    "userContact": "...",
    "created": ...
}]

The RIGHT one is:

"approvals": [{
    "approvalType": "...",
    "userContact": "...",
    "created": ...,
    "approvalMessage": "..."
}]
In the backoffice:
   Set the 'Web POS Discount Matrix - Discount Approval' preference to Y for Openbravo user
   Set the 'Web POS Save Removed Tickets' preference to Y
   Set a Range Discount to VallBlancaUser:
      Discount from: 0
      Discount to: 100
      Approval required: Y

In the POS:
   Create a new ticket
   Add a product to it
   Reduce it's price
   Approve it with Openbravo user
   Delete the ticket

In the backoffice:
   Check the order is stuck in Errors While Importing POS Data with the following error message:
      org.openbravo.base.exception.OBException: Error in OrderLoader: approvalType: Property OBPOS_Order_Approval.approvalType only allows instances of java.lang.String but the value is an instanceof org.codehaus.jettison.json.JSONObject
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:443)
...
Caused by: org.openbravo.base.validation.ValidationException: approvalType: Property OBPOS_Order_Approval.approvalType only allows instances of java.lang.String but the value is an instanceof org.codehaus.jettison.json.JSONObject
    at org.openbravo.base.model.domaintype.BasePrimitiveDomainType.checkIsValidValue(BasePrimitiveDomainType.java:58)
...
No tags attached.
related to defect 0039570 new Retail ERROR org.openbravo.mobile.core.process.DataSynchronizationProcess - approvalType 
patch issue 40509 source posterminal.patch (1,227) 2019-04-03 14:54
https://issues.openbravo.com/file_download.php?file_id=12833&type=bug
Issue History
2019-04-02 17:42ngarciaNew Issue
2019-04-02 17:42ngarciaAssigned To => Retail
2019-04-02 17:42ngarciaResolution time => 1555970400
2019-04-02 17:42ngarciaTriggers an Emergency Pack => No
2019-04-02 17:43ngarciaRelationship addedrelated to 0039570
2019-04-02 18:11ngarciaIssue Monitored: networkb
2019-04-03 12:58ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-04-03 12:59ranjith_qualiantech_comStatusnew => scheduled
2019-04-03 14:54ranjith_qualiantech_comFile Added: issue 40509 source posterminal.patch
2019-04-08 11:38hgbotCheckin
2019-04-08 11:38hgbotNote Added: 0111014
2019-04-08 11:38hgbotStatusscheduled => resolved
2019-04-08 11:38hgbotResolutionopen => fixed
2019-04-08 11:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/30be70babd074d256f13ef5730ee94a42202137d [^]
2019-04-15 13:35adrianromeroReview Assigned To => adrianromero
2019-04-15 13:35adrianromeroNote Added: 0111134
2019-04-15 13:35adrianromeroStatusresolved => closed
2019-04-15 13:35adrianromeroFixed in Version => RR19Q3

Notes
(0111014)
hgbot   
2019-04-08 11:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 30be70babd074d256f13ef5730ee94a42202137d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Apr 08 15:08:29 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/30be70babd074d256f13ef5730ee94a42202137d [^]

Fixed issue 40509 : Update approval while deleting the receipt

* For custom approval message, approvalType will be json object instead of string.
  approvalType should be updated when deleting the receipt

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0111134)
adrianromero   
2019-04-15 13:35   
Verified