Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045465
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2020-11-19 16:532020-11-23 06:57
ReporterAugustoMauchView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045465: Web Pos still does not apply correctly the "Ending Date" of a discount or promotion

DescriptionThis issue is a continuation of https://issues.openbravo.com/view.php?id=44635 [^]

Web Pos does not apply correctly the Starting date and Ending date filters of a discount if those filters include timezone information, which has already happened in clients that don't have any customizations that affects this functionality.

For instance:
new Date(new Date('2013-06-01T00:00:00+01:00').toISOString().split('T')[0])
returns
Fri May 31 2013 02:00:00 GMT+0200 (Central European Summer Time)

This is wrong, in the backend it was defined as 2013-06-01, but now in frontend has been converted to 2013-31-05

To fix it, just remove the time part before invoking the toISOString function:

new Date(new Date('2013-06-01T00:00:00+01:00'.split('T')[0]).toISOString())
Sat Jun 01 2013 02:00:00 GMT+0200 (Central European Summer Time)"
Steps To ReproduceSame steps as described for issue 44635 make this issue reproducible in the client production and test server.

Backend:
1. Configure a new discount, for example: Variable Discount per Total Amount
2. Set Ending Date = today.

Web POS:
1. Open a new till with date = today.
2. Add a product
3. Try to add the previous discount

Actual Result: The discount is not available.
Expected result: The discount should be available:
Ending Dat: The Date To indicates the end date of a range (inclusive)

-> If you modify the Ending date = a later day, the discount is available.
Proposed SolutionReplace

new Date(new Date(stringDate).toISOString().split('T')[0])

with

new Date(new Date(stringDate.split('T')[0]).toISOString())
TagsNOR
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0044635 closedranjith_qualiantech_com Web Pos does not apply correctly the "Ending Date" of a discount or promotion 

-  Notes
(0124553)
hgbot (developer)
2020-11-23 06:35

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/196 [^]
(0124554)
hgbot (developer)
2020-11-23 06:36

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.activediscountspopup/-/merge_requests/3 [^]
(0124555)
hgbot (developer)
2020-11-23 06:36

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/9 [^]
(0124562)
hgbot (developer)
2020-11-23 06:56

Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.activediscountspopup/-/merge_requests/3 [^]
(0124563)
hgbot (developer)
2020-11-23 06:57

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 7fd7308493a2a9771468472009129e316632776b
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-11-23T05:57:17+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/7fd7308493a2a9771468472009129e316632776b [^]

Related to ISSUE-45465: Updated Discount Date validation
* Discount date should be validated without time

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0124564)
hgbot (developer)
2020-11-23 06:57

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/196 [^]
(0124565)
hgbot (developer)
2020-11-23 06:57

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/9 [^]
(0124566)
hgbot (developer)
2020-11-23 06:57

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 0c14adcba1948de2a61ec87eee9aa18f9e76e76b
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-11-23T08:12:19+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/0c14adcba1948de2a61ec87eee9aa18f9e76e76b [^]

Fixed ISSUE-45465: Updated Discount Date validation
* Discount date should be validated without time

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js
---

- Issue History
Date Modified Username Field Change
2020-11-19 16:53 AugustoMauch New Issue
2020-11-19 16:53 AugustoMauch Assigned To => ranjith_qualiantech_com
2020-11-19 16:53 AugustoMauch Resolution time => 1597010400
2020-11-19 16:53 AugustoMauch Triggers an Emergency Pack => No
2020-11-19 16:53 AugustoMauch Issue generated from 0044635
2020-11-19 16:54 rafaroda Tag Attached: NOR
2020-11-19 16:54 rafaroda Relationship added caused by 0044635
2020-11-19 17:31 marvintm Resolution time 1597010400 => 1605826800
2020-11-19 17:45 marvintm Resolution time 1605826800 => 1606690800
2020-11-20 06:08 ranjith_qualiantech_com Status new => scheduled
2020-11-23 06:35 hgbot Note Added: 0124553
2020-11-23 06:36 hgbot Note Added: 0124554
2020-11-23 06:36 hgbot Note Added: 0124555
2020-11-23 06:56 hgbot Note Added: 0124562
2020-11-23 06:57 hgbot Note Added: 0124563
2020-11-23 06:57 hgbot Note Added: 0124564
2020-11-23 06:57 hgbot Note Added: 0124565
2020-11-23 06:57 hgbot Resolution open => fixed
2020-11-23 06:57 hgbot Status scheduled => closed
2020-11-23 06:57 hgbot Fixed in Version => RR21Q1
2020-11-23 06:57 hgbot Note Added: 0124566


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker