Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045748Retail ModulesDiscounts and Promotionspublic2021-01-19 09:052022-06-01 11:33
Leyre 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR21Q2 
marvintm
Production - Confirmed Stable
2019-09-17
RR19Q4
No
0045748: Discounts availability does not work properly in Web POS
Discounts availability does not work properly in Web POS
1. Configure a discount in the Backend, for example:
- Discount/Promotion Type: Price adjustment
- Active = Y
- Availability: Monday and Tuesday (do not inform the fields "Starting Time" and "Ending Time").
- Define the discount for a product, for example Baby carrier and select "Included Products" = Only those defined.

2. Open a terminal on Monday and verify that the discount is applied correctly to the "Baby Carrier" product.

3. In the Backend, open the discount defined in point 1, and inform:
- Availability: Tuesday -> "Starting Time" Tuesday = 8:00:00 and "Ending Time" Tuesday =18:05:00

Result: Open the terminal again the next Tuesday and verify that the discount is not applied to the "Baby Carrier" product.

Attached image of the configuration of the discount.
No tags attached.
depends on backport 0045867RR21Q1 closed ranjith_qualiantech_com Discounts availability does not work properly in Web POS 
depends on backport 0045868RR20Q4.2 closed ranjith_qualiantech_com Discounts availability does not work properly in Web POS 
depends on backport 0045869RR20Q3.4 closed ranjith_qualiantech_com Discounts availability does not work properly in Web POS 
png backend_configuration.png (127,865) 2021-01-19 09:05
https://issues.openbravo.com/file_download.php?file_id=15262&type=bug
png

diff 45748_discounts_20Q2.diff (1,409) 2021-01-31 10:12
https://issues.openbravo.com/file_download.php?file_id=15291&type=bug
diff 45748_20Q3_discounts.diff (3,421) 2022-06-01 11:33
https://issues.openbravo.com/file_download.php?file_id=17101&type=bug
Issue History
2021-01-19 09:05LeyreNew Issue
2021-01-19 09:05LeyreAssigned To => Retail
2021-01-19 09:05LeyreFile Added: backend_configuration.png
2021-01-19 09:05LeyreResolution time => 1612825200
2021-01-19 09:05LeyreTriggers an Emergency Pack => No
2021-01-19 09:59ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-01-21 15:10mdubreuxNote Added: 0125713
2021-01-22 07:47marvintmReview Assigned To => marvintm
2021-01-22 07:47marvintmNote Added: 0125720
2021-01-22 07:47marvintmStatusnew => closed
2021-01-22 07:47marvintmResolutionopen => unable to reproduce
2021-01-31 10:12ranjith_qualiantech_comFile Added: 45748_discounts_20Q2.diff
2021-02-05 11:38lbressanNote Added: 0126014
2021-02-05 11:38lbressanStatusclosed => new
2021-02-05 11:38lbressanResolutionunable to reproduce => open
2021-02-05 11:41lbressanNote Edited: 0126014bug_revision_view_page.php?bugnote_id=0126014#r22107
2021-02-05 11:48lbressanNote Edited: 0126014bug_revision_view_page.php?bugnote_id=0126014#r22108
2021-02-08 17:35hgbotNote Added: 0126041
2021-02-09 07:32hgbotNote Added: 0126048
2021-02-09 07:35marvintmStatusnew => scheduled
2021-02-09 07:35marvintmStatusscheduled => resolved
2021-02-09 07:35marvintmFixed in Version => RR21Q2
2021-02-09 07:35marvintmResolutionopen => fixed
2021-02-09 07:35marvintmStatusresolved => closed
2021-02-09 07:37marvintmRegression level => Production - Confirmed Stable
2021-02-09 07:37marvintmRegression date => 2019-09-17
2021-02-09 07:37marvintmRegression introduced in release => RR19Q4
2021-02-09 07:45hgbotNote Added: 0126049
2021-02-16 06:54hgbotNote Added: 0126116
2021-03-01 10:20hgbotNote Added: 0126419
2021-03-01 10:20hgbotNote Added: 0126420
2022-06-01 11:33ranjith_qualiantech_comFile Added: 45748_20Q3_discounts.diff

Notes
(0125713)
mdubreux   
2021-01-21 15:10   
Hello,

could you please communicate us a estimated delivery date?

Regards,

Matthieu
(0125720)
marvintm   
2021-01-22 07:47   
Following internal discussion, we are rejecting the issue as we are unable to reproduce it.
(0126014)
lbressan   
2021-02-05 11:38   
(edited on: 2021-02-05 11:48)
Steps updated:
1. Configure a discount in the Backend, for example:
- Discount/Promotion Type: Price adjustment
- Active = Y
- Availability: Monday and Tuesday (do not inform the fields "Starting Time" and "Ending Time").
- Define the discount for a product, for example, Baby carrier, and select "Included Products" = Only those defined.

2. Open a terminal on Monday and verify that the discount is applied correctly to the "Baby Carrier" product.

3. In the Backend, open the discount defined in point 1, and inform:
- Availability: Tuesday -> "Starting Time" Tuesday = 8:00:00 and "Ending Time" Tuesday =18:05:00

4.In order to simulate the change of day and time, before opening the pos window, change the date and time of the machine on which you are testing. Then when the pos is loaded, it takes the date and time of the machine to compare with the discount configuration (attached file with the tests made in 20q2 and 20q3 standard in livebuilds then in 20q and pi: https://docs.google.com/document/d/1LizOsg9IlEd_YNaj0wd9YNCreIuO6JbsLVTx0V9T8hM/edit?usp=sharing [^]). In all versions, the error has been detected in the generated js.

Result: Open the terminal again the next Tuesday and verify that the discount is not applied to the "Baby Carrier" product.

Attached image of the configuration of the discount.

(0126041)
hgbot   
2021-02-08 17:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/17 [^]
(0126048)
hgbot   
2021-02-09 07:32   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/17 [^]
(0126049)
hgbot   
2021-02-09 07:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 5ce2c6e2ce26769e47215c31031aa8e5dd535679
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-02-08T18:46:05+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/5ce2c6e2ce26769e47215c31031aa8e5dd535679 [^]

Fixed ISSUE-45748: Discount Time should be validated with POS time instead of server time

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
---
(0126116)
hgbot   
2021-02-16 06:54   
Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/69 [^]
(0126419)
hgbot   
2021-03-01 10:20   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 6019fe0681d8ae592749c11905a3668858cd071a
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-03-01T09:19:54+00:00
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/6019fe0681d8ae592749c11905a3668858cd071a [^]

Verifies ISSUE-45748: Updated Test I40197_ComboApplyDiscountByHours

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_combo/I40197_ComboApplyDiscountByHours.java
---
(0126420)
hgbot   
2021-03-01 10:20   
Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/69 [^]