Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031757Retail ModulesCash Managementpublic2015-12-21 18:552016-01-29 10:08
gorkaion 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR16Q2 
guilleaer
No
0031757: Cash Management is not saving the Date when it is done
The json sent to the backend to import the Cash Management is not including the Date when it is done. Just the "time" part.

If the Cash Management is done in offline mode and it is synchronized a date later the financial account transaction generated in the backend will have the date of the synchronization instead of the real date when it was created in the terminal.
* Open a terminal and create a Cash Management.
* Get the json from the related ImportEntry to check that the date is not send:

{
  "messageId":"B53520A16DBF8ED82932243059BA68AC",
  "data":[
    {
      "id":"A139EECBE64225BCF77263BF51997558",
      "description":"Cash - Cashier shift (transfer to VBS backoffice)",
      "amount":20,
      "origAmount":20,
      "type":"drop",
      "reasonId":"84CB7407F7834C05BD6E2ADF7A4AFC25",
      "paymentMethodId":"63339A82A49A4AE0BCD9AC5929B0EA3B",
      "user":"Demo User",
      "userId":"E49545E7D0A2413E90C31C2CDC2153B1",
      "time":"18:26",
      "isocode":"EUR",
      "cashup_id":"B6D1C2F51257B713FF91470828E48F93",
      "glItem":"FA646455DCC94D7C90CED9A6C00748E0",
      "isbeingprocessed":"N",
      "_idx":null
    }
  ],
  "client":"39363B0921BB4293B48383844325E84C",
  "organization":"D270A5AC50874F8BA67A88EE977F8E3B",
  "pos":"9104513C2D0741D4850AE8493998A7C8",
  "terminalName":"VBS-1",
  "appName":"WebPOS"
}
Send the date in the json and use it to populate the Transaction Date and Accounting date of the Transaction. Use the date and time to popuplate the creation date of the Transaction.
No tags attached.
related to defect 0031503 closed guilleaer [SERQA 397] The orderDate of receipts loaded in webPOS is showing an incorrect date 
related to backport 0031643RR15Q3.3 closed Orekaria invoice date is wrong in invoice created in cashup 
patch issue #31757 posterminal Source 5550.patch (5,747) 2015-12-29 07:56
https://issues.openbravo.com/file_download.php?file_id=8868&type=bug
patch issue #31757 Test 4855.patch (5,429) 2015-12-29 07:56
https://issues.openbravo.com/file_download.php?file_id=8869&type=bug
patch issue #31757 Source v2 5553.patch (8,391) 2015-12-31 09:55
https://issues.openbravo.com/file_download.php?file_id=8884&type=bug
patch issue #31757 Test v2 4858.patch (5,373) 2015-12-31 09:56
https://issues.openbravo.com/file_download.php?file_id=8886&type=bug
Issue History
2015-12-21 18:55gorkaionNew Issue
2015-12-21 18:55gorkaionAssigned To => Retail
2015-12-21 18:55gorkaionTriggers an Emergency Pack => No
2015-12-22 11:03gorkaionResolution time => 1451948400
2015-12-22 11:07OrekariaStatusnew => acknowledged
2015-12-28 08:13ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2015-12-28 08:13ranjith_qualiantech_comStatusacknowledged => scheduled
2015-12-29 07:56ranjith_qualiantech_comFile Added: issue #31757 posterminal Source 5550.patch
2015-12-29 07:56ranjith_qualiantech_comFile Added: issue #31757 Test 4855.patch
2015-12-29 07:57ranjith_qualiantech_comNote Added: 0083029
2015-12-29 13:17gorkaionNote Added: 0083049
2015-12-29 14:05ranjith_qualiantech_comNote Added: 0083053
2015-12-31 09:55ranjith_qualiantech_comFile Added: issue #31757 Source v2 5553.patch
2015-12-31 09:56ranjith_qualiantech_comFile Added: issue #31703 Test 4852.patch
2015-12-31 09:56ranjith_qualiantech_comFile Deleted: issue #31703 Test 4852.patch
2015-12-31 09:56ranjith_qualiantech_comFile Added: issue #31757 Test v2 4858.patch
2015-12-31 09:59ranjith_qualiantech_comNote Deleted: 0083053
2015-12-31 10:00ranjith_qualiantech_comNote Added: 0083098
2015-12-31 11:33OrekariaRelationship addedrelated to 0031503
2015-12-31 11:34OrekariaRelationship addedrelated to 0031643
2016-01-05 07:25hgbotCheckin
2016-01-05 07:25hgbotNote Added: 0083132
2016-01-05 07:25hgbotCheckin
2016-01-05 07:25hgbotNote Added: 0083133
2016-01-05 07:25hgbotStatusscheduled => resolved
2016-01-05 07:25hgbotResolutionopen => fixed
2016-01-05 07:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/206aa790731b56490b1e71079f87efcf7b9f7196 [^]
2016-01-22 08:45guilleaerNote Added: 0083519
2016-01-22 08:45guilleaerStatusresolved => new
2016-01-22 08:45guilleaerResolutionfixed => open
2016-01-22 10:05ranjith_qualiantech_comStatusnew => scheduled
2016-01-29 06:15hgbotCheckin
2016-01-29 06:15hgbotNote Added: 0083695
2016-01-29 06:15hgbotStatusscheduled => resolved
2016-01-29 06:15hgbotResolutionopen => fixed
2016-01-29 06:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/206aa790731b56490b1e71079f87efcf7b9f7196 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0194a497190ab1be211e5bd9b4bfd75b4e66dd25 [^]
2016-01-29 10:08guilleaerReview Assigned To => guilleaer
2016-01-29 10:08guilleaerNote Added: 0083720
2016-01-29 10:08guilleaerStatusresolved => closed
2016-01-29 10:08guilleaerFixed in Version => RR16Q2

Notes
(0083029)
ranjith_qualiantech_com   
2015-12-29 07:57   
Patch Attached
Source => issue 0031757 posterminal Source 5550.patch
Test => issue 0031757 Test 4855.patch
(0083049)
gorkaion   
2015-12-29 13:17   
I have reviewed the patch and have some doubts about the fix:

* Why name the object with the date strCashUpDate if we are loading the date of the Cash Management.
* The date and time is sent in an object called objToSend but that object is not accessed in the java.
** Why not add that information in the main json as in other entities?
** In the main json of cash management there is already a 'time' that seems to be not used. Why not use it completing the information added there, or removed if it is not needed?
(0083098)
ranjith_qualiantech_com   
2015-12-31 10:00   
New Patch has been attached
issue 0031757 Source v2 5553.patch
issue 0031757 Test v2 4858.patch

New Patch includes which are asked in note https://issues.openbravo.com/view.php?id=31757#c83049 [^]
(0083132)
hgbot   
2016-01-05 07:25   
Repository: tools/automation/pi-mobile
Changeset: 429721c6cbf8bd3b7cbfff806f61ab9cb8fb4e2a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jan 05 11:54:34 2016 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/429721c6cbf8bd3b7cbfff806f61ab9cb8fb4e2a [^]

Verifies issue 31757: Added automated test 'I31757_CashMgmtTrxDate'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashmanagement/I31757_CashMgmtTrxDate.java
---
(0083133)
hgbot   
2016-01-05 07:25   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 206aa790731b56490b1e71079f87efcf7b9f7196
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jan 05 11:55:01 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/206aa790731b56490b1e71079f87efcf7b9f7196 [^]

Fixes issue 31757 : Create Cash Mgmt Transaction Date based on WEBPOS Date

---
M src/org/openbravo/retail/posterminal/ProcessCashMgmt.java
M src/org/openbravo/retail/posterminal/master/Cashup.java
M web/org.openbravo.retail.posterminal/js/cashmgmt/model/cashmgmt-model.js
M web/org.openbravo.retail.posterminal/js/cashmgmt/view/listdepositsdrops.js
M web/org.openbravo.retail.posterminal/js/model/cashmanagement.js
---
(0083519)
guilleaer   
2016-01-22 08:45   
reopened after test and review.

I think that there is an error there when you read the date in the server (ProcessCashMgmt.java)
There you should read the field "creationDate" (the one that you added) but you are reading "dateTime" so the cashmgmt transaction is always stored with the server date
(0083695)
hgbot   
2016-01-29 06:15   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0194a497190ab1be211e5bd9b4bfd75b4e66dd25
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 29 10:43:29 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0194a497190ab1be211e5bd9b4bfd75b4e66dd25 [^]

Fixes issue 31757 : Create Cash Mgmt Transaction Date based on WEBPOS Date

Adding Creation Date & timezoneOffset in Cash Management Model

---
M src/org/openbravo/retail/posterminal/ProcessCashMgmt.java
M web/org.openbravo.retail.posterminal/js/utils/cashManagementUtils.js
---
(0083720)
guilleaer   
2016-01-29 10:08   
code reviewed and tested