From e6024a6f56b6fd79886979d8868428f94a5dbb4f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 29 Aug 2013 14:04:32 +0200 Subject: [PATCH] Bug 10855: Search subscriptions by additional fields on the claim page Test plan: - create some serials in late. - go on serials/claims.pl. - choose a vendor. - verify that additional fields are displayed in new columns. - try filters on columns. - verify there is no regression on this page. --- C4/Serials.pm | 8 ++ .../prog/en/modules/serials/claims.tt | 100 ++++++++------------ serials/claims.pl | 10 ++ 3 files changed, 55 insertions(+), 63 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 46d8fe5..45c61e4 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1878,6 +1878,7 @@ name,title,planneddate,serialseq,serial.subscriptionid from tables : subscriptio sub GetLateOrMissingIssues { my ( $supplierid, $serialid, $order ) = @_; my $dbh = C4::Context->dbh; + my $sth; my $byserial = ''; if ($serialid) { @@ -1933,6 +1934,13 @@ sub GetLateOrMissingIssues { $line->{claimdate} = format_date( $line->{claimdate} ); } $line->{"status".$line->{status}} = 1; + + my $additional_field_values = Koha::AdditionalField->fetch_all_values({ + record_id => $line->{subscriptionid}, + tablename => 'subscription' + }); + %$line = ( %$line, additional_fields => $additional_field_values->{$line->{subscriptionid}} ); + push @issuelist, $line; } return @issuelist; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index 7528e9a..58df08e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -1,4 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] +[% USE KohaAuthorisedValues %] Koha › Serials › Claims [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] @@ -9,15 +10,17 @@