Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047396Retail ModulesWeb POSpublic2021-07-14 17:022021-10-04 17:42
newno change required 
0047396: No ticket information arrives at the completeTicket post hook in stateAPI because it is reset before.
Some ticket information (documentNo, id ...) is removed in the removeTicket function before being stored in the new state and cannot be accessed in a postHook to manage it.
- In livebuilds 21q2 release
- Login to the pos
- Open the chrome developer tools
- Open the web/js/gen file in pretty print mode
- Put breakpoints on line 38418: ({ticketList: newTicketList, ticket: newTicket} = OB.App.State.TicketList.Utils.removeTicket(newTicketList, newTicket, payload));
and on line 38424: return newGlobalState;
-In the POS pay a product and select Done
-Check at the first breakpoint that the newTicket variable has the information of the ticket (such as documentNo) and select play button to resume script execution.
-Check at the second breakpoint that in the NewGlobalState.Ticket does not appears the ticket information because it was deleted in the removeTicket function.

As a result, the following postHooks cannot access the information of the ticket in the state.
No tags attached.
Issue History
2021-07-14 17:02Sergio_GomezNew Issue
2021-07-14 17:02Sergio_GomezAssigned To => Retail
2021-07-14 17:02Sergio_GomezTriggers an Emergency Pack => No
2021-07-14 17:34PracticsIssue Monitored: Practics
2021-10-04 17:42Sergio_GomezNote Added: 0132151
2021-10-04 17:42Sergio_GomezResolutionopen => no change required

2021-10-04 17:42   
Habitual behavior of the hook. The information of the last ticket can be accessed through the messages model.