Openbravo Issue Tracking System - Retail Modules
View Issue Details
0057339Retail ModulesGift cards and gift voucherspublic2024-12-02 08:332024-12-02 08:33
william_vermersch 
Retail 
highmajorhave not tried
newopen 
5
RR20Q3 
 
No
0057339: Credit note transaction reverted in case of error, but payment is not removed
Hello, it seems it is possible to open multiple times the credit note consumption popin.

It is then possible to click on "Consume/Apply" multiple times to consume more than what is "possible to consume" on the credit note.

This is causing an issue, credit note with amount inferior to the total amount can be used to paid entirely the order.
1. Add products, Go to payment
2. Select credit note as payment method + Click on Enter
3. In the popin (with low latency, low processing) scan multiple time a credit note number
 => To make it easier scan it, wait that the list is loaded, delete the value in the search field, scan it again
4. It should open 2 popins (or X popins if you're fast enough)
5. Click on Apply
The issue is not reproducible every time, this is my hypothesis of what can happen.

What is happening every time is the second "Consume" call is throwing an error on the server side (expected): GCNV_ErrorGiftCardClosed

Then a new call to revert the transaction is made in the POS code, for that part there are 2 cases:

1. A error is thrown on the server => GCNV_ErrorGiftCardTransactionNotExists (seems OK)
2. No error is thrown on the server (I don't know why) => The transaction is deleted from the credit note, BUT the payment is not remove from the POS, allowing to consume again the credit note.

We couldn't reproduce it on the prepoduction environment, or local ones, only production ones.

Potential solutions:

1. Forbid to open multiple times the details gift card/credit note popin (if one was opened before and not closed)
2. In the previous specific case, when revertCreditNoteTransaction is coming back without issue => Remove the payment from the POS (the main issue is probably here)


No tags attached.
Issue History
2024-12-02 08:33william_vermerschNew Issue
2024-12-02 08:33william_vermerschAssigned To => Retail
2024-12-02 08:33william_vermerschTriggers an Emergency Pack => No

There are no notes attached to this issue.