[Bug 43955] New: POS receipt links open an intermediate page instead of printing directly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Bug ID: 43955 Summary: POS receipt links open an intermediate page instead of printing directly 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: --- Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1. Otherwise it shows the receipt with a "Print receipt" button and a "Close" button. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passes autoprint=1. The links that explicitly ask for a receipt do not, so clicking "Print receipt" now opens an intermediate page and a second click is needed before the browser print dialogue appears. Before Bug 41705 these links printed straight away, because the page included slip-print.inc. The links without autoprint=1 are: - pos/pay.tt: the "Print receipt" button in the "Payment received" alert (shown when FinePaymentAutoPopup is off) - pos/register.tt: the receipt action in the cash register transaction history (window.open) - members/boraccount.tt: the receipt action in the patron's Accounting transactions table Libraries who do not want the automatic receipt pop-up after patron account payments cannot get the old behaviour back: setting FinePaymentAutoPopup to "Do" removes the extra step in POS but also turns on the automatic pop-up in members/pay.pl and members/paycollect.pl. Proposed fix: add autoprint=1 to those three links, so that explicitly asking for a receipt prints it directly regardless of FinePaymentAutoPopup. The manual Print and Close buttons stay for anyone who opens the receipt page without autoprint. The Email receipt actions are unaffected. To test: 1. Enable EnablePointOfSale and UseCashRegisters and create a cash register. Set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale, complete a sale. In the "Payment received" alert click "Print receipt". => The receipt opens in a new tab and the print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history, use the print receipt action on a transaction. Same expectation. 4. In a patron's Accounting > Transactions, use the print receipt action on a payment. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically, as before. Related: Bug 41705, Bug 43402. -- 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=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk QA Contact|martin.renvoize@openfifth.c |koha-bugs@lists.koha-commun |o.uk |ity.org -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210032 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210032&action=edit Bug 43955: POS receipt links open an intermediate page instead of printing directly Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1, and otherwise shows the receipt with Print and Close buttons. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passed autoprint=1. The links that explicitly ask for a receipt did not, so they needed a second click before the browser print dialogue appeared. Add autoprint=1 to the three links that open pos/printreceipt.pl: - the "Print receipt" button in the "Payment received" alert on pos/pay.tt - the receipt action in the cash register transaction history (pos/register.tt) - the Print action for payout rows in the patron's Accounting table (members/boraccount.tt). Ordinary payment receipts there use members/printfeercpt.pl, which already prints directly. The manual Print and Close buttons on the receipt page are kept for anyone opening it without autoprint. To test: 1. Enable EnablePointOfSale and UseCashRegisters, create a cash register and set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale complete a sale and click "Print receipt" in the "Payment received" alert. => The print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history click the print receipt action for a transaction. Same expectation. 4. Pay out an account credit (cash register refund), then in the patron's Accounting > Transactions click Print on the payout line. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |Needs Signoff --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Clarification on the scope of this patch: the Accounting link it changes (members/boraccount.tt) is only the Print action shown for PAYOUT rows, which is the only Accounting receipt that goes through pos/printreceipt.pl. Ordinary payment receipts in Accounting already use members/printfeercpt.pl, which prints directly, so they are not affected by this bug and are not changed. I tested the three affected links in a browser with window.print stubbed to count calls, with FinePaymentAutoPopup off: - POS "Payment received" > Print receipt - Cash register transaction history > print receipt - Accounting > Print on a payout row Before the patch each one opened the receipt page with its Print button and made no print call. After the patch each prints straight away. The receipt page opened without autoprint still shows the Print and Close buttons, and the members/printfeercpt.pl receipts behave as before. The links are normal user clicks (target="_blank" anchors, and a window.open inside a click handler for the register history), so this does not reintroduce the popup blocker problem fixed by Bug 41705. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210032|0 |1 is obsolete| | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 210039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210039&action=edit Bug 43955: POS receipt links open an intermediate page instead of printing directly Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1, and otherwise shows the receipt with Print and Close buttons. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passed autoprint=1. The links that explicitly ask for a receipt did not, so they needed a second click before the browser print dialogue appeared. Add autoprint=1 to the three links that open pos/printreceipt.pl: - the "Print receipt" button in the "Payment received" alert on pos/pay.tt - the receipt action in the cash register transaction history (pos/register.tt) - the Print action for payout rows in the patron's Accounting table (members/boraccount.tt). Ordinary payment receipts there use members/printfeercpt.pl, which already prints directly. The manual Print and Close buttons on the receipt page are kept for anyone opening it without autoprint. To test: 1. Enable EnablePointOfSale and UseCashRegisters, create a cash register and set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale complete a sale and click "Print receipt" in the "Payment received" alert. => The print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history click the print receipt action for a transaction. Same expectation. 4. Pay out an account credit (cash register refund), then in the patron's Accounting > Transactions click Print on the payout line. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically. 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. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- I've signed off, but have one question: After printing is the page with "Print receipt" and "Close buttons" still expected to show? I'm assuming it is. Testing notes (using KTD): 1. After step 1, add an item for sale: - Go to Administration > Accounting > Debit types > New debit type - Enter details: . Debit type code . Default amount . Description . Checkbox - "Can be sold?" - Save -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Bo Gustavsson <bosse@gustavsson.one> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210039|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 --- Comment #5 from Bo Gustavsson <bosse@gustavsson.one> --- Created attachment 210053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210053&action=edit Bug 43955: POS receipt links open an intermediate page instead of printing directly Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1, and otherwise shows the receipt with Print and Close buttons. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passed autoprint=1. The links that explicitly ask for a receipt did not, so they needed a second click before the browser print dialogue appeared. Add autoprint=1 to the three links that open pos/printreceipt.pl: - the "Print receipt" button in the "Payment received" alert on pos/pay.tt - the receipt action in the cash register transaction history (pos/register.tt) - the Print action for payout rows in the patron's Accounting table (members/boraccount.tt). Ordinary payment receipts there use members/printfeercpt.pl, which already prints directly. The manual Print and Close buttons on the receipt page are kept for anyone opening it without autoprint. To test: 1. Enable EnablePointOfSale and UseCashRegisters, create a cash register and set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale complete a sale and click "Print receipt" in the "Payment received" alert. => The print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history click the print receipt action for a transaction. Same expectation. 4. Pay out an account credit (cash register refund), then in the patron's Accounting > Transactions click Print on the payout line. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Bo Gustavsson <bosse@gustavsson.one> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Lucas Gass (lukeg) <lucas@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=43955 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210053|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=43955 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 210675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210675&action=edit Bug 43955: POS receipt links open an intermediate page instead of printing directly Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1, and otherwise shows the receipt with Print and Close buttons. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passed autoprint=1. The links that explicitly ask for a receipt did not, so they needed a second click before the browser print dialogue appeared. Add autoprint=1 to the three links that open pos/printreceipt.pl: - the "Print receipt" button in the "Payment received" alert on pos/pay.tt - the receipt action in the cash register transaction history (pos/register.tt) - the Print action for payout rows in the patron's Accounting table (members/boraccount.tt). Ordinary payment receipts there use members/printfeercpt.pl, which already prints directly. The manual Print and Close buttons on the receipt page are kept for anyone opening it without autoprint. To test: 1. Enable EnablePointOfSale and UseCashRegisters, create a cash register and set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale complete a sale and click "Print receipt" in the "Payment received" alert. => The print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history click the print receipt action for a transaction. Same expectation. 4. Pay out an account credit (cash register refund), then in the patron's Accounting > Transactions click Print on the payout line. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Bo Gustavsson <bosse@gustavsson.one> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k Status|Passed QA |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210675|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=43955 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211535&action=edit Bug 43955: POS receipt links open an intermediate page instead of printing directly Since Bug 41705, pos/printreceipt.tt only prints on load when the URL has autoprint=1, and otherwise shows the receipt with Print and Close buttons. Only the automatic flow (FinePaymentAutoPopup on, redirect from pos/pay.pl) passed autoprint=1. The links that explicitly ask for a receipt did not, so they needed a second click before the browser print dialogue appeared. Add autoprint=1 to the three links that open pos/printreceipt.pl: - the "Print receipt" button in the "Payment received" alert on pos/pay.tt - the receipt action in the cash register transaction history (pos/register.tt) - the Print action for payout rows in the patron's Accounting table (members/boraccount.tt). Ordinary payment receipts there use members/printfeercpt.pl, which already prints directly. The manual Print and Close buttons on the receipt page are kept for anyone opening it without autoprint. To test: 1. Enable EnablePointOfSale and UseCashRegisters, create a cash register and set FinePaymentAutoPopup to "Don't show". 2. In Point of Sale complete a sale and click "Print receipt" in the "Payment received" alert. => The print dialogue appears straight away. (Before the patch: a page with a Print button.) 3. In the cash register's transaction history click the print receipt action for a transaction. Same expectation. 4. Pay out an account credit (cash register refund), then in the patron's Accounting > Transactions click Print on the payout line. Same expectation. 5. Set FinePaymentAutoPopup to "Do" and complete a POS sale: the receipt still prints automatically. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Bo Gustavsson <bosse@gustavsson.one> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43955 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=43955 --- Comment #8 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