Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049383Retail ModulesRetail APIpublic2022-05-24 07:572022-06-23 08:46
marvintm 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR22Q3 
No
0049383: Push API doesn't work for "Cancel Layaway/Order" flow
Currently the Push API integration is working correctly for normal orders or returns, and also the Cancel and Replace flow.

However, it does not work for the Cancel Layaway flow. The cancelation order is not synchronized.
- Configure the Push API functionality, using https://webhook.site [^]

http://wiki.openbravo.com/wiki/Push_API [^]
https://simonfredsted.com/1583 [^]

- Create a layaway from POS. Realise that the layaway was correctly synchronized to webhook.site
- Open the layaway from POS. Select "Cancel this layaway" and complete it. Realise that the cancelation layaway was not synchronized to webhook.site.
The problem is that in the Cancel Layaway flow, the hooks are not being executed. A potential fix that can be analysed would be to replace the following line in OrderLoader:
CancelAndReplaceUtils.cancelOrder(jsonorder.getString("orderid"),

by

order = CancelAndReplaceUtils.cancelOrder(jsonorder.getString("orderid"),

Then, it is also necessary to fix the "cancelOrder" method in CancelAndReplaceUtils to ensure that the cancelation order is returned.

If this fix is done, then it is also necessary to review the OrderLoaderEventsHook as it will be synchronizing the cancelation ticket twice with the current implementation, which we don't want.
No tags attached.
related to feature request 0049260 closed ranjith_qualiantech_com The delivered quantity is incorrect for a cancelled layaway 
Issue History
2022-05-24 07:57marvintmNew Issue
2022-05-24 07:57marvintmAssigned To => Triage Platform Conn
2022-05-24 07:57marvintmTriggers an Emergency Pack => No
2022-05-24 07:57marvintmAssigned ToTriage Platform Conn => Retail
2022-05-24 07:57marvintmRelationship addedrelated to 0049260
2022-05-26 06:52ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-05-26 06:52ranjith_qualiantech_comStatusnew => scheduled
2022-05-31 10:00hgbotNote Added: 0137868
2022-05-31 10:00hgbotNote Added: 0137869
2022-05-31 10:00hgbotNote Added: 0137870
2022-06-23 08:46hgbotResolutionopen => fixed
2022-06-23 08:46hgbotStatusscheduled => closed
2022-06-23 08:46hgbotFixed in Version => RR22Q3
2022-06-23 08:46hgbotNote Added: 0138668
2022-06-23 08:46hgbotNote Added: 0138669
2022-06-23 08:46hgbotNote Added: 0138670
2022-06-23 08:46hgbotNote Added: 0138671
2022-06-23 08:46hgbotNote Added: 0138672
2022-06-23 08:46hgbotNote Added: 0138673

Notes
(0137868)
hgbot   
2022-05-31 10:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/814 [^]
(0137869)
hgbot   
2022-05-31 10:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/47 [^]
(0137870)
hgbot   
2022-05-31 10:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/123 [^]
(0138668)
hgbot   
2022-06-23 08:46   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 9a4d4cd60647d942ea8a6e41b9a9307b18fa832b
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-06-2022 06:46:31
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/9a4d4cd60647d942ea8a6e41b9a9307b18fa832b [^]

Fixed ISSUE-49383: Cancelled Order should be used in OrderLoaderHook when doing CR

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0138669)
hgbot   
2022-06-23 08:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/814 [^]
(0138670)
hgbot   
2022-06-23 08:46   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api [^]
Changeset: 7f5babb18ac13b49ed38daaee7568062d26f7a03
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-06-2022 06:46:32
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/commit/7f5babb18ac13b49ed38daaee7568062d26f7a03 [^]

Related to ISSUE-49383: Business API Event for Cancelled Order should be triggered when doing CR

---
M src/org/openbravo/retail/api/events/order/OrderLoaderEventsHook.java
---
(0138671)
hgbot   
2022-06-23 08:46   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 18cd1623b1c42fc97e92238e0c97c0c31b0e6ac0
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-06-2022 06:46:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/18cd1623b1c42fc97e92238e0c97c0c31b0e6ac0 [^]

Related to ISSUE-49383: Removed CancelLayaway Hook
* CancelLayaway Hook implementation is replaced by OrderLoader payment hook

---
M src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
R src/org/openbravo/retail/giftcards/hooks/CancelLayawayHookGiftCard.java
---
(0138672)
hgbot   
2022-06-23 08:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/123 [^]
(0138673)
hgbot   
2022-06-23 08:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/47 [^]