Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042227Retail ModulesWeb POSpublic2019-11-07 17:422019-12-04 10:37
aferraz 
alekosmp86 
normalmajorhave not tried
closedfixed 
5
 
RR20Q1 
marvintm
No
0042227: Delete ticket is synchronized without id
When having "Web POS Save Removed Tickets" preference enabled and a ticket without lines is synchronized, an error is shown in browser console.

Also the json sent from Web POS and the json received in the Import Entry have differences in two properties: hasbeenpaid and id:

FrontEnd json (in OBPOS_PreSyncReceipt hook):
"HASBEENPAID": "N",
"ID": NULL

BackEnd json (in ImportEntry jsoninfo):
"HASBEENPAID": "Y",
"ID": "8687652B612A396F5EE666CE8267EE81"

This differences affect hash generation in French Fiscal module.
- In BackEnd:
Install French Fiscal module.
Enable Web POS Save Removed Tickets preference.

- In FrontEnd:
Let's say active ticket documentno is VBS1/0000001.
Click on New Receipt.
Now, current ticket should be VBS1/0000002.
Add any line and complete the ticket VBS1/0000002.
Now, current ticket should be VBS1/0000001.
Click on Delete Receipt.
Check following error is shown in browser console: [OB.Dal.save] Wrong model, it has no id. - Caller: Object.OB.Dal.saveInTransaction

- In BackEnd:
Realize ticket VBS1/0000002 appears in Sales Order window.
Realize ticket VBS1/0000001 appears in Sales Order window as isDeleted and with no information in Lines and Taxes tab.
Run Blockchain Verification process and check it fails for ticket VBS1/0000001.
No tags attached.
Issue History
2019-11-07 17:42aferrazNew Issue
2019-11-07 17:42aferrazAssigned To => Retail
2019-11-07 17:42aferrazTriggers an Emergency Pack => No
2019-11-07 18:01aferrazDescription Updatedbug_revision_view_page.php?rev_id=19627#r19627
2019-11-07 18:04javietxeIssue Monitored: javietxe
2019-11-07 18:04javietxeResolution time => 1574895600
2019-11-13 21:52alekosmp86Assigned ToRetail => alekosmp86
2019-11-13 21:53alekosmp86Statusnew => scheduled
2019-12-03 15:31hgbotCheckin
2019-12-03 15:31hgbotNote Added: 0116063
2019-12-03 15:31hgbotStatusscheduled => resolved
2019-12-03 15:31hgbotResolutionopen => fixed
2019-12-03 15:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/612eb5eb21e73163f61bca43cd9876465c92305e [^]
2019-12-04 10:37hgbotCheckin
2019-12-04 10:37hgbotNote Added: 0116080
2019-12-04 10:37marvintmReview Assigned To => marvintm
2019-12-04 10:37marvintmStatusresolved => closed
2019-12-04 10:37marvintmFixed in Version => RR20Q1

Notes
(0116063)
hgbot   
2019-12-03 15:31   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 612eb5eb21e73163f61bca43cd9876465c92305e
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Dec 02 14:10:32 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/612eb5eb21e73163f61bca43cd9876465c92305e [^]

Fixed issue 42227: Deleted ticket is not synchronized without id when preference
"Web POS Save Removed Tickets" is active

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0116080)
hgbot   
2019-12-04 10:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d8bed576cdde09b5f4530947a755de66579e8c84
Author: Antonio Moreno Perez <antonio.moreno <at> openbravo.com>
Date: Wed Dec 04 10:37:05 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d8bed576cdde09b5f4530947a755de66579e8c84 [^]

Related to issue 42227. It is not necessary (and in fact wrong) to check that the ticket has lines.
This specific part of the flow is designed to handle the case of the ticket not having lines. In this case the relevant thing to check if the ticket has id or not. If it doesn't, then it was never saved, and therefore we should consider it a non-relevant ticket, and therefore should not be saved as a removed ticket.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---