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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
  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.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to