StockRotationItem - Koha StockRotationItem Object class
StockRotationItem class used primarily by stockrotation .pls and the stock rotation cron script.
Standard Koha::Objects definitions, and additional methods.
my $item = Koha::StockRotationItem->item;
Returns the item associated with the current stock rotation item.
my $stage = Koha::StockRotationItem->stage;
Returns the stage associated with the current stock rotation item.
1|0 = $item->needs_repatriating;
Return 1 if this item is currently not at the library it should be at according to our stockrotation plan.
1|0 = $item->needs_advancing;
Return 1 if this item is ready to be moved on to the next stage in its rota.
1|0 = $sritem->repatriate
Put this item into branch transfer with 'StockrotationRepatriation' comment, so that it may return to it's stage.branch to continue its rota as normal.
Note: Stockrotation falls outside of the normal branch transfer limits and so we pass 'ignore_limits' in the call to request_transfer.
1|0 = $sritem->advance;
Put this item into branch transfer with 'StockrotationAdvance' comment, to transfer it to the next stage in its rota.
If this is the last stage in the rota and this rota is cyclical, we return to the first stage. If it is not cyclical, then we delete this StockRotationItem.
If this item is 'indemand', and advance is invoked, we disable 'indemand' and advance the item as per usual.
Note: Stockrotation falls outside of the normal branch transfer limits and so we pass 'ignore_limits' in the call to request_transfer.
$sritem->toggle_indemand;
Toggle this items in_demand status.
If the item is in the process of being advanced to the next stage then we cancel the transfer, revert the advancement and reset the 'StockrotationAdvance' counter, as though 'in_demand' had been set prior to the call to advance, by updating the in progress transfer.
my $report = $item->investigate;
Return the base set of information, namely this individual item's report, for generating stockrotation reports about this stockrotationitem.
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>