Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038721Retail ModulesWeb POSpublic2018-06-07 15:232018-06-11 09:01
aaroncalero 
marvintm 
highmajoralways
closedfixed 
5
 
RR18Q3 
migueldejuana
No
0038721: OutDatedDataChangeException thrown when modifying a ticket updated before a time change
The existing verification of concurrent modification of orders/layaways can fail if an order was modified for the last time before a time change (i.e. during Winter time) and now it is modified again from web pos (adding a new payment, etc).
The OrderLoader checks the following two values:
loaded = POSUtils.dateFormatUTC.parse(jsonorder.getString("loaded"));
updated = OBMOBCUtils.convertToUTC(order.getUpdated());

The loaded variable is converted correctly to the utc date, however the updated variable is converted taking into account the timezone offset of the current date
Login in web pos
Create a simple ticket with a product and pay it.
Change the updated value of the order in the database to a date in february (before the Daylight saving time change)
Load a ticket again in web pos.
Do a reverse payment (click on the total amount > click on reverse payment button > click on Ok) and complete the ticket payment again.
Click on Done.
Verify that the ticket has ended in Errors While importing POS Data window and that the cause of the error is an OutDatedDataChangeException.
The OBMOBCUtils.convertToUTC method takes the date passed as an argument and adds 2 different offsets, the timezone offset and the DST offset, which are taken from the current date.
The DST offset should be taken from the date that is being converted to UTC.
No tags attached.
depends on backport 0038727RR18Q2.1 closed marvintm OutDatedDataChangeException thrown when modifying a ticket updated before a time change 
diff issue38721_posterminal.diff (2,588) 2018-06-07 18:55
https://issues.openbravo.com/file_download.php?file_id=11837&type=bug
diff issue38721_mobile.core.diff (1,252) 2018-06-07 18:55
https://issues.openbravo.com/file_download.php?file_id=11838&type=bug
Issue History
2018-06-07 15:23aaroncaleroNew Issue
2018-06-07 15:23aaroncaleroAssigned To => Retail
2018-06-07 15:23aaroncaleroResolution time => 1529532000
2018-06-07 15:23aaroncaleroTriggers an Emergency Pack => No
2018-06-07 18:55marvintmFile Added: issue38721_posterminal.diff
2018-06-07 18:55marvintmFile Added: issue38721_mobile.core.diff
2018-06-08 12:33hgbotCheckin
2018-06-08 12:33hgbotNote Added: 0105033
2018-06-08 12:33hgbotStatusnew => resolved
2018-06-08 12:33hgbotResolutionopen => fixed
2018-06-08 12:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d34b76741eac94f6eccbe744c170eda0132c4ba4 [^]
2018-06-08 12:33hgbotCheckin
2018-06-08 12:33hgbotNote Added: 0105034
2018-06-08 12:33hgbotCheckin
2018-06-08 12:33hgbotNote Added: 0105035
2018-06-08 12:33hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d34b76741eac94f6eccbe744c170eda0132c4ba4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/23da3e33c5ceb47d52616c32335a59095ed67146 [^]
2018-06-08 13:47marvintmAssigned ToRetail => marvintm
2018-06-08 13:50marvintmStatusresolved => new
2018-06-08 13:50marvintmResolutionfixed => open
2018-06-08 13:50marvintmStatusnew => acknowledged
2018-06-08 13:50marvintmStatusacknowledged => scheduled
2018-06-08 13:50marvintmStatusscheduled => resolved
2018-06-08 13:50marvintmFixed in Version => RR18Q3
2018-06-08 13:50marvintmResolutionopen => fixed
2018-06-11 09:01migueldejuanaReview Assigned To => migueldejuana
2018-06-11 09:01migueldejuanaNote Added: 0105050
2018-06-11 09:01migueldejuanaStatusresolved => closed

Notes
(0105033)
hgbot   
2018-06-08 12:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d34b76741eac94f6eccbe744c170eda0132c4ba4
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jun 07 18:57:20 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d34b76741eac94f6eccbe744c170eda0132c4ba4 [^]

Fixed issue 38721. OutDatedDataChangeException thrown when modifying a ticket updated before a time change.
'loaded' and 'updated' dates (both coming from server in the end) will be parsed and transformed in the same way, thus avoiding problems with timezones and daylight saving changes

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/ProcessVoidLayaway.java
---
(0105034)
hgbot   
2018-06-08 12:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 15a099451f305959b219a7baeea6267727147d8f
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Jun 08 12:33:14 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/15a099451f305959b219a7baeea6267727147d8f [^]

Related to issue 38721. Merge with pi

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/ProcessVoidLayaway.java
---
(0105035)
hgbot   
2018-06-08 12:33   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 23da3e33c5ceb47d52616c32335a59095ed67146
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jun 07 18:57:29 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/23da3e33c5ceb47d52616c32335a59095ed67146 [^]

Fixed issue 38721. OutDatedDataChangeException thrown when modifying a ticket updated before a time change.
'loaded' and 'updated' dates (both coming from server in the end) will be parsed and transformed in the same way, thus avoiding problems with timezones and daylight saving changes

---
M src/org/openbravo/mobile/core/utils/OBMOBCUtils.java
---
(0105050)
migueldejuana   
2018-06-11 09:01   
Tested and reviewed