@@ -, +, @@ - Basket group closed date and delivery place (in basketgroup column) - Additional order fields (one column for each additional field) --- C4/Acquisition.pm | 2 ++ acqui/histsearch.pl | 21 ++++++++++++++++++ .../prog/en/modules/acqui/histsearch.tt | 23 ++++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) --- a/C4/Acquisition.pm +++ a/C4/Acquisition.pm @@ -2197,6 +2197,8 @@ sub GetHistory { aqbasket.basketname, aqbasket.basketgroupid, aqbasketgroups.name as groupname, + aqbasketgroups.closeddate as groupcloseddate, + IF(aqbasketgroups.freedeliveryplace != '', aqbasketgroups.freedeliveryplace, aqbasketgroups.deliveryplace) as groupdeliveryplace, aqbooksellers.name, aqbasket.creationdate, aqorders.datereceived, --- a/acqui/histsearch.pl +++ a/acqui/histsearch.pl @@ -59,6 +59,7 @@ use C4::Dates; use C4::Debug; use C4::Branch; use C4::Koha; +use Koha::AdditionalField; my $input = new CGI; my $title = $input->param( 'title'); @@ -118,6 +119,26 @@ if ($do_search) { budget => $budget, orderstatus => $orderstatus, ); + my $additional_fields = Koha::AdditionalField->all({ + tablename => 'aqorders', + }); + foreach my $af (@$additional_fields) { + if (!$af->{authorised_value_category} && $af->{marcfield}) { + # Try to retrieve authorised values category from MARC framework + my ($field, $subfield) = split /\$/, $af->{marcfield}; + my $category = C4::Koha::GetAuthValCodeFromField($field, $subfield); + if ($category) { + $af->{authorised_value_category} = $category; + } + } + } + my $af_values = Koha::AdditionalField->fetch_all_values({ + tablename => 'aqorders', + }); + $template->param( + 'additional_fields' => $additional_fields, + 'additional_fields_values' => $af_values, + ); } my $from_date = $from_placed_on ? $from_placed_on->output('syspref') : undef; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -1,4 +1,5 @@ [% USE KohaDates %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %]