Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045699Retail ModulesWeb POSpublic2021-01-07 18:192021-01-12 11:37
ucarrion 
rqueralta 
urgentmajoralways
closedfixed 
5
RR19Q3.3 
RR21Q2 
No
0045699: There's an issue with the timezones when reprinting invoices
There's an issue with the timezones when reprinting invoices. The reprinted date is always the day before (one hour less 23:00:00)

The request done to the InvoicesHeader comes with the timezone of the server therefore it returns: 2020-01-07 00:00:00 +0000
It you are on a timezone (e.g.- gmt-1) the conversed date in the frot-end is 2020-01-06 23:00:00 -0100
Video: https://drive.google.com/file/d/1yjz6sMaZxNnPfrhaX84vi2UE1xNt1-Wk/view [^]

As Livebuilds is in UTC, put your laptop in UTC-1.
If you put it in UTC-X you will see that the returned our is 2020-01-07 00:00:00 -X hours

- Put your laptop at least in UTC-1
- Login on livebuilds (the test we've done is on 19Q3)
- Create an invoice
    Add a product
    Put a nominal customer
    Menu -> Invoice this receipt
    Pay
- Load the previously created ticket
- Menu -> Print this Receipt

You will notice the date shown in the popup is wrong

If you close the popup, open the developers tools, go to network tab and open the popup again you will see the request to InvoiceHeader that comes with the timezone.

Bear in mind that the printed date on the Invoice Receipt is wrong too.

orderDate from invoice header should not come with timezone as the value store in the database has not.
No tags attached.
Issue History
2021-01-07 18:19ucarrionNew Issue
2021-01-07 18:19ucarrionAssigned To => Retail
2021-01-07 18:19ucarrionResolution time => 1612134000
2021-01-07 18:19ucarrionTriggers an Emergency Pack => No
2021-01-07 18:25guillermogilDescription Updatedbug_revision_view_page.php?rev_id=22017#r22017
2021-01-07 23:52rqueraltaAssigned ToRetail => rqueralta
2021-01-07 23:53rqueraltaStatusnew => scheduled
2021-01-08 07:16guillermogilversion => RR19Q3.3
2021-01-08 07:16guillermogilDescription Updatedbug_revision_view_page.php?rev_id=22018#r22018
2021-01-08 07:16guillermogilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22020#r22020
2021-01-08 07:16guillermogilProposed Solution updated
2021-01-08 15:45hgbotNote Added: 0125339
2021-01-08 17:42hgbotResolutionopen => fixed
2021-01-08 17:42hgbotStatusscheduled => closed
2021-01-08 17:42hgbotNote Added: 0125340
2021-01-08 17:42hgbotFixed in Version => RR21Q2
2021-01-08 17:42hgbotNote Added: 0125341
2021-01-11 08:24guilleaerNote Added: 0125342
2021-01-11 08:24guilleaerStatusclosed => new
2021-01-11 08:24guilleaerResolutionfixed => open
2021-01-11 08:24guilleaerFixed in VersionRR21Q2 =>
2021-01-11 08:25hgbotResolutionopen => fixed
2021-01-11 08:25hgbotStatusnew => closed
2021-01-11 08:25hgbotFixed in Version => RR21Q2
2021-01-11 08:25hgbotNote Added: 0125343
2021-01-11 15:26guillermogilStatusclosed => new
2021-01-11 15:26guillermogilResolutionfixed => open
2021-01-11 15:26guillermogilFixed in VersionRR21Q2 =>
2021-01-11 15:32guillermogilNote Added: 0125351
2021-01-11 15:48guillermogilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22021#r22021
2021-01-11 21:58hgbotNote Added: 0125352
2021-01-12 11:37hgbotResolutionopen => fixed
2021-01-12 11:37hgbotStatusnew => closed
2021-01-12 11:37hgbotFixed in Version => RR21Q2
2021-01-12 11:37hgbotNote Added: 0125364
2021-01-12 11:37hgbotNote Added: 0125365

Notes
(0125339)
hgbot   
2021-01-08 15:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/248 [^]
(0125340)
hgbot   
2021-01-08 17:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/248 [^]
(0125341)
hgbot   
2021-01-08 17:42   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: de4eab251a81f2563d0d0b88b83b6beb1f40d500
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2021-01-07T17:53:21-05:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/de4eab251a81f2563d0d0b88b83b6beb1f40d500 [^]

Fixed BUG-45699: Added timezone offset

---
M web/org.openbravo.retail.posterminal/js/components/modalinvoices.js
---
(0125342)
guilleaer   
2021-01-11 08:24   
Executing when server are client are in the same timezone is not working.

OB.Utilities.Date.addTimezoneOffset(new Date("2021-01-05T00:00:00+01:00"))
Mon Jan 04 2021 23:00:00 GMT+0100 (Central European Standard Time)
(0125343)
hgbot   
2021-01-11 08:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 0f8d037684b2e8b374d73a79eca31c4311ea08b5
Author: Guillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Date: 2021-01-11T07:25:17+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/0f8d037684b2e8b374d73a79eca31c4311ea08b5 [^]

Revert "Fixed BUG-45699: Added timezone offset"

This reverts commit de4eab251a81f2563d0d0b88b83b6beb1f40d500
---
M web/org.openbravo.retail.posterminal/js/components/modalinvoices.js
---
(0125351)
guillermogil   
2021-01-11 15:32   
Issue reopened as it has added a regression using the same timezone on the server and the frontend
(0125352)
hgbot   
2021-01-11 21:58   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/250 [^]
(0125364)
hgbot   
2021-01-12 11:37   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3451bd2122a06bd0bcbe21f548a8b6b8ee47e293
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2021-01-12T10:37:40+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3451bd2122a06bd0bcbe21f548a8b6b8ee47e293 [^]

Fixed BUG-45699: Parsed orderDate value to server date timezone

---
M web/org.openbravo.retail.posterminal/js/components/modalinvoices.js
---
(0125365)
hgbot   
2021-01-12 11:37   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/250 [^]