From 37319996b0abf857bafa642e2f236a2782146e75 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. Signed-off-by: Brendan Gallagher Signed-off-by: Tomas Cohen Arazi --- C4/Serials.pm | 8 ++ .../prog/en/modules/serials/claims.tt | 107 ++++++------------ serials/claims.pl | 10 ++ 3 files changed, 53 insertions(+), 72 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index e078344e2a..2216a45206 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1910,6 +1910,7 @@ sub GetLateOrMissingIssues { return unless ( $supplierid or $serialid ); my $dbh = C4::Context->dbh; + my $sth; my $byserial = ''; if ($serialid) { @@ -1969,6 +1970,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 f20b48648b..c3c9277fc8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -1,6 +1,7 @@ [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] +[% USE KohaAuthorisedValues %] Koha › Serials › Claims [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] @@ -8,8 +9,9 @@ [% INCLUDE 'datatables.inc' %]