Openbravo Issue Tracking System - POS2
View Issue Details
0046648POS2POSpublic2021-05-12 16:362021-05-26 14:01
psanjuan 
gorka_gil 
urgentcriticalalways
closedfixed 
30Openbravo Appliance 14.04
 
 
approved
No
No
0046648: Cash Process does not create the G/L item for cash up transaction
Cash Process does not create the G/L item for cash up transaction

EDIT:
Apart of the problem explained in this issue, there is another two problems related:
- https://issues.openbravo.com/view.php?id=46692 [^]
- https://issues.openbravo.com/view.php?id=46739 [^]
Marked as duplicated because the fix is the same
Run a cash process to close all pending receipts.

Create a POS receipt for an amount of 18€. Pay it in cash.

Go to backoffice and verify that the corresponding sales order has been created with Invoice Status = 0%

Navigate to the financial account (POS2SD Cashbook - Vall Blanca Store - VBS2) and verify there is a transaction created in there with below details:

BP Deposit
Transaction date = 12/05/2021
Deposit Amount = 18

Run cash up process and match the amounts. Do not keep any cash amount.

Navigate once more to the financial account (cash book financial account of the terminal) and verify that no Withdrawal transaction has been created in there to move that cash up balance to the corresponding back office Financial Account of the store (Cashbook - Vall Blanca Backoffice).

Navigate to the reconciliation tab, and filter by the current date, then go to Cleared Items sub-tab. Verify that the reconciliation only includes one line

Navigate to the corresponding backoffice financial account (Cashbook - Vall Blanca Backoffice) and verify that no deposit transaction related to the same GL item has been created in there with cash up amount.

See screens attached for both livebuilds and new POS results.

EDIT:
To these steps to reproduce is also needed to add the ones in these issues:
- https://issues.openbravo.com/view.php?id=46692 [^]
- https://issues.openbravo.com/view.php?id=46739 [^]
A matching transaction needs to be created in the cash book account to withdraw cash up amount, to deposit that amount in the backoffice account of the store.



The problem seems to be that although the "expected" property is correctly set, the "foreignExpected" property is not, and finally it is this "foreignExpected" property the one that is used in the CashCloseProcessor.java (line 128) to calculate the reconciliationTotal. If this amount is set to 0, then no transaction to move the money out of the till is generated.

The solution therefore is to set this "foreignExpected" property inside the "cashCloseInfo" object inside the Cashup data to the proper value. Once this is done it seems the transaction will be generated correctly.
No tags attached.
depends on backport 0046663TAP closed gorka_gil Cash Process does not create the G/L item for cash up transaction 
has duplicate defect 0046692 closed gorka_gil Reconciliation not correct after a Cash up 
has duplicate defect 0046739 closed gorka_gil Cash up differences are not created 
has duplicate backport 0046748TAP closed gorka_gil Cash up differences are not created 
png CashBookNewPOS.png (219,787) 2021-05-12 16:52
https://issues.openbravo.com/file_download.php?file_id=15712&type=bug
png

png CashBookReconciliationNewPOS.png (162,670) 2021-05-12 16:53
https://issues.openbravo.com/file_download.php?file_id=15713&type=bug
png

png BackofficeFANewPOS.png (174,789) 2021-05-12 16:53
https://issues.openbravo.com/file_download.php?file_id=15714&type=bug
png

png CashBookLivebuilds.png (174,986) 2021-05-12 16:54
https://issues.openbravo.com/file_download.php?file_id=15715&type=bug
png

png ReconciliationLiveBuilds.png (168,636) 2021-05-12 16:54
https://issues.openbravo.com/file_download.php?file_id=15716&type=bug
png

png BackofficeFA_Livebuilds.png (190,505) 2021-05-12 16:54
https://issues.openbravo.com/file_download.php?file_id=15717&type=bug
png
Issue History
2021-05-12 16:36psanjuanNew Issue
2021-05-12 16:36psanjuanAssigned To => Retail
2021-05-12 16:36psanjuanOBNetwork customer => No
2021-05-12 16:36psanjuanTriggers an Emergency Pack => No
2021-05-12 16:45psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22502#r22502
2021-05-12 16:49psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22503#r22503
2021-05-12 16:52psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22504#r22504
2021-05-12 16:52psanjuanProposed Solution updated
2021-05-12 16:52psanjuanFile Added: CashBookNewPOS.png
2021-05-12 16:53psanjuanFile Added: CashBookReconciliationNewPOS.png
2021-05-12 16:53psanjuanFile Added: BackofficeFANewPOS.png
2021-05-12 16:54psanjuanFile Added: CashBookLivebuilds.png
2021-05-12 16:54psanjuanFile Added: ReconciliationLiveBuilds.png
2021-05-12 16:54psanjuanFile Added: BackofficeFA_Livebuilds.png
2021-05-12 16:56psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22505#r22505
2021-05-12 16:57psanjuanResolution time => 1622412000
2021-05-13 16:13marvintmSeveritymajor => critical
2021-05-13 16:13marvintmDescription Updatedbug_revision_view_page.php?rev_id=22516#r22516
2021-05-13 16:13marvintmProposed Solution updated
2021-05-13 16:14marvintmResolution time1622412000 => 1621202400
2021-05-13 16:15marvintmStatusnew => acknowledged
2021-05-13 16:16marvintmStatusacknowledged => scheduled
2021-05-13 16:16marvintmStatusscheduled => acknowledged
2021-05-17 18:26pablobessoneAssigned ToRetail => pablobessone
2021-05-17 18:26pablobessoneStatusacknowledged => scheduled
2021-05-19 06:52marvintmRelationship addedrelated to 0046692
2021-05-19 15:30gorka_gilAssigned Topablobessone => gorka_gil
2021-05-21 13:42hgbotMerge Request Status => open
2021-05-21 13:42hgbotNote Added: 0128495
2021-05-24 18:26gorka_gilRelationship addedhas duplicate 0046739
2021-05-24 18:26gorka_gilRelationship addedhas duplicate 0046748
2021-05-24 18:26gorka_gilRelationship replacedhas duplicate 0046692
2021-05-24 18:30gorka_gilDescription Updatedbug_revision_view_page.php?rev_id=22588#r22588
2021-05-24 18:30gorka_gilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22589#r22589
2021-05-26 07:05hgbotMerge Request Statusopen => approved
2021-05-26 13:11hgbotNote Added: 0128658
2021-05-26 13:11hgbotResolutionopen => fixed
2021-05-26 13:11hgbotStatusscheduled => closed
2021-05-26 13:11hgbotNote Added: 0128659
2021-05-26 14:01hgbotNote Added: 0128664

Notes
(0128495)
hgbot   
2021-05-21 13:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/480 [^]
(0128658)
hgbot   
2021-05-26 13:11   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/480 [^]
(0128659)
hgbot   
2021-05-26 13:11   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: c3fa865795e6481c04ee2a838c326ab3a1150886
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2021-05-26T11:09:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/c3fa865795e6481c04ee2a838c326ab3a1150886 [^]

Fixed ISSUE-46648: fix missing G/L item for cashup

Fixed values of foreignExpected and foreignDifference when sending the cashup

---
M web-jspack/org.openbravo.pos2/src/model/user-interface/actions/cashup/MatchCountedWithExpected.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/actions/cashup/OpenCashup.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/actions/cashup/SetCountedAmount.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/actions/cashup/SetSplitMergeCoinsAndNotes.js
---
(0128664)
hgbot   
2021-05-26 14:01   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: da427359a21bdf1b2363a98dfa12050babebbaeb
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2021-05-26T14:01:05+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/da427359a21bdf1b2363a98dfa12050babebbaeb [^]

Related to ISSUE-46648: fix test MatchCountedWithExpected

---
M web-jspack/org.openbravo.pos2/src/model/user-interface/__test__/MatchCountedWithExpected.test.js
---