From 7427656da34be462d1f92e4176b0ea6ac06c6097 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 Sep 2023 11:32:25 +0100 Subject: [PATCH] Bug 34752: Add AV handling to sort1/sort2 on baskets This patch adds Authorized Value handling for the display of sort1 and sort2 fields in the acquisitions basket display page. --- acqui/basket.pl | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 80c633cf56..e474fdfb68 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -448,8 +448,10 @@ sub get_order_infos { my %line = %{ $order }; # Don't show unreceived standing orders as received $line{order_received} = ( $qty == $order->{'quantityreceived'} && ( $basket->{is_standing} ? $qty : 1 ) ); - $line{basketno} = $basketno; - $line{budget_name} = $budget->{budget_name}; + $line{basketno} = $basketno; + $line{budget_name} = $budget->{budget_name}; + $line{sort1_authcat} = $budget->{sort1_authcat}; + $line{sort2_authcat} = $budget->{sort2_authcat}; # If we have an actual cost that should be the total, otherwise use the ecost $line{unitprice_tax_included} += 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 3e30015fd4..95b9a06c3c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -660,8 +660,8 @@ Edit [% END %] - [% books_loo.sort1 | html %] - [% books_loo.sort2 | html %] + [% AuthorisedValues.GetByCode( books_loo.sort1_authcat, books_loo.sort1 ) | html %] + [% AuthorisedValues.GetByCode( books_loo.sort2_authcat, books_loo.sort2 ) | html %] [% IF Koha.Preference('EDIFACT') && ediaccount %] [% books_loo.suppliers_report | html %] [% END %] -- 2.41.0