Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050804Retail ModulesRetail API Gift Cardspublic2022-11-09 12:052023-02-22 09:28
collazoandy4 
 
normalmajorhave not tried
closedfixed 
5
 
 
No
0050804: Gift card consume amount api search by search key instead of gift card id
When two terminals have the same Return Sequence Prefix duplicated credit notes are created and a wrong Gift Card amount could be consumed in the ConsumeGiftCardAmount.java because the api search the gift cards by searchKey instead gift card id
Create a new receipt for Arturo Montoto and pay it
Return the previous receipt using Credit Note as payment method
Create another receipt for Arturo Montoto and pay it using the previous credit note
Check in backoffice the previous credit note is closed
Create a new receipt for Carl Studson and pay it
Return the previous receipt using Credit Note as payment method
Update the search key thought database to be the same as the one created for Arturo Montoto
Create a new receipt for Carl Studson and pay it using Credit Note as payment method
Check that the Credit Note created for Arturo Montoto could be used to be consumed or can be displayed in the Giftcard Details popup as the search is by search key instead the search key id
Search the giftcard by id instead of search key in ConsumeGiftCardAmount.java and FindGiftCard.java endpoints
No tags attached.
Issue History
2022-11-09 12:05collazoandy4New Issue
2022-11-09 12:05collazoandy4Assigned To => Retail
2022-11-09 12:05collazoandy4Triggers an Emergency Pack => No
2022-11-09 12:27hgbotNote Added: 0143299
2022-11-09 14:01ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-11-09 14:01ranjith_qualiantech_comStatusnew => scheduled
2022-11-28 08:07marvintmNote Added: 0144187
2022-11-28 08:07marvintmAssigned Toranjith_qualiantech_com => kchoperena
2022-11-28 08:07marvintmStatusscheduled => feedback
2023-01-04 01:20hgbotNote Added: 0145141
2023-01-04 18:38hgbotNote Added: 0145179
2023-01-05 12:00kchoperenaAssigned Tokchoperena => marvintm
2023-01-10 08:33marvintmStatusfeedback => scheduled
2023-01-10 08:33marvintmAssigned Tomarvintm => collazoandy4
2023-02-13 07:51marvintmAssigned Tocollazoandy4 =>
2023-02-21 15:29hgbotResolutionopen => fixed
2023-02-21 15:29hgbotStatusscheduled => closed
2023-02-21 15:29hgbotNote Added: 0146814
2023-02-21 15:29hgbotNote Added: 0146815
2023-02-22 09:28hgbotNote Added: 0146859

Notes
(0143299)
hgbot   
2022-11-09 12:27   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/166 [^]
(0144187)
marvintm   
2022-11-28 08:07   
The search key for the gift card instances is supposed to be unique, and that is why it is used across the application to identify them, in all flows (not just credit notes, but also gift cards and vouchers, and certificates).

If the return sequence prefix is duplicated, not just credit notes, but also duplicated returns will be generated, which would be even worse, right?

IMO we should not change the API, but identify why the search key for credit notes is duplicated, and prevent that.
(0145141)
hgbot   
2023-01-04 01:20   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/166 [^]
(0145179)
hgbot   
2023-01-04 18:38   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/181 [^]
(0146814)
hgbot   
2023-02-21 15:29   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: ec230b52f44be12b73d0cc8d55abfae667c43e80
Author: Andy Armaignac Collazo <andy.collazo@openbravo.com>
Date: 21-02-2023 14:29:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/ec230b52f44be12b73d0cc8d55abfae667c43e80 [^]

Fixes ISSUE-50804: Added Unique constraints for value column

---
A build/classes/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey.class
A build/classes/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKeyData.class
A src-util/buildvalidation/src/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey.java
A src-util/buildvalidation/src/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey_data.xsql
M src-db/database/model/tables/GCNV_GIFTCARD_INST.xml
M src/org/openbravo/retail/giftcards/GiftCardModel.java
---
(0146815)
hgbot   
2023-02-21 15:29   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/181 [^]
(0146859)
hgbot   
2023-02-22 09:28   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: e540226dc3c27a0dd731d8b69e96696854c20184
Author: Aaron Calero <aaron.calero@openbravo.com>
Date: 22-02-2023 09:25:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/e540226dc3c27a0dd731d8b69e96696854c20184 [^]

Related to ISSUE-50804: Fixed dbconsistency

---
M src-db/database/model/tables/GCNV_GIFTCARD_INST.xml
---