Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0054007 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Discounts and Promotions | major | always | 2023-11-22 22:08 | 2023-12-18 12:17 | |||
Reporter | sofidossant | View Status | public | |||||
Assigned To | SABARINATH P | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | RR23Q1 | SCM revision | ||||||
Merge Request Status | open | |||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | 81099 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0054007: Price Adjustment Discounts, do not follow the Avaialability tab in the webPOS | |||||||
Description | The client is testing promotions for Black Friday, and they do not apply when a day of the week is enabled in the "Avaialability" tab Specific: Price Adjustment: 25% Availability: * Day of week: Wednesday * From : 11:15:00 *To: 11:45:00 If we analyze the .js code const weekDay = currentDate.getDay(); .. .. const availableDateTimes = discountImpl.availableDateTimes.filter(dateTime=>{ const day = parseInt(dateTime.day, 10); if (day === 0) { return true; } if (weekDay === day || (weekDay === 0 && day === 7)) { return true; } return false; "day" contains the value 3 (Wednesday) "weekDay" contains the value 2, which corresponds to the value Wednesday getDay() For that reason when we apply a discount for a day of the week other than "Sunday" it does not apply... | |||||||
Steps To Reproduce | Set up a price adjustment on 25% discounts, and Availability: * Day of week: Wednesday * From : 11:15:00 *To: 11:45:00 checked if we can see the discount PLEASE , you use the hour in argentina or guatemala in the computer | |||||||
Proposed Solution | Change const weekDay = currentDate.getDay(); .. .. const availableDateTimes = discountImpl.availableDateTimes.filter(dateTime=>{ const day = parseInt(dateTime.day, 10); if (day === 0) { return true; } if (weekDay === day || (weekDay === 0 && day === 7)) { return true; } return false; "day" contiene el valor 3 ( MiƩrcoles ) "weekDay" contiene el valor 2, que se corresponde con el valor MiƩrcoles getDay() | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() ![]() | |||||||
![]() |
|
![]() |
|
(0157683) marvintm (viewer) 2023-11-27 14:55 |
Sorry but we haven't been able to reproduce the issue. We define availability to one specific day of the week (for instance Monday), and then the discount is applied correctly if it is Monday, and it is not applied if it is not. It also seems to take correctly into account the hours as far as we can see. So we need a clear explanation of how it can be reproduced, with clear steps. |
(0157761) hgbot (developer) 2023-11-28 14:32 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/127 [^] |
(0157788) hgbot (developer) 2023-11-29 09:51 |
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/127 [^] |
(0158292) SABARINATH P (viewer) 2023-12-18 12:11 |
Attaching the patch since it doesn't required backport. |
![]() |
|||
Date Modified | Username | Field | Change |
2023-11-22 22:08 | sofidossant | New Issue | |
2023-11-22 22:08 | sofidossant | Assigned To | => Retail |
2023-11-22 22:08 | sofidossant | File Added: bf_disc_02.png | |
2023-11-22 22:08 | sofidossant | OBNetwork customer | => OBPS |
2023-11-22 22:08 | sofidossant | Support ticket | => 81099 |
2023-11-22 22:08 | sofidossant | Triggers an Emergency Pack | => No |
2023-11-22 22:09 | sofidossant | File Added: bf_disc_01.png | |
2023-11-23 11:30 | sofidossant | Priority | high => urgent |
2023-11-27 06:50 | SABARINATH P | Assigned To | Retail => SABARINATH P |
2023-11-27 11:30 | SABARINATH P | Status | new => scheduled |
2023-11-27 14:55 | marvintm | Review Assigned To | => marvintm |
2023-11-27 14:55 | marvintm | Note Added: 0157683 | |
2023-11-27 14:55 | marvintm | Status | scheduled => closed |
2023-11-27 14:55 | marvintm | Resolution | open => unable to reproduce |
2023-11-27 17:09 | sofidossant | Steps to Reproduce Updated | View Revisions |
2023-11-27 17:09 | sofidossant | Resolution | unable to reproduce => open |
2023-11-27 17:09 | sofidossant | Status | closed => new |
2023-11-28 12:05 | sofidossant | version | RR23Q3.1 => RR23Q1 |
2023-11-28 14:32 | hgbot | Merge Request Status | => open |
2023-11-28 14:32 | hgbot | Note Added: 0157761 | |
2023-11-28 14:40 | SABARINATH P | Status | new => scheduled |
2023-11-29 09:51 | hgbot | Note Added: 0157788 | |
2023-12-18 11:44 | sreehari | Assigned To | SABARINATH P => sreehari |
2023-12-18 12:09 | SABARINATH P | Assigned To | sreehari => SABARINATH P |
2023-12-18 12:11 | SABARINATH P | Note Added: 0158292 | |
2023-12-18 12:12 | SABARINATH P | File Added: 54007 (2).patch | |
2023-12-18 12:17 | SABARINATH P | Status | scheduled => resolved |
2023-12-18 12:17 | SABARINATH P | Resolution | open => fixed |
2023-12-18 12:17 | SABARINATH P | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |