[Bug 43288] New: Change amount missing from printed fee receipts (change_given/change param mismatch)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43288 Bug ID: 43288 Summary: Change amount missing from printed fee receipts (change_given/change param mismatch) Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk Target Milestone: --- members/pay.tt, members/paycollect.tt, and members/boraccount.tt all open members/printfeercpt.pl with a change_given= query parameter after taking a payment (for the FinePaymentAutoPopup auto-printed receipt, and for the manual Print action). However printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash: substitute => { tendered => scalar $input->param('tendered'), change => scalar $input->param('change') } This matches the default ACCOUNT_CREDIT/CREDIT_PAYMENT notice templates, which use [% change | $Price %] (not change_given). Since nothing ever sends a change= param, the Change line on every printed fee receipt is silently blank. This isn't new: installer/data/mysql/db_revs/220600072.pl shows Koha previously migrated stored ACCOUNT_CREDIT letter content from [% change_given to [% change, so 'change' is the established name on the notice-template side. This patch fixes the three query strings that build the printfeercpt.pl URL to send change= instead of change_given=, rather than touching printfeercpt.pl or notice content. The change_given variable name is left alone everywhere else (hidden form fields, JS locals, Perl params) - this is purely about the query key at the printfeercpt.pl boundary. Test plan: 1. Set the FinePaymentAutoPopup system preference to "show" 2. Take a payment for a patron (via members/pay.pl or members/paycollect.pl) for less than the full amount tendered, so change is generated 3. Note the auto-popped-up receipt's Change line is blank 4. Apply the patch 5. Repeat step 2 6. Note the Change line now shows the correct amount 7. Repeat via the boraccount.pl account tab's Print action for a payment with change -- 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=43288 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 203578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203578&action=edit Bug 43288: Fix change amount missing from printed fee receipts pay.tt, paycollect.tt and boraccount.tt all open printfeercpt.pl with a change_given= query parameter after a payment, but printfeercpt.pl only ever reads a 'change' param into its GetPreparedLetter substitute hash - matching the ACCOUNT_CREDIT/CREDIT_* default notice templates, which use [% change | $Price %], not [% change_given | $Price %]. As a result the change amount is silently blank on every printed fee receipt that shows it, regardless of FinePaymentAutoPopup. Rather than touch printfeercpt.pl or the notice content (both already agree on 'change', matching a similar migration Koha did once before in installer/data/mysql/db_revs/220600072.pl going the same direction), fix the three query strings that build the printfeercpt.pl URL to send change= instead of change_given=. The change_given variable name is kept everywhere else (form fields, JS locals, Perl params) since this is purely about the query key at the printfeercpt.pl boundary. Test plan: 1) Set FinePaymentAutoPopup to 'show' 2) Take a payment for a patron via members/pay.pl or members/paycollect.pl that generates change (fine amount not evenly covered by cash tendered) 3) Note the auto-popped-up receipt shows the change amount (before this patch, the Change line was always blank) 4) Repeat via the boraccount.pl > printfeercpt.pl print receipt route -- 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=43288 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 -- 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=43288 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org