From 7761db8052329411d6d67ab282f9f8c136feb567 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 11 Apr 2020 12:02:03 +0000 Subject: [PATCH] Bug 25119: Fix account type and description for individual writeoffs/payments When paying or writing off a single line from the list of pending charges, the account type displayed the code instead of the description. And when bug 23483 fixed the display of the description, 2 variables where missed. This change is only visible when looking at the page source: With the patch applied, the value will be filled with the description. To test: - Create one or more manual invoices of different types - Try to pay/write off using the buttons within the table - Verify the account type shows as code, not description - Apply patch - Repeat - Bonus points: Check the source code for the hidden input with description. Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- .../prog/en/modules/members/paycollect.tt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 842f5e6003..4f54f8a207 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -5,6 +5,7 @@ [% USE Price %] [% SET footerjs = 1 %] [% PROCESS 'payments.inc' %] +[% PROCESS 'accounts.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF type == 'WRITEOFF' %] @@ -83,7 +84,7 @@ <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /> <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual | html %]" /> <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber | html %]" /> - <input type="hidden" name="description" id="description" value="[% description | html %]" /> + <input type="hidden" name="description" id="description" value="[% individual_description | html %]" /> <input type="hidden" name="debit_type_code" id="debit_type_code" value="[% debit_type_code | html %]" /> <input type="hidden" name="amount" id="amount" value="[% amount | html %]" /> <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding | html %]" /> @@ -108,7 +109,8 @@ <td> [% individual_description | html %] </td> - <td>[% debit_type_code | html %]</td> + [% line.debit_type_code = debit_type_code %] + <td>[% PROCESS account_type_description account=line %]</td> <td class="debit">[% amount | format('%.2f') %]</td> <td class="debit">[% amountoutstanding | format('%.2f') %]</td> </tr></tbody> @@ -162,7 +164,7 @@ <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /> <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual | html %]" /> <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber | html %]" /> - <input type="hidden" name="description" id="description" value="[% description | html %]" /> + <input type="hidden" name="description" id="description" value="[% individual_description | html %]" /> <input type="hidden" name="debit_type_code" id="debit_type_code" value="[% debit_type_code | html %]" /> <input type="hidden" name="amount" id="amount" value="[% amount | html %]" /> <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id | html %]" /> @@ -181,7 +183,8 @@ <tfoot><tr><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tr></tfoot> <tbody><tr> <td>[% individual_description | html %]</td> - <td>[% debit_type_code | html %]</td> + [% line.debit_type_code = debit_type_code %] + <td>[% PROCESS account_type_description account=line %]</td> <td class="debit">[% amount | format('%.2f') %]</td> <td class="debit">[% amountoutstanding | format('%.2f') %]</td> </tr></tbody> -- 2.39.5