[Bug 44009] New: POS change-to-give modal stays open after Yes with FinePaymentAutoPopup
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Bug ID: 44009 Summary: POS change-to-give modal stays open after Yes with FinePaymentAutoPopup Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Point of Sale Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: martin.renvoize@openfifth.co.uk Target Milestone: --- When FinePaymentAutoPopup is enabled, pos/pay.tt submits the payment form to a new tab (target="_blank") so the receipt can open without being blocked by the browser (Bug 41705). The POS page itself never navigates, so after clicking "Yes" in the "The amount collected is more than the outstanding charge" modal, the modal stays on screen. The post-submit reset then clears the sale table, which recalculates the change against the still-populated "Amount tendered" field and writes that value into the modal. For example, with a sale of 2.00 and 3.00 tendered the modal first says the change is 1.00, and after clicking Yes it says 3.00. Clicking Yes again is blocked by the now-empty required "Amount tendered" field and the modal reads 0.00. Only "No" dismisses it. The payment itself is recorded once, on the first Yes (checked in the accountlines table), so this is a display problem, not a double charge. It is much more confusing at a till, and sites that make the modal static (no backdrop or Escape dismissal) cannot dismiss it except with No. The patch hides the modal when Yes is clicked, before the form is submitted. Reproduced on 25.11.x. The relevant code is identical on main (the same setTimeout reset in the FinePaymentAutoPopup branch and no modal hide), but I have only reproduced it on 25.11. Test plan: 1. Enable EnablePointOfSale, UseCashRegisters and FinePaymentAutoPopup ("Do"). Have a cash register and a debit type that can be sold. 2. In Point of sale add an item of 1.00 and enter 2.00 as the amount tendered. Choose Cash and a register, then click Confirm. 3. Click "Yes" in the change modal. => Before the patch: the modal stays open and its change figure changes. After: the modal closes, the receipt opens in a new tab and the sale is cleared. 4. Repeat with two items and a larger tendered amount, and with an exact amount (no modal appears). 5. Confirm only one payment is recorded per sale. 6. Set FinePaymentAutoPopup to "Don't show" and repeat step 2: the modal closes on Yes and the "Payment received" page is shown, as before. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210588&action=edit Bug 44009: Close the POS change-to-give modal after confirming When FinePaymentAutoPopup is enabled, pos/pay.tt submits the payment form to a new tab (target="_blank") so the receipt can open without a popup blocker (Bug 41705). The POS page itself never navigates, so after clicking "Yes" in the "amount collected is more than the outstanding charge" modal it stays on screen. The post-submit reset then clears the sale table, which recalculates the change against the still-populated "Amount tendered" field and writes that value into the modal (so "1.00" becomes the full tendered amount). Clicking "Yes" again is blocked by the now-empty required field, and the modal then reads 0.00. Only "No" dismisses it. The payment itself is recorded once, on the first "Yes". Hide the modal when "Yes" is clicked, before the form is submitted. To test: 1. Enable EnablePointOfSale, UseCashRegisters and FinePaymentAutoPopup ("Do"), have a cash register and a saleable debit type. 2. In Point of Sale add an item of 1.00 and enter 2.00 as the amount tendered, choose Cash and a register, then Confirm. 3. Click "Yes" in the change modal. => Before: the modal stays open and its change figure changes. => After: the modal closes, the receipt opens in a new tab and the sale is cleared. 4. Repeat with two items and a larger tendered amount, and with an exact amount (no modal). 5. Confirm only one payment is recorded per sale. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Depends on| |41705 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41705 [Bug 41705] Popup blockers may be triggered by options to automatically display payment receipt for printing after making a payments -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210588|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 210792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210792&action=edit Bug 44009: Close the POS change-to-give modal after confirming When FinePaymentAutoPopup is enabled, pos/pay.tt submits the payment form to a new tab (target="_blank") so the receipt can open without a popup blocker (Bug 41705). The POS page itself never navigates, so after clicking "Yes" in the "amount collected is more than the outstanding charge" modal it stays on screen. The post-submit reset then clears the sale table, which recalculates the change against the still-populated "Amount tendered" field and writes that value into the modal (so "1.00" becomes the full tendered amount). Clicking "Yes" again is blocked by the now-empty required field, and the modal then reads 0.00. Only "No" dismisses it. The payment itself is recorded once, on the first "Yes". Hide the modal when "Yes" is clicked, before the form is submitted. To test: 1. Enable EnablePointOfSale, UseCashRegisters and FinePaymentAutoPopup ("Do"), have a cash register and a saleable debit type. 2. In Point of Sale add an item of 1.00 and enter 2.00 as the amount tendered, choose Cash and a register, then Confirm. 3. Click "Yes" in the change modal. => Before: the modal stays open and its change figure changes. => After: the modal closes, the receipt opens in a new tab and the sale is cleared. 4. Repeat with two items and a larger tendered amount, and with an exact amount (no modal). 5. Confirm only one payment is recorded per sale. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@openfifth.c |andrew@bywatersolutions.com |o.uk | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210792|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 211097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211097&action=edit Bug 44009: Close the POS change-to-give modal after confirming When FinePaymentAutoPopup is enabled, pos/pay.tt submits the payment form to a new tab (target="_blank") so the receipt can open without a popup blocker (Bug 41705). The POS page itself never navigates, so after clicking "Yes" in the "amount collected is more than the outstanding charge" modal it stays on screen. The post-submit reset then clears the sale table, which recalculates the change against the still-populated "Amount tendered" field and writes that value into the modal (so "1.00" becomes the full tendered amount). Clicking "Yes" again is blocked by the now-empty required field, and the modal then reads 0.00. Only "No" dismisses it. The payment itself is recorded once, on the first "Yes". Hide the modal when "Yes" is clicked, before the form is submitted. To test: 1. Enable EnablePointOfSale, UseCashRegisters and FinePaymentAutoPopup ("Do"), have a cash register and a saleable debit type. 2. In Point of Sale add an item of 1.00 and enter 2.00 as the amount tendered, choose Cash and a register, then Confirm. 3. Click "Yes" in the change modal. => Before: the modal stays open and its change figure changes. => After: the modal closes, the receipt opens in a new tab and the sale is cleared. 4. Repeat with two items and a larger tendered amount, and with an exact amount (no modal). 5. Confirm only one payment is recorded per sale. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44009 --- Comment #4 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org