Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042536Retail ModulesWeb POSpublic2019-12-12 12:302019-12-19 08:58
asiermartirena 
ranjith_qualiantech_com 
highmajorunable to reproduce
closedfixed 
5
 
RR20Q1 
marvintm
No
0042536: Import entries are set as Error for some deleted orders
Having the 'Save removed ticket' preference enabled, some import entries of type 'Order' are not correctly processed and are set as 'Error' status.
This happens because the synchronized order is an order that has been sent with wrong value (example):

    {
      "hasbeenpaid": "Y",
      "isbeingprocessed": "N",
      "id": "12F74F8332B7F06CE17584DDA8B77689",
      "client": null,
      "organization": null,
      "createdBy": null,
      "updatedBy": null,
      "documentType": null,
      "orderType": 0,
      "generateInvoice": false,
      "isQuotation": false,
      "oldId": null,
      "priceList": null,
      "priceIncludesTax": null,
      "currency": null,
      "currency$_identifier": null,
      "session": null,
      "warehouse": null,
      "salesRepresentative": null,
      "salesRepresentative$_identifier": null,
      "posTerminal": null,
      "posTerminal$_identifier": null,
      "orderDate": "2019-12-11T10:31:48.625Z",
      "creationDate": "2019-12-11T10:32:07.901Z",
      "documentnoPrefix": -1,
      "quotationnoPrefix": -1,
      "returnnoPrefix": -1,
      "documentnoSuffix": -1,
      "quotationnoSuffix": -1,
      "returnnoSuffix": -1,
      "documentNo": "",
      "bp": null,
      "lines": [],
      "orderManualPromotions": [],
      "payments": [],
      "payment": 0,
      "paymentWithSign": 0,
      "change": 0,
      "qty": 0,
      "gross": 0,
      "net": 0,
      "taxes": {},
      "description": "",
      "print": true,
      "sendEmail": false,
      "isPaid": false,
      "creditAmount": 0,
      "paidPartiallyOnCredit": false,
      "paidOnCredit": false,
      "isLayaway": false,
      "isEditable": true,
      "openDrawer": false,
      "totalamount": null,
      "approvals": [],
      "isPartiallyDelivered": false,
      "isModified": false,
      "obposPrepaymentamt": 0,
      "obposPrepaymentlimitamt": 0,
      "obposPrepaymentlaylimitamt": 0,
      "timezoneOffset": -60,
      "created": 1576060327901,
      "obposCreatedabsolute": "2019-12-11 11:32:07.901",
      "obposIsDeleted": true,
      "obposAppCashup": "D2FB3D710BC5184CADAE5A29E64C2F75"
    }

This order shouldn't had been synchronized. A validation should be added in the Web POS to avoid to synchronize those deleted tickets without the 'posTerminal' or other mandatory properties (like the 'documentNo').

In addition, instead of generating an error while importing, the c_import_entry record is set as 'Error'. This happens because when trying to read the posTerminal value of the message, instead of taking from the message properties it tries to take from the order object inside the message, which in this case doesn't have the needed 'posTerminal' property.

Two errors:
 - Avoid to synchronize dummy orders.
 - In the import entry, the terminal property should be read from the message, not from the order inside the message.
Not clear steps to reproduce.
No tags attached.
Issue History
2019-12-12 12:30asiermartirenaNew Issue
2019-12-12 12:30asiermartirenaAssigned To => Retail
2019-12-12 12:30asiermartirenaResolution time => 1577314800
2019-12-12 12:30asiermartirenaTriggers an Emergency Pack => No
2019-12-13 12:58ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-12-13 12:58ranjith_qualiantech_comStatusnew => scheduled
2019-12-16 07:48hgbotCheckin
2019-12-16 07:48hgbotNote Added: 0116325
2019-12-16 07:48hgbotStatusscheduled => resolved
2019-12-16 07:48hgbotResolutionopen => fixed
2019-12-16 07:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/eb4069b1de6086f128a549633e7a5171a10735d8 [^]
2019-12-19 08:58marvintmReview Assigned To => marvintm
2019-12-19 08:58marvintmNote Added: 0116420
2019-12-19 08:58marvintmStatusresolved => closed
2019-12-19 08:58marvintmFixed in Version => RR20Q1

Notes
(0116325)
hgbot   
2019-12-16 07:48   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: eb4069b1de6086f128a549633e7a5171a10735d8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Dec 16 12:18:19 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/eb4069b1de6086f128a549633e7a5171a10735d8 [^]

Fixed issue 42536 : Update ImportEntry Event Handler to fetch the terminal from message

* Terminal should be fetched from request message instead of data message

---
M src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
---
(0116420)
marvintm   
2019-12-19 08:58   
The pos terminal will now be read from the message if it exists. The rest of the validations were already implemented in previous issues.