Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Gift cards and gift vouchersmajoralways2021-10-14 18:292021-10-29 07:40
ReporteraaroncaleroView Statuspublic 
Assigned Tojustin_patterson 
PriorityurgentResolutionfixedFixed in VersionRR22Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0047854: Error trying to pay a ticket with Credit Notes after multiple Cancel and Replace executions

DescriptionWhen 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 ReproduceIn 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 SolutionThe 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] [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
hgbot (developer)
2021-10-25 18:06

Merge Request created: [^]
hgbot (developer)
2021-10-25 18:24

Merge Request created: [^]
hgbot (developer)
2021-10-26 11:40

Merge request closed: [^]
hgbot (developer)
2021-10-29 07:38

Merge request merged: [^]
marvintm (manager)
2021-10-29 07:40

Fixed by the following commit: [^]

- 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 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 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 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
Powered by Mantis Bugtracker