Koha::CirculationRules - Koha CirculationRule Object set class
This structure describes the possible rules that may be set, and what scopes they can be set at.
Any attempt to set a rule with a nonsensical scope (for instance,
setting the patron_maxissueqty
for a branchcode and itemtype),
is an error.
Delete a set of circulation rules, needed for cleaning up when deleting issuingrules
Clone a set of circulation rules to another branch
my $can_place_a_hold_at_item_level = Koha::CirculationRules->get_opacitemholds_policy( { patron => $patron, item => $item } );
Return 'Y' or 'F' if the patron can place a hold on this item according to the issuing rules and the "Item level holds" (opacitemholds). Can be 'N' - Don't allow, 'Y' - Allow, and 'F' - Force
my $on_shelf_holds = Koha::CirculationRules->get_onshelfholds_policy({ item => $item, patron => $patron });
my $lostrefund_policy = Koha::CirculationRules->get_lostreturn_policy( { return_branch => $return_branch, item => $item } );
Return values are:
Return rules that allow article requests, optionally filtered by patron categorycode. Use with care; see guess_article_requestable_itemtypes.
Return item types in a hashref that are likely possible to be 'article requested'. Constructed by an intelligent guess in the issuing rules (see article_requestable_rules). Note: pref ArticleRequestsLinkControl overrides the algorithm. Optional parameters: categorycode. Note: the routine is used in opac-search to obtain a reasonable estimate within performance borders (not looking at all items but just using default itemtype). Also we are not looking at the branchcode here, since home or holding branch of the item is leading and branch may be unknown too (anonymous opac session).
Return the value for daysmode defined in the circulation rules. If not defined (or empty string), the value of the system preference useDaysMode is returned