Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038727Retail ModulesWeb POSpublic2018-06-07 15:232018-06-25 12:34
aaroncalero 
marvintm 
highmajoralways
closedfixed 
5
 
RR18Q2.1 
migueldejuana
No
0038727: 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.
blocks defect 0038721 closed marvintm OutDatedDataChangeException thrown when modifying a ticket updated before a time change 
Issue History
2018-06-08 13:50marvintmTypedefect => backport
2018-06-08 13:50marvintmTarget Version => RR18Q2.1
2018-06-22 14:24hgbotCheckin
2018-06-22 14:24hgbotNote Added: 0105347
2018-06-22 14:24hgbotStatusscheduled => resolved
2018-06-22 14:24hgbotResolutionopen => fixed
2018-06-22 14:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/23da3e33c5ceb47d52616c32335a59095ed67146 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.retail.posterminal/rev/32b8849f2c44908f1b8ac4e9b0ceaf146acd43e8 [^]
2018-06-22 14:26hgbotCheckin
2018-06-22 14:26hgbotNote Added: 0105348
2018-06-22 14:26hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.retail.posterminal/rev/32b8849f2c44908f1b8ac4e9b0ceaf146acd43e8 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.mobile.core/rev/b9fd8c6f62f174cc4e0b9c4143265d6120900811 [^]
2018-06-25 12:34migueldejuanaReview Assigned To => migueldejuana
2018-06-25 12:34migueldejuanaNote Added: 0105357
2018-06-25 12:34migueldejuanaStatusresolved => closed

Notes
(0105347)
hgbot   
2018-06-22 14:24   
Repository: retail/backports/3.0RR18Q2.1/org.openbravo.retail.posterminal
Changeset: 32b8849f2c44908f1b8ac4e9b0ceaf146acd43e8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Jun 22 14:24:49 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.retail.posterminal/rev/32b8849f2c44908f1b8ac4e9b0ceaf146acd43e8 [^]

Fixed issue 38727. 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
---
(0105348)
hgbot   
2018-06-22 14:26   
Repository: retail/backports/3.0RR18Q2.1/org.openbravo.mobile.core
Changeset: b9fd8c6f62f174cc4e0b9c4143265d6120900811
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Jun 22 14:25:46 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.mobile.core/rev/b9fd8c6f62f174cc4e0b9c4143265d6120900811 [^]

Fixed issue 38727. 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
---
(0105357)
migueldejuana   
2018-06-25 12:34   
Reviewed