From 772140dbc69f75eca878440315c6d092cc813af5 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. Signed-off-by: David Nind Signed-off-by: emlam Signed-off-by: Tomas Cohen Arazi --- acqui/basket.pl | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index d7f2d76a99..a96544b0c5 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 fd208325cf..ceceeeb5fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -664,8 +664,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 CAN_user_acquisition_edit_invoices %] [% books_loo.invoice_object.invoicenumber | html %] @@ -673,6 +673,7 @@ [% books_loo.invoice_object.invoicenumber | html %] [% END %] + [% IF Koha.Preference('EDIFACT') && ediaccount %] [% books_loo.suppliers_report | html %] [% END %] -- 2.39.5