From 5bc5c173fb9a572a3d15036158059b67029a2b0a 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 | 101 +++++++------------- serials/claims.pl | 10 ++ 3 files changed, 53 insertions(+), 66 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index c40380f..da4388f 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2041,6 +2041,7 @@ sub GetLateOrMissingIssues { return unless ( $supplierid or $serialid ); my $dbh = C4::Context->dbh; + my $sth; my $byserial = ''; if ($serialid) { @@ -2096,6 +2097,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 4959982..9427855 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' %] @@ -11,15 +12,17 @@