Lines 193-198
if (!defined $op) {
Link Here
|
193 |
item_id => $params{item_id} |
193 |
item_id => $params{item_id} |
194 |
); |
194 |
); |
195 |
|
195 |
|
|
|
196 |
} elsif ($op eq 'confirm_delete_rota') { |
197 |
|
198 |
# Get the rota we're deleting |
199 |
my $rota = Koha::StockRotationRotas->find($params{rota_id}); |
200 |
|
201 |
# Get all items on this rota, for each prefetch their |
202 |
# stage and biblio objects |
203 |
my $sritems = Koha::StockRotationItems->search( |
204 |
{ 'stage.rota_id' => $params{rota_id} }, |
205 |
{ |
206 |
prefetch => { |
207 |
stage => { |
208 |
'stockrotationitems' => { |
209 |
'itemnumber' => 'biblionumber' |
210 |
} |
211 |
} |
212 |
} |
213 |
} |
214 |
); |
215 |
|
216 |
$template->param( |
217 |
rota_id => $params{rota_id}, |
218 |
sritemstotal => $sritems->count, |
219 |
op => $op |
220 |
); |
221 |
|
222 |
} elsif ($op eq 'delete_rota') { |
223 |
|
224 |
# Get the rota we're deleting |
225 |
my $rota = Koha::StockRotationRotas->find($params{rota_id}); |
226 |
|
227 |
$rota->delete; |
228 |
|
229 |
# Return to the rotas list |
230 |
print $input->redirect("/cgi-bin/koha/tools/stockrotation.pl"); |
231 |
|
196 |
} elsif ($op eq 'confirm_delete_stage') { |
232 |
} elsif ($op eq 'confirm_delete_stage') { |
197 |
|
233 |
|
198 |
# Get the stage we're deleting |
234 |
# Get the stage we're deleting |
199 |
- |
|
|