projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bug_8977' into 3.12-master
[koha_fer]
/
serials
/
serials-search.pl
diff --git
a/serials/serials-search.pl
b/serials/serials-search.pl
index
ac5d0d3
..
aaf64e6
100755
(executable)
--- a/
serials/serials-search.pl
+++ b/
serials/serials-search.pl
@@
-46,6
+46,8
@@
my $biblionumber = $query->param('biblionumber') || '';
my $branch = $query->param('branch_filter') || '';
my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials");
my $searched = $query->param('searched') || 0;
my $branch = $query->param('branch_filter') || '';
my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials");
my $searched = $query->param('searched') || 0;
+my @subscriptionids = $query ->param('subscriptionid');
+my $op = $query->param('op');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
@@
-58,6
+60,16
@@
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
}
);
+if ( $op and $op eq "close" ) {
+ for my $subscriptionid ( @subscriptionids ) {
+ C4::Serials::CloseSubscription( $subscriptionid );
+ }
+} elsif ( $op and $op eq "reopen" ) {
+ for my $subscriptionid ( @subscriptionids ) {
+ C4::Serials::ReopenSubscription( $subscriptionid );
+ }
+}
+
my @subscriptions;
if ($searched){
@subscriptions = SearchSubscriptions(
my @subscriptions;
if ($searched){
@subscriptions = SearchSubscriptions(
@@
-81,6
+93,15
@@
if ($routing) {
}
}
}
}
+my (@openedsubscriptions, @closedsubscriptions);
+for my $sub ( @subscriptions ) {
+ unless ( $sub->{closed} ) {
+ push @openedsubscriptions, $sub;
+ } else {
+ push @closedsubscriptions, $sub;
+ }
+}
+
my $branches = GetBranches();
my @branches_loop;
foreach (sort keys %$branches){
my $branches = GetBranches();
my @branches_loop;
foreach (sort keys %$branches){
@@
-94,7
+115,9
@@
foreach (sort keys %$branches){
}
$template->param(
}
$template->param(
- subscriptions => \@subscriptions,
+ openedsubscriptions => \@openedsubscriptions,
+ closedsubscriptions => \@closedsubscriptions,
+ total => @openedsubscriptions + @closedsubscriptions,
title_filter => $title,
ISSN_filter => $ISSN,
EAN_filter => $EAN,
title_filter => $title,
ISSN_filter => $ISSN,
EAN_filter => $EAN,