Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037593Retail ModulesWeb POSpublic2018-01-08 11:512018-03-08 13:11
asiermartirena 
asiermartirena 
highmajoralways
closedfixed 
5
 
RR18Q2 
marvintm
No
0037593: Services checks are affecting the Web POS even if there are no services in a ticket
Any change in a ticket is launching some checks for services (quantity rules, services removal, services returns, etc.) that are occurring even if there are no services added to a ticket. This checks are affecting in performance to the Web POS, especially in big tickets, because each line, it's quantities, it's related lines and it's related lines quantities must be reviewed for every check.

It would be a good practice to know when a ticket contains a service, and only in that situation execute the checks (that are mandatory to maintain the services consistency).
Open the Web POS.

Add an avalanche transceiver.

The services checks are executed (WRONG).
No tags attached.
Issue History
2018-01-08 11:51asiermartirenaNew Issue
2018-01-08 11:51asiermartirenaAssigned To => asiermartirena
2018-01-08 11:51asiermartirenaTriggers an Emergency Pack => No
2018-01-17 09:57hgbotCheckin
2018-01-17 09:57hgbotNote Added: 0101742
2018-01-17 09:57hgbotStatusnew => resolved
2018-01-17 09:57hgbotResolutionopen => fixed
2018-01-17 09:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6aab63d063481081ca91ff225dec332e9f446a3c [^]
2018-02-02 17:20dmitry_mezentsevNote Added: 0102158
2018-03-08 13:11marvintmReview Assigned To => marvintm
2018-03-08 13:11marvintmStatusresolved => closed
2018-03-08 13:11marvintmFixed in Version => RR18Q2

Notes
(0101742)
hgbot   
2018-01-17 09:57   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6aab63d063481081ca91ff225dec332e9f446a3c
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Jan 09 10:55:13 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6aab63d063481081ca91ff225dec332e9f446a3c [^]

Fixed issue 37593: Avoid unnecessary services checks.

A new property 'hasServices' has been created in the order, which tells if an order contains any service that is related to a product. Each time a quantity rule or any check that affects to services should be executed, this property is checked and the check is done only for those tickets that contain a service.

This property is set when creating services lines, and is removed when deleting the services lines from the ticket.

Additionally, the duplicated code executed to check if services can be returned has been improved to be better in performance and more readable and also has been moved to the order.js, creating a function to avoid the duplicated code and having the business logic in the correct file.

---
M web/org.openbravo.retail.posterminal/js/components/order.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js
---
(0102158)
dmitry_mezentsev   
2018-02-02 17:20   
Ping.
Not closed for 16 days!