[Bug 37671] New: Can't print receipt for refund from cash register transaction history
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Bug ID: 37671 Summary: Can't print receipt for refund from cash register transaction history Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Point of Sale Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@ptfs-europe.com ERROR PROCESSING TEMPLATE: undef error - Exception 'Koha::Exceptions::Account::IsNotCredit' thrown 'Account line 321 is not a credit' at /kohadevbox/koha/pos/printreceipt.pl line 54. at /usr/lib/x86_64-linux-gnu/perl-base/Carp.pm line 289 1. Make a purchase through Point of Sale. 2. Go to the transaction history for the register you used. 3. Issue a refund for the purchase. 4. Click the "Print receipt" button for that refund. -- 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=37671 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org --- Comment #1 from Juliet Heltibridle <jheltibridle@rcplib.org> --- We need to be able to print a receipt for refunds to be placed in the cash drawer because this is the best way to notify the cash office a refund has happened. We've found a workaround by printing the receipt for the transaction again, which will have (Refunded) on the receipt. But having the button to print a receipt on the refund confuses staff, who click there first and then get a 500 error. If this cannot be fixed, it would be helpful to remove the button, or have it print the receipt from the refunded transaction. -- 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=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Comma delimited| |OpenFifth list of Sponsors| |<https://openfifth.co.uk/> Patch complexity|--- |Small patch Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Sponsorship status|--- |Sponsored -- 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=37671 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192335&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192336&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucy.vaux-harvey@openfifth. | |co.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24082 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24082 [Bug 24082] Add a 'refund' option to anonymous payments -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from David Nind <david@davidnind.com> --- Failing QA as I get this error: ERROR PROCESSING TEMPLATE: file error - parse error - input text line 5: unexpected token (\) [% PROCESS \"accounts.inc\" %] at /kohadevbox/koha/pos/printreceipt.pl line 68. at /usr/lib/x86_64-linux-gnu/perl-base/Carp.pm line 289 Is there anything else required to make this work Testing notes (using KTD): 1. EnablePointOfSale - set to 'enable' 2. UseCashRegisters - set to 'Use' 3. Add a cash register (Administration > Accounting > Cash registers > New cash register) 4. Add a debit type (Administration > Accounting > Debit types > New debit type) - Debit type code: BZ37671 - Default amount: $10 - Description: An item for purchase - Can be manually invoiced? Ticked - Can be sold? Ticked 5. Before the patch, I get the error in the bug description. 6. After the patch (I had to do a reset_all) I get the error above: - Apply patches - Update the database: updatedatabase - Restart everything: restart_all -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Oh, that's interesting. It looks like the yaml escaping come across from the installer files.. or perhaps in my trying to make sure the yaml installer and atomic update dies we're in sync I messed up and added the escaping into the update. I'll get that fixed. Thanks for testing David, as ever you are fantastic. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192335|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=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192336|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=37671 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192845 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192845&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192846 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192846&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Yup, my mistake in the YAML.. I'd double escaped! Should all work now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from David Nind <david@davidnind.com> --- Have retested, now getting this error message when trying to print the receipt for the refund: ERROR PROCESSING TEMPLATE: undef error - Exception 'Koha::Exceptions::Account::IsNotDebit' thrown 'Account line 3 is not a debit' at /kohadevbox/koha/pos/printreceipt.pl line 68. at /usr/lib/x86_64-linux-gnu/perl-base/Carp.pm line 289 Did a reset_all + cleared the browser cache. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192845|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=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192846|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=37671 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193257&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193258&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193259&action=edit Bug 37671: (follow-up) Use PAYOUT notice for payout receipts on patron account page This patch adds support for printing PAYOUT receipts from the patron account page (members/boraccount.pl) using the new PAYOUT notice template. Previously, PAYOUT debits used the generic invoice print template. Now they use the same dedicated PAYOUT receipt template that is used in the POS register, providing consistent receipt formatting across both interfaces. Test plan: 1. Create a charge on a patron account (e.g., Lost item) 2. Pay the charge 3. Refund the payment with a cash payout 4. On the patron account page, click "Print" for the PAYOUT transaction 5. Verify the receipt uses the PAYOUT notice template showing: - Transaction details (ID, operator, payout type) - Refund details showing what was refunded - Total payout amount 6. Verify it matches the format used in the POS register -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hmm, clearly my brain was mis-firing on this bug. I've fixed a few issues and tested it carefully myself again, all working on ktd now for me both at install and upgrade. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #14 from David Nind <david@davidnind.com> --- (In reply to Martin Renvoize (ashimema) from comment #13)
Hmm, clearly my brain was mis-firing on this bug.
I've fixed a few issues and tested it carefully myself again, all working on ktd now for me both at install and upgrade.
We are not having much luck with this one 8-) Getting an error when running the database update: Applying 3 patch(es): ✓ [1/3] Applied Bug 37671: Add new 'PAYOUT' notice template ✓ [2/3] Applied Bug 37671: Fix POS receipt printing for refunds ✓ [3/3] Applied Bug 37671: (follow-up) Use PAYOUT notice for payout receipts … ✓ Successfully applied 3 patch(es) from bug 37671 kohadev-koha@kohadevbox:koha(bz37671)$ updatedatabase DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_37671.pl [20:38:06]: Bug 37671 - Add PAYOUT notice template for POS refund receipts ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PAYOUT' %] <tr> <td> [% PROCESS account_t...' at line 4 at /kohadevbox/koha/C4/Installer.pm line 825 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193257|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=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193258|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=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193259|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=37671 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193922&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193923&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193924&action=edit Bug 37671: (follow-up) Use PAYOUT notice for payout receipts on patron account page This patch adds support for printing PAYOUT receipts from the patron account page (members/boraccount.pl) using the new PAYOUT notice template. Previously, PAYOUT debits used the generic invoice print template. Now they use the same dedicated PAYOUT receipt template that is used in the POS register, providing consistent receipt formatting across both interfaces. Test plan: 1. Create a charge on a patron account (e.g., Lost item) 2. Pay the charge 3. Refund the payment with a cash payout 4. On the patron account page, click "Print" for the PAYOUT transaction 5. Verify the receipt uses the PAYOUT notice template showing: - Transaction details (ID, operator, payout type) - Refund details showing what was refunded - Total payout amount 6. Verify it matches the format used in the POS register -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Bloomin' Quote characters! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 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=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193922|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=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193923|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=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193924|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=37671 --- Comment #19 from David Nind <david@davidnind.com> --- Created attachment 193934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193934&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. 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=37671 --- Comment #20 from David Nind <david@davidnind.com> --- Created attachment 193935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193935&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details Sponsored-by: OpenFifth <https://openfifth.co.uk/> 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=37671 --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 193936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193936&action=edit Bug 37671: (follow-up) Use PAYOUT notice for payout receipts on patron account page This patch adds support for printing PAYOUT receipts from the patron account page (members/boraccount.pl) using the new PAYOUT notice template. Previously, PAYOUT debits used the generic invoice print template. Now they use the same dedicated PAYOUT receipt template that is used in the POS register, providing consistent receipt formatting across both interfaces. Test plan: 1. Create a charge on a patron account (e.g., Lost item) 2. Pay the charge 3. Refund the payment with a cash payout 4. On the patron account page, click "Print" for the PAYOUT transaction 5. Verify the receipt uses the PAYOUT notice template showing: - Transaction details (ID, operator, payout type) - Refund details showing what was refunded - Total payout amount 6. Verify it matches the format used in the POS register 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=37671 --- Comment #22 from David Nind <david@davidnind.com> --- (In reply to Martin Renvoize (ashimema) from comment #18)
Bloomin' Quote characters!
🤣 Thanks Martin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #23 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks so much for persevering here David :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com 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=37671 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=37671 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193934|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=37671 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193935|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=37671 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193936|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=37671 --- Comment #24 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196700&action=edit Bug 37671: Add new 'PAYOUT' notice template When a refund is processed through Point of Sale, the system creates: 1. A credit account line (the refund) 2. A debit account line (the payout) The receipt printing logic currently only accounts for RECEIPTs against credits. This patch adds a new 'PAYOUT' template for dealing with the negative debits that make up a payout so we can construct a proper receipt for this action. 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=37671 --- Comment #25 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196701&action=edit Bug 37671: Fix POS receipt printing for refunds The receipt printing logic was failing because it always expected a credit but the "Print receipt" button was passing the payout debit line ID. This fix: - Updates pos/printreceipt.pl to use previously added PAYOUT template based on account line type - Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits - Throws proper error for unsupported transaction types Test plan: 1. Make a purchase through Point of Sale 2. Go to transaction history for the register used 3. Issue a refund for the purchase 4. Click "Print receipt" button for the refund 5. Verify receipt prints correctly with payout details Sponsored-by: OpenFifth <https://openfifth.co.uk/> 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=37671 --- Comment #26 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196702&action=edit Bug 37671: (follow-up) Use PAYOUT notice for payout receipts on patron account page This patch adds support for printing PAYOUT receipts from the patron account page (members/boraccount.pl) using the new PAYOUT notice template. Previously, PAYOUT debits used the generic invoice print template. Now they use the same dedicated PAYOUT receipt template that is used in the POS register, providing consistent receipt formatting across both interfaces. Test plan: 1. Create a charge on a patron account (e.g., Lost item) 2. Pay the charge 3. Refund the payment with a cash payout 4. On the patron account page, click "Print" for the PAYOUT transaction 5. Verify the receipt uses the PAYOUT notice template showing: - Transaction details (ID, operator, payout type) - Refund details showing what was refunded - Total payout amount 6. Verify it matches the format used in the POS register 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=37671 --- Comment #27 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196703&action=edit Bug 37671: (QA follow-up) Tidy printreceipt.pl 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=37671 --- Comment #28 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196704&action=edit Bug 37671: (QA follow-up) Add exec flag to atomicupdate 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=37671 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #29 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- please add release notes! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancements adds a release notes| |new PAYOUT notice template | |to be use for receipt | |printing of refund | |transactions. | | | |We then use that template | |from both the cash | |management registers page | |and the patron account | |pages. Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #30 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Release notes added -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #31 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #32 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Koha_Main_MariaDB_update catches this: Upgrade to 25.12.00.053 [18:44:56]: Bug 37671 - Add PAYOUT notice template for POS refund receipts [31mERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`letter`, CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE) at /kohadevbox/koha/C4/Installer.pm line 818 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #33 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 198665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198665&action=edit Bug 37671: (follow-up) Add INSERT IGNORE to db_rev Patch from commit 268f6f1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #34 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up 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=37671 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 --- Comment #35 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37671 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #36 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Enhancement - not backporting to 25.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org