Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051883Retail ModulesWeb POSpublic2023-03-16 13:332023-03-17 17:45
aaroncalero 
alainperez 
highmajoralways
scheduledopen 
5
 
 
No
0051883: Services minimum and maximum limit prices for associated products is not working when lines are edited
Product Services in WebPOS allow configuring a minimum and maximum price for the associated products (i.e. you can only add a service to a product if the product line is between a minimum and a maximum amount).

Prior to 20q3 this configuration was linked to the 'Is Price Rule Based' configuration of the service, and limits were defined at Price Rule Version level. In 20q3, limits were moved to the main Product entity to simplify its use, and the limit check when searching for services was correctly adapted.

However, the check that is done when the product amounts change was not refactored and the code is still looking at the old columns in Price Rule Version.
in https://livebuilds.openbravo.com/retail_modules_pgsql_pi [^] environment:
Preliminary configuration:
* Go to Service Price Rule window and create a new record. Add a name and leave the rest of parameters by default.
* Go to the Product window, find the Configuration service.
  * Check the Is Price Rule Based flag.
  * Define a Maximum Price for Associated Product of 200 and a Minimum of 100
  * Go to the Price Rule Version tab and add the Price Rule defined on the previous step.
  
Steps:
Log in in WebPOS to the VBS-1 terminal
Add a GPS Nano to the ticket.
Since the price of the product by default is 100, the Configuration service will be shown as it is mandatory. Continue without adding the service.
Manually change the price of the GPS Nano to 50, click on the services button and verify that the list is now empty.
Change the price back to 100, repeat the process and this time add the service.
Change the price of the GPS Nano again to 50 and verify that the service remains on the ticket, even if it's not valid anymore.
The max and min limits used here [1] to check if services need to be removed should be calculated based on the Product configuration, and not based on the configuration of the price rule version, which was deprecated in 20q3.

[1]: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/js/utils/servicesUtils.js#L33 [^]
No tags attached.
Issue History
2023-03-16 13:33aaroncaleroNew Issue
2023-03-16 13:33aaroncaleroAssigned To => Retail
2023-03-16 13:33aaroncaleroTriggers an Emergency Pack => No
2023-03-16 13:33aaroncaleroAssigned ToRetail => alainperez
2023-03-17 17:44hgbotNote Added: 0147664
2023-03-17 17:45alainperezStatusnew => scheduled

Notes
(0147664)
hgbot   
2023-03-17 17:44   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1105 [^]