Lines 31-36
use Koha::DateUtils qw( dt_from_string );
Link Here
|
31 |
|
31 |
|
32 |
use List::MoreUtils qw( uniq ); |
32 |
use List::MoreUtils qw( uniq ); |
33 |
|
33 |
|
|
|
34 |
use Data::Dumper; |
35 |
|
34 |
|
36 |
|
35 |
my $query = CGI->new; |
37 |
my $query = CGI->new; |
36 |
my $op = $query->param('op') || q{}; |
38 |
my $op = $query->param('op') || q{}; |
Lines 108-124
if($op eq 'gennext' && @subscriptionid){
Link Here
|
108 |
|
110 |
|
109 |
my $countitems = 0; |
111 |
my $countitems = 0; |
110 |
my @serialsid = $query->multi_param('serialid'); |
112 |
my @serialsid = $query->multi_param('serialid'); |
|
|
113 |
warn Dumper('serial', \@serialsid); |
114 |
|
111 |
my $subscriptionid = $subscriptionid[0]; |
115 |
my $subscriptionid = $subscriptionid[0]; |
|
|
116 |
warn Dumper('subscription', $subscriptionid); |
117 |
|
112 |
|
118 |
|
113 |
if($op eq 'delete_confirm'){ |
119 |
if($op eq 'delete_confirm'){ |
114 |
foreach my $serialid (@serialsid){ |
120 |
foreach my $serialid (@serialsid){ |
115 |
$countitems += Koha::Serial::Items->search({serialid => $serialid})->count(); |
121 |
$countitems += Koha::Serial::Items->search({serialid => $serialid})->count(); |
|
|
122 |
warn Dumper('serial', \@serialsid); |
116 |
} |
123 |
} |
117 |
}elsif($op eq 'delete_confirmed'){ |
124 |
}elsif($op eq 'delete_confirmed'){ |
118 |
if($query->param('delitems') eq "Yes"){ |
125 |
if($query->param('delitems') eq "Yes"){ |
119 |
my @itemnumbers; |
126 |
my @itemnumbers; |
120 |
foreach my $serialid (@serialsid){ |
127 |
foreach my $serialid (@serialsid){ |
|
|
128 |
warn Dumper('serial', \@serialsid); |
121 |
my @ids = Koha::Serial::Items->search({serialid => $serialid})->get_column('itemnumber'); |
129 |
my @ids = Koha::Serial::Items->search({serialid => $serialid})->get_column('itemnumber'); |
|
|
130 |
warn Dumper('serial', \@serialsid); |
122 |
push(@itemnumbers, @ids); |
131 |
push(@itemnumbers, @ids); |
123 |
} |
132 |
} |
124 |
my $items = Koha::Items->search({ itemnumber => \@itemnumbers }); |
133 |
my $items = Koha::Items->search({ itemnumber => \@itemnumbers }); |
Lines 131-136
if($op eq 'delete_confirm'){
Link Here
|
131 |
for my $serialid (@serialsid){ |
140 |
for my $serialid (@serialsid){ |
132 |
my $serial = Koha::Serials->find($serialid); |
141 |
my $serial = Koha::Serials->find($serialid); |
133 |
ModSerialStatus($serialid, $serial->serialseq, $serial->planneddate, $serial->publisheddate, $serial->publisheddatetext, 6, ""); |
142 |
ModSerialStatus($serialid, $serial->serialseq, $serial->planneddate, $serial->publisheddate, $serial->publisheddatetext, 6, ""); |
|
|
143 |
warn Dumper('serial', \@serialsid); |
134 |
} |
144 |
} |
135 |
} |
145 |
} |
136 |
|
146 |
|