Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039867Retail ModulesWeb POSpublic2019-01-02 14:072019-01-18 15:07
0039867: "Total Amount" button gets enabled before Line's "PriceRule" validations
While adding a service(pricerule based) to a ticket, "Total Amount" button gets enabled before the "PriceRule" validations(No price rule ranged defined).

So when there is delay in validation due to slow performance.

There is possibility to pay and process the order with improperly configured service line(Without price rule range defined).

In order.js,

In following function(OB.UTIL.getCalculatedPriceForService) there are validations(OBPOS_ErrorPriceRuleRangeNotFound) inside asynchronous blocks(OB.Dal.find()), therefore these validations will not restrict further flow(Enabling Total Amount Button).
In BackOffice:
           In Product Window
          Select Product "Warranty (deferrable -4 days)"
          Check "Is Price Rule Based"

          In Tab Price Rule Version
          Enter "Valid From Date"
          Select "Service Price Rule" of "Rule Type" - "Ranges" and Leave Ranges Tab Empty.
          Enter Minimum and Maximum as 1 and 1000 Respectively.


         Refer following video for steps, [^]

             In video for the first time when the server is fast "Price Rule Validation" appears.
             But in second time when the performance is slow, can able to process the payment before the "Price Rule Validation".
No tags attached.
Issue History
2019-01-02 14:07prakashmurugesan88New Issue
2019-01-02 14:07prakashmurugesan88Assigned To => Retail
2019-01-02 14:07prakashmurugesan88Triggers an Emergency Pack => No
2019-01-03 15:09rqueraltaAssigned ToRetail => rqueralta
2019-01-03 15:09rqueraltaStatusnew => scheduled
2019-01-10 03:24hgbotCheckin
2019-01-10 03:24hgbotNote Added: 0108876
2019-01-10 03:24hgbotStatusscheduled => resolved
2019-01-10 03:24hgbotResolutionopen => fixed
2019-01-10 03:24hgbotFixed in SCM revision => [^]
2019-01-10 17:04guilleaerNote Added: 0108908
2019-01-10 17:27hgbotCheckin
2019-01-10 17:27hgbotNote Added: 0108909
2019-01-18 15:06guilleaerReview Assigned To => guilleaer
2019-01-18 15:06guilleaerStatusresolved => closed
2019-01-18 15:07guilleaerFixed in Version => RR19Q2

2019-01-10 03:24   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 867a9b33faaa8001bcf57881601e4dec6c37ec85
Author: Rafael Queralta <rafaelcuba81 <at>>
Date: Tue Jan 08 22:15:41 2019 -0500
URL: [^]

Fixed issue 39867: "Total Amount" button gets enabled before Line's "PriceRule"

- Prevent the "Total Amount" button gets enabled by asynchronous calls
inside OB.UTIL.getCalculatedPriceForService function

M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js
2019-01-10 17:04   
First find should be also inside a process controller
2019-01-10 17:27   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d87cae6dadeb7a4daf3d61d5885386ca3df7e07a
Author: Rafael Queralta <rafaelcuba81 <at>>
Date: Thu Jan 10 11:19:59 2019 -0500
URL: [^]

Related to issue 39867: "Total Amount" button gets enabled before Line's
"PriceRule" validations

- Optimized calls to the start and finish functions

M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js