From 22f0e01b09724bfbe0cd5eb857b5edaf4644d25d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Sep 2020 15:37:15 +0200 Subject: [PATCH] Bug 26323: Retrieve the correct NOT_LOAN value From the template we are assuming that items.notforloan is mapped with the NOT_LOAN authorised value category, but that is not necessarily the case. We must retrieve the correct AV category Signed-off-by: Martin Renvoize --- .../prog/en/modules/circ/circulation_batch_checkouts.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 8483d5763b..d7de611c3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -161,7 +161,7 @@ [% IF checkout_info.itemtype_notforloan %]
  • Item type is normally not for loan.
  • [% ELSIF checkout_info.item_notforloan %] - [% item_notforloan_lib = AuthorisedValues.GetByCode( 'NOT_LOAN', checkout_info.item_notforloan, 0 ) %] + [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => checkout_info.item_notforloan ) %]
  • Item is normally not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib | html %])[% END %].
  • [% END %] [% END %] @@ -220,7 +220,7 @@ [% IF checkout_info.itemtype_notforloan %]
  • Item type not for loan.
  • [% ELSIF checkout_info.item_notforloan %] - [% item_notforloan_lib = AuthorisedValues.GetByCode( 'NOT_LOAN', checkout_info.item_notforloan, 0 ) %] + [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => checkout_info.item_notforloan ) %]
  • Item not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib | html %])[% END %].
  • [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 1e1ca7d2ff..51d9264e92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -197,13 +197,13 @@ Not for loan status updated.
    Old value: [% IF errmsgloo.NotForLoanStatusUpdated.from %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %]. + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.from ) | html %]. [% ELSE %] Available for loan. [% END %]
    New value: [% IF errmsgloo.NotForLoanStatusUpdated.to %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) | html %]. + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.to ) | html %]. [% ELSE %] Available for loan. [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 57b6b1b9fd..c72d237b25 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -677,7 +677,7 @@ [% END %] [% IF ( itemloo.notforloan ) %] - Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %]) + Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %]) [% END %] -- 2.20.1