[Bug 43402] New: Offer button to print receipt when collecting account payments
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Bug ID: 43402 Summary: Offer button to print receipt when collecting account payments Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: jheltibridle@rcplib.org QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Currently, when you take a payment on a patron's account, you have the choice to enable a system preference to force receipts or not. If you choose to not force the receipt popup with the system preference, there is no quick method to print the payment receipt. To print the receipt, you have to click to the Transactions tab, find the payment you just took, scroll to the right, and click the receipt button and choose print or email. In the Point of Sale module, when you confirm a payment, two links are provided in the audio-alert-action div. This is on the same screen where the payment was, which makes it easy to choose to print the receipt. I would like to see something similar on the members/pay.pl screen. An additional enhancement would be to give these buttons an id so they can be styled using IntranetUserCSS. -- 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=43402 Cheryl <clackman@fargolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clackman@fargolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 koha-US bug tracker <bugzilla@koha-us.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@koha-us.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Chip Halvorsen <Chip.Halvorsen@WestlakeLibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Chip.Halvorsen@WestlakeLibr | |ary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Elizabeth Hoffman <ehoffman@plumcreeklibrary.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ehoffman@plumcreeklibrary.n | |et -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Scoping note: this patch adds the "Payment received" notification box (Print/Email receipt) for members/pay.tt and members/boraccount.tt, modeled directly on the pattern Bug 41705 introduced for pos/pay.tt ("Use PRG pattern for POS receipt printing to avoid popup blockers"). Both pages already receive payment_id/change_given via the existing redirects from members/paycollect.pl, and the email action reuses boraccount.pl's existing cud-send_receipt handler, so no controller changes were needed for this part. Worth noting as context: unlike POS after Bug 41705, this page still triggers its FinePaymentAutoPopup receipt via a plain client-side window.open() on page load (see boraccount.tt/pay.tt/paycollect.tt), which carries the same popup-blocker risk Bug 41705 fixed for POS. Porting that same PRG pattern here turned out to be more involved than a straight copy-paste, because paying/writing off a charge here can also trigger item renewal feedback (renew_result) and a refreshed balance view in the same tab that the popup currently supplements, rather than replaces. I've filed Bug 43451 to track that separately, with the design tradeoffs discussed there, so it can get proper consideration rather than being rushed through alongside this patch. Also see Bug 43288 (change/change_given param mismatch on these same printfeercpt.pl links) - this patch's new Print receipt links use the already-corrected change= param name. -- 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=43402 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 204776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204776&action=edit Bug 43402: Offer button to print/email receipt when collecting account payments Syncs the "Payment received" notification introduced for the Point of Sale module (bug 41705) to the patron account payment screens. When FinePaymentAutoPopup is off, taking a payment via members/paycollect.pl now lands on either members/pay.tt or members/boraccount.tt (depending on the payment path) with an inline alert offering to print or email the receipt for the transaction that was just taken, instead of requiring a trip to the Transactions tab to find the line and use its row-level receipt actions. Both pages already received payment_id/change_given via the existing PRG-style redirects from paycollect.pl, so no controller changes were required - the email action reuses boraccount.pl's existing cud-send_receipt handler. The print/email buttons on all three payment screens (POS, pay, boraccount) now carry stable ids so they can be targeted with IntranetUserCSS, as requested in the bug. Test plan: 1. Set FinePaymentAutoPopup to "Do not show" (off) 2. Go to a patron's account > Make a payment, pay a charge individually (pay_individual) -> lands on pay.tt with the "Payment received" alert; Print/Email receipt work 3. Select multiple charges and pay together (cud-pay) -> lands on boraccount.tt with the same alert 4. Set FinePaymentAutoPopup back on and confirm the alert is not shown (receipt pops up automatically instead, as before) 5. Confirm Point of sale payments still behave as before Sponsored-by: Martin Renvoize <martin.renvoize@gmail.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=43402 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 204777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204777&action=edit Bug 43402: (follow-up) Use change= not change_given= for the new print links printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash (matching the ACCOUNT_CREDIT/ CREDIT_* notice templates, which use [% change | $Price %]) - not change_given. The new alert's Print receipt links were built with change_given=, which would have silently dropped the Change amount from the printed receipt, same as the pre-existing bug fixed for the FinePaymentAutoPopup window.open calls by Bug 43288. Bug 43288 doesn't touch these new lines (they didn't exist yet when it was written), so fix them directly here rather than duplicating that patch. Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> -- 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=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Sponsorship status|--- |Sponsored CC| |martin.renvoize@openfifth.c | |o.uk Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- 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=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Initiative type|--- |Feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |26.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43451 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43451 [Bug 43451] Account payment receipt popup can be blocked by popup blockers (needs PRG pattern like Bug 41705) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41705 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=43402 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204777|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=43402 --- Comment #4 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 204784 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204784&action=edit Bug 43402: (follow-up) Use change= not change_given= for the new print links printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash (matching the ACCOUNT_CREDIT/ CREDIT_* notice templates, which use [% change | $Price %]) - not change_given. The new alert's Print receipt links were built with change_given=, which would have silently dropped the Change amount from the printed receipt, same as the pre-existing bug fixed for the FinePaymentAutoPopup window.open calls by Bug 43288. Bug 43288 doesn't touch these new lines (they didn't exist yet when it was written), so fix them directly here rather than duplicating that patch. Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Juliet Heltibridle <jheltibridle@rcplib.org> 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=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204776|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=43402 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210035&action=edit Bug 43402: Offer button to print/email receipt when collecting account payments Syncs the "Payment received" notification introduced for the Point of Sale module (bug 41705) to the patron account payment screens. When FinePaymentAutoPopup is off, taking a payment via members/paycollect.pl now lands on either members/pay.tt or members/boraccount.tt (depending on the payment path) with an inline alert offering to print or email the receipt for the transaction that was just taken, instead of requiring a trip to the Transactions tab to find the line and use its row-level receipt actions. Both pages already received payment_id/change_given via the existing PRG-style redirects from paycollect.pl, so no controller changes were required - the email action reuses boraccount.pl's existing cud-send_receipt handler. The print/email buttons on all three payment screens (POS, pay, boraccount) now carry stable ids so they can be targeted with IntranetUserCSS, as requested in the bug. Test plan: 1. Set FinePaymentAutoPopup to "Do not show" (off) 2. Go to a patron's account > Make a payment, pay a charge individually (pay_individual) -> lands on pay.tt with the "Payment received" alert; Print/Email receipt work 3. Select multiple charges and pay together (cud-pay) -> lands on boraccount.tt with the same alert 4. Set FinePaymentAutoPopup back on and confirm the alert is not shown (receipt pops up automatically instead, as before) 5. Confirm Point of sale payments still behave as before Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204784|0 |1 is obsolete| | Attachment #210035|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=43402 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210036&action=edit Bug 43402: Offer button to print/email receipt when collecting account payments Syncs the "Payment received" notification introduced for the Point of Sale module (bug 41705) to the patron account payment screens. When FinePaymentAutoPopup is off, taking a payment via members/paycollect.pl now lands on either members/pay.tt or members/boraccount.tt (depending on the payment path) with an inline alert offering to print or email the receipt for the transaction that was just taken, instead of requiring a trip to the Transactions tab to find the line and use its row-level receipt actions. Both pages already received payment_id/change_given via the existing PRG-style redirects from paycollect.pl, so no controller changes were required - the email action reuses boraccount.pl's existing cud-send_receipt handler. The print/email buttons on all three payment screens (POS, pay, boraccount) now carry stable ids so they can be targeted with IntranetUserCSS, as requested in the bug. Test plan: 1. Set FinePaymentAutoPopup to "Do not show" (off) 2. Go to a patron's account > Make a payment, pay a charge individually (pay_individual) -> lands on pay.tt with the "Payment received" alert; Print/Email receipt work 3. Select multiple charges and pay together (cud-pay) -> lands on boraccount.tt with the same alert 4. Set FinePaymentAutoPopup back on and confirm the alert is not shown (receipt pops up automatically instead, as before) 5. Confirm Point of sale payments still behave as before Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210037&action=edit Bug 43402: (follow-up) Use change= not change_given= for the new print links printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash (matching the ACCOUNT_CREDIT/ CREDIT_* notice templates, which use [% change | $Price %]) - not change_given. The new alert's Print receipt links were built with change_given=, which would have silently dropped the Change amount from the printed receipt, same as the pre-existing bug fixed for the FinePaymentAutoPopup window.open calls by Bug 43288. Bug 43288 doesn't touch these new lines (they didn't exist yet when it was written), so fix them directly here rather than duplicating that patch. Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Rebased on current main. Patches re-uploaded in order (the main patch first, then the follow-up) because the attachments had ended up out of order. No code changes. Both patches now carry the Signed-off-by line from the sandbox sign-off, which had only been recorded on the follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- When FinePaymentAutoPopup is set to "Don't," performing a writeoff results in the message "Payment received." This will confuse users, introducing the worry that they've accidentally entered a payment rather than a writeoff. This could send the transaction type to the template and accurately say either "Payment received" or "Fee written off." Or we could go simpler and just say "Transaction complete" for both transaction types. Otherwise this all looks good to me; happy to pass QA when this wording is addressed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210036|0 |1 is obsolete| | Attachment #210037|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=43402 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210183 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210183&action=edit Bug 43402: Offer button to print/email receipt when collecting account payments Syncs the "Payment received" notification introduced for the Point of Sale module (bug 41705) to the patron account payment screens. When FinePaymentAutoPopup is off, taking a payment via members/paycollect.pl now lands on either members/pay.tt or members/boraccount.tt (depending on the payment path) with an inline alert offering to print or email the receipt for the transaction that was just taken, instead of requiring a trip to the Transactions tab to find the line and use its row-level receipt actions. Both pages already received payment_id/change_given via the existing PRG-style redirects from paycollect.pl, so no controller changes were required - the email action reuses boraccount.pl's existing cud-send_receipt handler. The print/email buttons on all three payment screens (POS, pay, boraccount) now carry stable ids so they can be targeted with IntranetUserCSS, as requested in the bug. Test plan: 1. Set FinePaymentAutoPopup to "Do not show" (off) 2. Go to a patron's account > Make a payment, pay a charge individually (pay_individual) -> lands on pay.tt with the "Payment received" alert; Print/Email receipt work 3. Select multiple charges and pay together (cud-pay) -> lands on boraccount.tt with the same alert 4. Set FinePaymentAutoPopup back on and confirm the alert is not shown (receipt pops up automatically instead, as before) 5. Confirm Point of sale payments still behave as before Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210184&action=edit Bug 43402: (follow-up) Use change= not change_given= for the new print links printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash (matching the ACCOUNT_CREDIT/ CREDIT_* notice templates, which use [% change | $Price %]) - not change_given. The new alert's Print receipt links were built with change_given=, which would have silently dropped the Change amount from the printed receipt, same as the pre-existing bug fixed for the FinePaymentAutoPopup window.open calls by Bug 43288. Bug 43288 doesn't touch these new lines (they didn't exist yet when it was written), so fix them directly here rather than duplicating that patch. Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210185&action=edit Bug 43402: (QA follow-up) Say that a fee was written off, not that a payment was received The notification offered after a payment is taken on the patron account pages said "Payment received" for a write off too, which could make staff worry that they had entered a payment rather than a write off. pay.pl and boraccount.pl now look up the credit by its payment_id, on the patron's account, and give its type to the template, which says "Fee written off" for a write off and keeps "Payment received" otherwise. As a result the notification, and the links to its receipt, are only shown for a credit that is on the account of the patron being looked at, instead of for any payment_id. To test: 1. Set FinePaymentAutoPopup to "Do not show" 2. Write off a fee, individually (Write off) and by selecting charges (Write off selected) => "Fee written off", with Print/Email receipt 3. Pay a fee, individually and by selecting charges => "Payment received", with Print/Email receipt 4. Open members/pay.pl or members/boraccount.pl with the payment_id of another patron's payment => No notification 5. Run the Cypress spec t/cypress/integration/Circulation/PaymentReceiptAlert_spec.ts Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks Andrew. The notification now says "Fee written off" after a write off and keeps "Payment received" for payments, on both members/pay.pl and members/boraccount.pl: the controllers look up the credit by its payment_id and pass its type to the template, so no ambiguity about the transaction type. While there I made the notification (and its receipt links) only show for a credit that is on the account of the patron being looked at, rather than for any payment_id in the URL. There is a Cypress spec for it (t/cypress/integration/Circulation/PaymentReceiptAlert_spec.ts, 8 passing), koha-qa is clean, and the patches are rebased on current main with Juliet's sign-off kept on the first two. Back to Signed Off for QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |Martin Renvoize list of Sponsors| |<martin.renvoize@gmail.com> 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=43402 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210183|0 |1 is obsolete| | Attachment #210184|0 |1 is obsolete| | Attachment #210185|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=43402 --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 210232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210232&action=edit Bug 43402: Offer button to print/email receipt when collecting account payments Syncs the "Payment received" notification introduced for the Point of Sale module (bug 41705) to the patron account payment screens. When FinePaymentAutoPopup is off, taking a payment via members/paycollect.pl now lands on either members/pay.tt or members/boraccount.tt (depending on the payment path) with an inline alert offering to print or email the receipt for the transaction that was just taken, instead of requiring a trip to the Transactions tab to find the line and use its row-level receipt actions. Both pages already received payment_id/change_given via the existing PRG-style redirects from paycollect.pl, so no controller changes were required - the email action reuses boraccount.pl's existing cud-send_receipt handler. The print/email buttons on all three payment screens (POS, pay, boraccount) now carry stable ids so they can be targeted with IntranetUserCSS, as requested in the bug. Test plan: 1. Set FinePaymentAutoPopup to "Do not show" (off) 2. Go to a patron's account > Make a payment, pay a charge individually (pay_individual) -> lands on pay.tt with the "Payment received" alert; Print/Email receipt work 3. Select multiple charges and pay together (cud-pay) -> lands on boraccount.tt with the same alert 4. Set FinePaymentAutoPopup back on and confirm the alert is not shown (receipt pops up automatically instead, as before) 5. Confirm Point of sale payments still behave as before Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> 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=43402 --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 210233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210233&action=edit Bug 43402: (follow-up) Use change= not change_given= for the new print links printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash (matching the ACCOUNT_CREDIT/ CREDIT_* notice templates, which use [% change | $Price %]) - not change_given. The new alert's Print receipt links were built with change_given=, which would have silently dropped the Change amount from the printed receipt, same as the pre-existing bug fixed for the FinePaymentAutoPopup window.open calls by Bug 43288. Bug 43288 doesn't touch these new lines (they didn't exist yet when it was written), so fix them directly here rather than duplicating that patch. Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> 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=43402 --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 210234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210234&action=edit Bug 43402: (QA follow-up) Say that a fee was written off, not that a payment was received The notification offered after a payment is taken on the patron account pages said "Payment received" for a write off too, which could make staff worry that they had entered a payment rather than a write off. pay.pl and boraccount.pl now look up the credit by its payment_id, on the patron's account, and give its type to the template, which says "Fee written off" for a write off and keeps "Payment received" otherwise. As a result the notification, and the links to its receipt, are only shown for a credit that is on the account of the patron being looked at, instead of for any payment_id. To test: 1. Set FinePaymentAutoPopup to "Do not show" 2. Write off a fee, individually (Write off) and by selecting charges (Write off selected) => "Fee written off", with Print/Email receipt 3. Pay a fee, individually and by selecting charges => "Payment received", with Print/Email receipt 4. Open members/pay.pl or members/boraccount.pl with the payment_id of another patron's payment => No notification 5. Run the Cypress spec t/cypress/integration/Circulation/PaymentReceiptAlert_spec.ts Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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=43402 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=43402 --- Comment #17 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k --- Comment #18 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- 2 non-blockers for a possible follow-up: - t/cypress/integration/Circulation/PaymentReceiptAlert_spec.ts sets 'FinePaymentAutoPopup' back to '1' in its afterEach, but the default is '0' (see its row in installer/data/mysql/mandatory/sysprefs.sql). Running the spec leaves the pref changed: 1) Check 'FinePaymentAutoPopup' is set to 'Don't' 2) Run: yarn cypress run --spec t/cypress/integration/Circulation/PaymentReceiptAlert_spec.ts 3) Check 'FinePaymentAutoPopup' again: it is now set to 'Do' - The new receipt alert is nearly the same block in members/pay.tt and members/boraccount.tt (the [% IF payment_credit_type && !Koha.Preference('FinePaymentAutoPopup') %] block), and the payment lookup that feeds it is the same code in members/pay.pl and members/boraccount.pl (the 'if ($payment_id)' block). Any later change to the alert or the lookup has to be made twice. Potential candidate for DRY. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |When `FinePaymentAutoPopup` release notes| |is set to "Do not show", | |taking a payment or writing | |off fees on a patron's | |account now shows an alert | |on the resulting page, | |offering to print or email | |the receipt for that | |transaction. The alert | |reads "Payment received" | |for a payment and "Fee | |written off" for a write | |off. Point of sale payments | |otherwise behave as before. | |The print and email receipt | |buttons on the Point of | |sale, pay and account pages | |now have ids, so they can | |be styled with | |IntranetUserCSS. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #19 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 26.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43402 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #20 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 26.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org