Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033996Retail ModulesWeb POSpublic2016-09-14 18:352016-09-25 11:51
daniOpenbravo 
mtaal 
highmajoralways
closedfixed 
3014.04
 
RR16Q4 
OBPS
No
0033996: [STORE SERVER] Pay open tickets functionality is too poor.
Pay Open tickets functionality performance is too poor (it takes a long time to pay only 3 tickets and even the process kills google chrome session)
1. Log in Web POS.
2. Create a ticket adding some product: ticket1.
3. Click on * icon in order to add a new ticket.
4. Create a ticket adding some product: ticket2.
5. Click on * icon in order to add a new ticket.
6. Create a ticket adding some product: ticket3.
7. Go to menu dropdown and select pay open tickets.
8. Select the 3 previous tickets.
9. Click on the amount button in order to pay those 3 tickets.
10. Realize that it takes too much time to pay those 3 tickets and google chrome´s session is blocked. Wait until all tickets are synchronized (it will take some minutes).
SER-QA
caused by defect 0034045 closed mtaal The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance 
Issue History
2016-09-14 18:35daniOpenbravoNew Issue
2016-09-14 18:35daniOpenbravoAssigned To => mtaal
2016-09-14 18:35daniOpenbravoOBNetwork customer => Yes
2016-09-14 18:35daniOpenbravoResolution time => 1474408800
2016-09-14 18:35daniOpenbravoTriggers an Emergency Pack => No
2016-09-14 18:38daniOpenbravoTag Attached: SER-QA
2016-09-14 18:38daniOpenbravoIssue Monitored: daniOpenbravo
2016-09-20 00:30mtaalNote Added: 0090093
2016-09-20 00:30mtaalStatusnew => closed
2016-09-20 00:30mtaalResolutionopen => invalid
2016-09-21 17:24daniOpenbravoNote Added: 0090142
2016-09-21 17:24daniOpenbravoStatusclosed => new
2016-09-21 17:24daniOpenbravoResolutioninvalid => open
2016-09-25 11:50mtaalStatusnew => scheduled
2016-09-25 11:50mtaalNote Added: 0090227
2016-09-25 11:50mtaalStatusscheduled => resolved
2016-09-25 11:50mtaalFixed in Version => RR16Q4
2016-09-25 11:50mtaalResolutionopen => fixed
2016-09-25 11:51mtaalRelationship addedcaused by 0034045
2016-09-25 11:51mtaalNote Added: 0090228
2016-09-25 11:51mtaalStatusresolved => closed

Notes
(0090093)
mtaal   
2016-09-20 00:30   
The reason that it takes soo long time is that underlying a javascript error occurs.

The error is in this file:
fr.phidias.openbravo.but.monetique/js/hooks/hookPreOrderSave.js

There is this code [1]. It fails on the last line in that code snippet as receipt is only an empty object. It seems that the receipt variable must be set to args.model.get('order'), this seems to have the correct value.

This issue must be solved by the respective module owner/developer.


[1]
    OB.UTIL.HookManager.registerHook('OBPOS_PreOrderSave', function(args, callbacks) {
        var receipt = args.context.receipt || {};
        var continuation = function() {
            OB.UTIL.HookManager.callbackExecutor(args, callbacks);
        }
        ;
        if (args.model && args.model.get('order') && args.model.get('order').get('obposIsDeleted')) {
            continuation();
            return;
        }
        OB.Dal.find(OB.Model.GiftCard, {
            giftCardType: PHBUTPG.GiftCardTypes.GIFTCARD,
            phbutGiftCardSubtype: PHBUTPG.GiftCardSubtypes.LASER
        }, function(result) {
            var giftcard_ids = result.models.map(function(item) {
                return item.get('id');
            });
            var giftcard_lines = receipt.get('lines').filter(function(line) {
(0090142)
daniOpenbravo   
2016-09-21 17:24   
After talking to AZA, it seems a SS issue finally, so re-opened.
(0090227)
mtaal   
2016-09-25 11:50   
Resolved by commit of related issue
(0090228)
mtaal   
2016-09-25 11:51   
Closing as there is already a related more precise issue entered and resolved.