Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051983Retail ModulesWeb POSpublic2023-03-27 13:412023-04-21 07:59
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR23Q3 
approved
Gold
61256
No
0051983: Cash Up is processed but not updated in Errors While Importing POS Data if a previous cash up is in Error
Cash Up is processed but not updated in Errors While Importing POS Data if a previous cash up is in Error
In https://livebuilds.openbravo.com/retail_pi_pgsql/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^]

1) Create an order, add a product, add disc_fixed_5_perc discount, do not complete the order

2) Remove the discount in the Discounts and Promotions window

3) Complete the order in the POS
4) Check it is stuck in Errors While Importing POS Data with the following error:

insert or update on table "c_orderline_offer" violates foreign key constraint "c_orderline_offer_m_offer"
  Detail: Key (m_offer_id)=(...) is not present in table "m_offer".

5) Do the cash up twice
6) Check they are stuck in EWIPD window with the following error:

org.openbravo.base.exception.OBException: There are errors related to non-created customers, orders, or cash management movements pending to be processed. Process them before processing the cash ups

7) Create the discount again in the Discounts and Promotions window

8) Edit the JSON of the order in the EWIPD window and replace the old m_offer_id with the new one. Save the record again and check it is imported

9) Remove the complete id property for the cashTaxInfo section. For instance
"id":"00AF20570D3F86866DEABCFFD9ADEBEC",

10) Confirm the records in the EWIPD are sorted by creation date

11) Select the two cash-ups and save them again

12) The first one will fail with:

org.codehaus.jettison.json.JSONException: JSONObject["id"] not found.

13) The other cashup will still have the previous error, but if you navigate to the Channel Touchpoint - Cash Up History window, you will see it was processed. The Cash Up Report button appears

14) Set the removed part to the first JSON and confirm it is imported correctly

15) Save the second cash up and check the error message changes to:

org.openbravo.base.exception.OBException: Cash up was already processed
    at org.openbravo.retail.posterminal.UpdateCashup.getAndUpdateCashUp(UpdateCashup.java:76)
    at org.openbravo.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:99)
If a cash up fails, the rest of the cash ups shouldn't be processed
No tags attached.
Issue History
2023-03-27 13:41ngarciaNew Issue
2023-03-27 13:41ngarciaAssigned To => Retail
2023-03-27 13:41ngarciaOBNetwork customer => Gold
2023-03-27 13:41ngarciaSupport ticket => 61256
2023-03-27 13:41ngarciaTriggers an Emergency Pack => No
2023-03-27 13:41ngarciaIssue Monitored: networkb
2023-03-27 15:02maiteIssue Monitored: maite
2023-03-29 09:45guillermogilAssigned ToRetail => alainperez
2023-04-05 14:57alainperezStatusnew => scheduled
2023-04-17 07:18marvintmAssigned Toalainperez => ranjith_qualiantech_com
2023-04-20 04:33hgbotMerge Request Status => open
2023-04-20 04:33hgbotNote Added: 0148613
2023-04-21 07:59hgbotMerge Request Statusopen => approved
2023-04-21 07:59hgbotResolutionopen => fixed
2023-04-21 07:59hgbotStatusscheduled => closed
2023-04-21 07:59hgbotFixed in Version => RR23Q3
2023-04-21 07:59hgbotNote Added: 0148674
2023-04-21 07:59hgbotNote Added: 0148675

Notes
(0148613)
hgbot   
2023-04-20 04:33   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1148 [^]
(0148674)
hgbot   
2023-04-21 07:59   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: bf8b5c1ccfd89f1724dc5ad77ce43afc6d9cc0bd
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 21-04-2023 04:36:53
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/bf8b5c1ccfd89f1724dc5ad77ce43afc6d9cc0bd [^]

Fixed ISSUE-51983: Previous Cashup should be processed before current cashup

---
M src/org/openbravo/retail/posterminal/ProcessCashClose.java
---
(0148675)
hgbot   
2023-04-21 07:59   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1148 [^]