Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033265Retail ModulesWeb POSpublic2016-06-15 09:412016-06-23 13:39
adrianromero 
adrianromero 
normalmajorhave not tried
closedfixed 
5
 
 
marvintm
No
0033265: Times and DateTimes are not properly converted by the function getJSONArray(Query)
In mobile.core java class "HQLPropertyList", the method "public JSONArray getJSONArray(Query query) throws JSONException" do not sets the UTC timezome when formatting to a javascript date. This is needed because otherwise the WebPOS will load a date time with a difference of the server time zone. For example if the webPOS sends the date "2016-06-10T15:00:00.698Z" it will receive 2016-06-10T13:00:00.698Z". This was properly managed in the deprecated function getJSONObjectRow(Object[])
Create a new datetime or time field in c_orderline, and create and the functionality to save and load the value. There is a field like this "delivery time" in https://code.openbravo.com/erp/pmods/org.openbravo.retail.deliveryconditions [^]
Just add the UTC time zone when formatting dates in getJSONArray(Query):

df.setTimeZone(TimeZone.getTimeZone("UTC"));
No tags attached.
related to defect 0033496 closed adrianromero Wrong receipt time when loading paid receipts 
diff issue33265.diff (2,577) 2016-06-15 09:44
https://issues.openbravo.com/file_download.php?file_id=9524&type=bug
Issue History
2016-06-15 09:41adrianromeroNew Issue
2016-06-15 09:41adrianromeroAssigned To => adrianromero
2016-06-15 09:41adrianromeroResolution time => 1466546400
2016-06-15 09:41adrianromeroTriggers an Emergency Pack => No
2016-06-15 09:41adrianromeroStatusnew => scheduled
2016-06-15 09:44adrianromeroFile Added: issue33265.diff
2016-06-15 09:45adrianromeroNote Added: 0087285
2016-06-17 10:16hgbotCheckin
2016-06-17 10:16hgbotNote Added: 0087383
2016-06-17 10:16hgbotStatusscheduled => resolved
2016-06-17 10:16hgbotResolutionopen => fixed
2016-06-17 10:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1d10c17d8e96b3406ef49fb352a09d287386364a [^]
2016-06-17 10:18adrianromeroReview Assigned To => marvintm
2016-06-23 13:39marvintmStatusresolved => closed
2016-07-19 12:42adrianromeroRelationship addedrelated to 0033496

Notes
(0087285)
adrianromero   
2016-06-15 09:45   
The attached file already passes try successfully https://ci.openbravo.com//job/try-ret-test-pgsql-suite1/3424/ [^]
(0087383)
hgbot   
2016-06-17 10:16   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1d10c17d8e96b3406ef49fb352a09d287386364a
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Jun 17 10:15:30 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1d10c17d8e96b3406ef49fb352a09d287386364a [^]

Fixes issue 0033265: Times and DateTimes are not properly converted by the function getJSONArray(Query)
* Sets the UTC time zone when formatting JS date times to be sent to WebPOS
* Indluces formatting of the sources

---
M src/org/openbravo/mobile/core/model/HQLPropertyList.java
---