},
{
join => 'stockrotationstages',
collapse => 1
collapse => 1,
order_by => 'title'
}
);
#### Main Code
# Compile Stockrotation Report data
my $rotas = Koha::StockRotationRotas->search;
my $rotas = Koha::StockRotationRotas->search(undef,{ order_by => { '-asc' => 'title' }});
my $data = $rotas->investigate;
# Perform db updates if requested
if (!defined $op) {
# No operation is supplied, we're just displaying the list of rotas
my $rotas = Koha::StockRotationRotas->search->as_list;
my $rotas = Koha::StockRotationRotas->search(
undef,
order_by => { -asc => 'title' }
)->as_list;
$template->param(
existing_rotas => $rotas,
-