Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0047854 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Gift cards and gift vouchers | major | always | 2021-10-14 18:29 | 2021-10-29 07:40 | |||
Reporter | aaroncalero | View Status | public | |||||
Assigned To | justin_patterson | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR22Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
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 [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0132621) hgbot (developer) 2021-10-25 18:06 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/100 [^] |
(0132623) hgbot (developer) 2021-10-25 18:24 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/446 [^] |
(0132637) hgbot (developer) 2021-10-26 11:40 |
Merge request closed: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/446 [^] |
(0132724) hgbot (developer) 2021-10-29 07:38 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/100 [^] |
(0132725) marvintm (viewer) 2021-10-29 07:40 |
Fixed by the following commit: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/ffe9e571c6c7ff007bb18784d680df5173472966 [^] |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |