From 7d7cf0d3090429c75f1b2e4cb2a2c359fb3de24b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 9 Sep 2020 15:34:13 +0100 Subject: [PATCH] Bug 26418: [20.05] Fix translatability of REFUND credit type The description of REFUND type accountline credits introduced with the "issue refund" feature is not translatable. To test: - Make sure a language with a complete translation is installed - Switch to the language - Go to any user account - Add a manual invoice - Pay it off fully or partially - Click on "issue refund" - Confirm the refund - Check the description of the line in the patron account is not translated. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 2 +- .../opac-tmpl/bootstrap/en/includes/account-table.inc | 9 +++++++-- pos/register.pl | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc index 3e37c8d407..62ea570040 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -7,7 +7,7 @@ [%- CASE 'FORGIVEN' -%]Forgiven [%- CASE 'CREDIT' -%]Credit [%- CASE 'LOST_FOUND' -%]Lost item fee refund - [%- CASE 'Refund' -%]Refund + [%- CASE 'REFUND' -%]Refund [%- CASE -%][% account.credit_type.description | html %] [%- END -%] [%- ELSIF account.debit_type_code -%] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc index 93f9eeb920..9d5803d3a5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -176,6 +176,7 @@ [%- CASE 'FORGIVEN' -%]Forgiven [%- CASE 'CREDIT' -%]Credit [%- CASE 'LOST_FOUND' -%]Lost item fee refund + [%- CASE 'REFUND' -%]Refund [%- CASE -%][% account.credit_type.description | html %] [%- END -%] [%- ELSIF account.debit_type_code -%] @@ -196,6 +197,11 @@ [%- CASE -%][% account.debit_type.description | html %] [%- END -%] [%- END -%] + [%- PROCESS account_status_description account=account -%] + +[%- END # /BLOCK account_type_description -%] + +[%- BLOCK account_status_description -%] [%- SWITCH account.status -%] [%- CASE 'UNRETURNED' -%] (Accruing) [%- CASE 'RETURNED' -%] (Returned) @@ -205,5 +211,4 @@ [%- CASE 'LOST' -%] (Lost) [%- CASE -%] [%- END -%] - -[%- END -%] +[%- END # /BLOCK account_status_description -%] diff --git a/pos/register.pl b/pos/register.pl index e73f3c14c9..97d6d63cf6 100755 --- a/pos/register.pl +++ b/pos/register.pl @@ -127,7 +127,7 @@ else { my $refund = $accountline->reduce( { - reduction_type => 'Refund', + reduction_type => 'REFUND', branch => $library_id, staff_id => $logged_in_user->id, interface => 'intranet', -- 2.20.1