Openbravo Issue Tracking System - POS2
View Issue Details
0051811POS2POSpublic2023-01-23 18:042023-03-09 08:12
javierRodriguez 
javierRodriguez 
normalmajorhave not tried
closedfixed 
5
 
22Q4.3 
No
0051811: Create a mechanism to detect that POS is working with a duplicated ticket id
After severals cases in production where the application is working with a brand new ticket which has a used id. This creates EWIs due to try to synchronise a ticket with duplicates ids.
In production, this problem appeared after an F5 (refresh) or after a delete ticket action.
This duplicated id should be checked:
- After an F5
- When a new ticket is set in Ticket state model

The application could have different scenarios when a ticket is set in the state. Ticket could be
- Processed tickets
- brand new tickets
- No-processed ticket which are in ticket list with products or payments on it.

It is necessary to take into account this different scenarios and do actions depending on them.
No tags attached.
blocks feature request 0051445 closed javierRodriguez Create a mechanism to detect that POS is working with a duplicated ticket id 
Issue History
2023-03-08 13:34javierRodriguezTypefeature request => backport
2023-03-08 13:34javierRodriguezTarget Version => 22Q4.3
2023-03-08 13:59hgbotNote Added: 0147384
2023-03-09 08:12hgbotResolutionopen => fixed
2023-03-09 08:12hgbotStatusscheduled => closed
2023-03-09 08:12hgbotFixed in Version => RR22Q4.3
2023-03-09 08:12hgbotNote Added: 0147399
2023-03-09 08:12hgbotNote Added: 0147400
2023-03-09 08:12hgbotNote Added: 0147401
2023-03-09 08:12hgbotNote Added: 0147402
2023-03-09 08:12hgbotNote Added: 0147403

Notes
(0147384)
hgbot   
2023-03-08 13:59   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1088 [^]
(0147399)
hgbot   
2023-03-09 08:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 75decaa80de0fcb0a07d2795ae79f9acab284b8d
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 08-03-2023 13:51:52
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/75decaa80de0fcb0a07d2795ae79f9acab284b8d [^]

Fixed ISSUE-51811: Check before load a local ticket if it is using a duplicated order id

- Extract paid receipt request to use in different places
- Create ticket utility function isOrderIdUsedInBackend to check duplicate order ids
- Create new action preparation in load local ticket action

---
M web-test/model/business-object/ticket-list/actions/LoadLocalTicket.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/LoadTicketUtils.js
---
(0147400)
hgbot   
2023-03-09 08:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 36f55ef428665491a2d9722505a040482b904e1e
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 08-03-2023 13:52:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/36f55ef428665491a2d9722505a040482b904e1e [^]

Related to ISSUE-51811: Ensure the is data in the paid receipt response

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/LoadTicketUtils.js
---
(0147401)
hgbot   
2023-03-09 08:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1088 [^]
(0147402)
hgbot   
2023-03-09 08:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: dcfcbda1227b555596de3c787196d822fc2d8a81
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 08-03-2023 13:53:08
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/dcfcbda1227b555596de3c787196d822fc2d8a81 [^]

Related to ISSUE-51811: Send by payload the information to create a new ticket if it is needed

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/ticketListUtils.js
---
(0147403)
hgbot   
2023-03-09 08:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: a8fb016123156ce6f1ec63d4dbce241b70fd193a
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 08-03-2023 13:53:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/a8fb016123156ce6f1ec63d4dbce241b70fd193a [^]

Related to ISSUE-51811: Fix how th ticket list is set depending on createNewTicket flow

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
---