Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0047854 | Retail Modules | Gift cards and gift vouchers | public | 2021-10-14 18:29 | 2021-10-29 07:40 |
Reporter | aaroncalero | ||||
Assigned To | justin_patterson | ||||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | RR22Q1 | |||
Merge Request Status | approved | ||||
Review Assigned To | marvintm | ||||
OBNetwork customer | Gold | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0047854: Error trying to pay a ticket with Credit Notes after multiple Cancel and Replace executions | ||||
Description | When a ticket had originally some payments and the Cancel and Replace process is executed, the new ticket contains a 'Cancelled' payment with the amount paid originally. The payment method of this cancelled payment matches the original payment method, although no other details (paymentData or other extra fields) are transferred to the cancelled payment. When this cancelled payment's payment method is Credit Note, and a new Credit Note payment is added to the receipt, a javascript error appears in WebPOS | ||||
Steps To Reproduce | In an environment with the Giftcards module installed and Credit Notes configured (e.g. livebuilds modules instance, YS-11 terminal): 1) Create a new ticket and add a product. Click on the product line, and then on the EDIT tab, click on Return Line Go to the payments tab, select Credit Notes, and finish the ticket. This will create a new Credit Note in the system. 2) Create another ticket and add a product Click on the total amount button, select Credit Notes as payment method, and pay with the CN created in step 1. Finish the ticket 3) Load the ticket created in 2, go to the Menu > Cancel and Replace, click on the total amount button and click on Done without any other change. 4) Load the ticket created in step 3 (the ticket will have the same docNo as the one created in (2), with a "-1" at the end. Verify that the ticket contains a payment, labelled as cancelled. Click again on Menu > Cancel and replace. Add a second unit of the same product Click on the total amount button, and try to pay the remaining amount again with Credit Notes. The following error will appear in the console and the upper right corner: OBDAL error: TypeError: Cannot read properties of undefined (reading 'groupingCriteria'); * Steps 3 and 4 can be simplified if Prepayments and/or Delivery modes are configured on the terminal: instead of executing a second cancel and replace, add the extra unit during the first CR, and leave the amount unpaid. Then load the "-1" and complete the payment. | ||||
Proposed Solution | The postAddPayment hook defined on the Giftcards module[1] assume that all Credit notes payments contain a paymentData object, which is not true. Simply add the "... && payment.get('paymentData') && ..." condition to skip not valid payments. [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/blob/master/web/org.openbravo.retail.giftcards/js/hooks/postaddpaymenthook.js [^] | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2021-10-14 18:29 | aaroncalero | New Issue | |||
2021-10-14 18:29 | aaroncalero | Assigned To | => Retail | ||
2021-10-14 18:29 | aaroncalero | OBNetwork customer | => Gold | ||
2021-10-14 18:29 | aaroncalero | Triggers an Emergency Pack | => No | ||
2021-10-25 08:26 | marvintm | Status | new => scheduled | ||
2021-10-25 08:26 | marvintm | Assigned To | Retail => justin_patterson | ||
2021-10-25 18:06 | hgbot | Merge Request Status | => open | ||
2021-10-25 18:06 | hgbot | Note Added: 0132621 | |||
2021-10-25 18:24 | hgbot | Note Added: 0132623 | |||
2021-10-26 11:40 | hgbot | Note Added: 0132637 | |||
2021-10-29 07:38 | hgbot | Merge Request Status | open => approved | ||
2021-10-29 07:38 | hgbot | Note Added: 0132724 | |||
2021-10-29 07:40 | marvintm | Note Added: 0132725 | |||
2021-10-29 07:40 | marvintm | Status | scheduled => resolved | ||
2021-10-29 07:40 | marvintm | Fixed in Version | => RR22Q1 | ||
2021-10-29 07:40 | marvintm | Resolution | open => fixed | ||
2021-10-29 07:40 | marvintm | Review Assigned To | => marvintm | ||
2021-10-29 07:40 | marvintm | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|