Openbravo Issue Tracking System - Retail Modules
View Issue Details
0029869Retail ModulesWeb POSpublic2015-05-13 16:152015-05-13 16:15
malsasua 
Retail 
normalminorunable to reproduce
newopen 
20Community Appliance
 
 
No
No
0029869: sometimes, the json order is corrupt: createdBy and updatedBy are 'null'
Sometimes, the json order created in webpos, that it is sent to OrderLoader.java is corrupted, because the fields createdBy and updatedBy are null.

When it happens, the webpos never is synced, and the receipts are in local database.
example of json corrupted:

{"hasbeenpaid":"Y","isbeingprocessed":"N","id":"0BBF3B1F798853482C05B8CFB611088B","client":"7E5FF7141C9F48378DFAC44C628C5AC0","organization":"05DDB9A46C6241D8B67F81D6F4F0918B", "createdBy":"null","updatedBy":"null","documentType":"2BE3965F710D432A9AE0006B1BFFA894", ...}
In the DataSynchronizationProcess.java, in this line 107:
 String userId = jsonRecord.has("createdBy") ? jsonRecord
            .getString("createdBy") : jsonRecord.getString("userId");
should be replaced by
 String userId = jsonRecord.has("createdBy")
            && !"null".equals(jsonRecord.getString("createdBy")) ? jsonRecord
            .getString("createdBy") : jsonRecord.getString("userId");
No tags attached.
Issue History
2015-05-13 16:15malsasuaNew Issue
2015-05-13 16:15malsasuaAssigned To => Retail
2015-05-13 16:15malsasuaOBNetwork customer => No
2015-05-13 16:15malsasuaTriggers an Emergency Pack => No

There are no notes attached to this issue.