StockRotationRota - Koha StockRotationRota Object class
StockRotationRota class used primarily by stockrotation .pls and the stock rotation cron script.
Standard Koha::Objects definitions, and additional methods.
my $stages = Koha::StockRotationRota->stockrotationstages;
Returns the stages associated with the current rota.
my $rota = $rota->add_item($itemnumber);
Add item identified by $ITEMNUMBER to this rota, which means we associate it with the first stage of this rota. Should the item already be associated with a rota, move it from that rota to this rota.
my $stage = $rota->first_stage;
Return the first stage attached to this rota (the one that has an undefined `stagebefore`).
my $items = $rota->stockrotationitems;
Return all items associated with this rota via its stages.
my $report = $rota->investigate($report_so_far);
Aim here is to return $report augmented with content for this rota. We delegate to $stage->investigate.
The report will include some basic information and 2 primary reports:
- per rota report in 'rotas'. This report is mainly used by admins to do check & compare results.
- branched report in 'branched'. This is the workhorse: emails to libraries are compiled from these reports, and they will have the actionable work.
Both reports are generated in stage based investigations; the rota report is then glued into place at this stage.
Alex Sassmannshausen <firstname.lastname@example.org>