use Modern::Perl;
use CGI;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
use Koha::Libraries;
use Koha::StockRotationRotas;
use Koha::StockRotationItems;
use Koha::StockRotationStages;
use Koha::Item;
-use Koha::Util::StockRotation qw(:ALL);
+use Koha::Util::StockRotation qw( get_branches get_stages move_to_next_stage toggle_indemand remove_from_stage add_items_to_rota get_barcodes_status );
-my $input = new CGI;
+my $input = CGI->new;
unless (C4::Context->preference('StockRotation')) {
# redirect to Intranet home if self-check is not enabled
tools => '*',
stockrotation => '*',
},
- authnotrequired => 0
}
);
# Get all items on this rota, for each prefetch their
# stage and biblio objects
- my $items = Koha::StockRotationItems->search(
+ my $sritems = Koha::StockRotationItems->search(
{ 'stage.rota_id' => $params{rota_id} },
{
prefetch => {
$template->param(
rota_id => $params{rota_id},
error => $params{error},
- items => $items,
+ sritems => $sritems,
branches => get_branches(),
stages => get_stages($rota),
rota => $rota,