Lines 423-428
sub get_onshelfholds_policy {
Link Here
|
423 |
return $rule ? $rule->rule_value : 0; |
423 |
return $rule ? $rule->rule_value : 0; |
424 |
} |
424 |
} |
425 |
|
425 |
|
|
|
426 |
=head3 get_lostreturn_policy |
427 |
|
428 |
my $refund = Koha::CirculationRules->get_lostreturn_policy( { return_branch => $return_branch, item => $item } ); |
429 |
|
430 |
=cut |
431 |
|
432 |
sub get_lostreturn_policy { |
433 |
my ( $class, $params ) = @_; |
434 |
|
435 |
my $item = $params->{item}; |
436 |
|
437 |
my $behaviour = C4::Context->preference( 'RefundLostOnReturnControl' ) // 'CheckinLibrary'; |
438 |
my $behaviour_mapping = { |
439 |
CheckinLibrary => $params->{'return_branch'}, |
440 |
ItemHomeBranch => $item->homebranch, |
441 |
ItemHoldingBranch => $item->holdingbranch |
442 |
}; |
443 |
|
444 |
my $branch = $behaviour_mapping->{ $behaviour }; |
445 |
|
446 |
my $rule = Koha::CirculationRules->get_effective_rule( |
447 |
{ |
448 |
branchcode => $branch, |
449 |
rule_name => 'refund', |
450 |
} |
451 |
); |
452 |
|
453 |
return $rule ? $rule->rule_value : 1; |
454 |
} |
455 |
|
426 |
=head3 article_requestable_rules |
456 |
=head3 article_requestable_rules |
427 |
|
457 |
|
428 |
Return rules that allow article requests, optionally filtered by |
458 |
Return rules that allow article requests, optionally filtered by |
429 |
- |
|
|