@@ -, +, @@ --- C4/Serials.pm | 12 ++++++++++-- .../prog/en/modules/serials/serials-search.tt | 16 +++++++++++++++- serials/serials-search.pl | 3 +++ 3 files changed, 28 insertions(+), 3 deletions(-) --- a/C4/Serials.pm +++ a/C4/Serials.pm @@ -549,7 +549,8 @@ The valid search fields are: ean callnumber location - publisher + publisher + barcode bookseller branch expiration_date @@ -589,6 +590,7 @@ sub SearchSubscriptions { LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber LEFT JOIN biblioitems ON biblioitems.biblionumber = subscription.biblionumber LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id + LEFT JOIN items ON items.biblionumber = biblio.biblionumber |; $query .= q| WHERE 1|; my @where_strs; @@ -625,7 +627,13 @@ sub SearchSubscriptions { if( $args->{publisher} ){ push @where_strs, "biblioitems.publishercode LIKE ?"; push @where_args, "%$args->{publisher}%"; + } + if( $args->{barcode} ){ + push @where_strs, "items.barcode LIKE ?"; + push @where_args, "%$args->{barcode}%"; } + + if( $args->{bookseller} ){ push @where_strs, "aqbooksellers.name LIKE ?"; push @where_args, "%$args->{bookseller}%"; @@ -659,7 +667,7 @@ sub SearchSubscriptions { $query .= " ORDER BY " . $args->{orderby} if $args->{orderby}; my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare($query); + my $sth = $dbh->prepare($query); $sth->execute(@where_args); my $results = $sth->fetchall_arrayref( {} ); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -81,6 +81,13 @@ + +