Lines 1604-1633
wildcards.
Link Here
|
1604 |
sub GetBranchBorrowerCircRule { |
1604 |
sub GetBranchBorrowerCircRule { |
1605 |
my ( $branchcode, $categorycode ) = @_; |
1605 |
my ( $branchcode, $categorycode ) = @_; |
1606 |
|
1606 |
|
1607 |
# Set search prededences |
|
|
1608 |
my @params = ( |
1609 |
{ |
1610 |
branchcode => $branchcode, |
1611 |
categorycode => $categorycode, |
1612 |
itemtype => undef, |
1613 |
}, |
1614 |
{ |
1615 |
branchcode => $branchcode, |
1616 |
categorycode => undef, |
1617 |
itemtype => undef, |
1618 |
}, |
1619 |
{ |
1620 |
branchcode => undef, |
1621 |
categorycode => $categorycode, |
1622 |
itemtype => undef, |
1623 |
}, |
1624 |
{ |
1625 |
branchcode => undef, |
1626 |
categorycode => undef, |
1627 |
itemtype => undef, |
1628 |
}, |
1629 |
); |
1630 |
|
1631 |
# Initialize default values |
1607 |
# Initialize default values |
1632 |
my $rules = { |
1608 |
my $rules = { |
1633 |
patron_maxissueqty => undef, |
1609 |
patron_maxissueqty => undef, |
Lines 1636-1654
sub GetBranchBorrowerCircRule {
Link Here
|
1636 |
|
1612 |
|
1637 |
# Search for rules! |
1613 |
# Search for rules! |
1638 |
foreach my $rule_name (qw( patron_maxissueqty patron_maxonsiteissueqty )) { |
1614 |
foreach my $rule_name (qw( patron_maxissueqty patron_maxonsiteissueqty )) { |
1639 |
foreach my $params (@params) { |
1615 |
my $rule = Koha::CirculationRules->get_effective_rule( |
1640 |
my $rule = Koha::CirculationRules->search( |
1616 |
{ |
1641 |
{ |
1617 |
categorycode => $categorycode, |
1642 |
rule_name => $rule_name, |
1618 |
itemtype => undef, |
1643 |
%$params, |
1619 |
branchcode => $branchcode, |
1644 |
} |
1620 |
rule_name => $rule_name, |
1645 |
)->next(); |
|
|
1646 |
|
1647 |
if ( $rule ) { |
1648 |
$rules->{$rule_name} = $rule->rule_value; |
1649 |
last; |
1650 |
} |
1621 |
} |
1651 |
} |
1622 |
); |
|
|
1623 |
|
1624 |
$rules->{$rule_name} = $rule->rule_value if defined $rule; |
1652 |
} |
1625 |
} |
1653 |
|
1626 |
|
1654 |
return $rules; |
1627 |
return $rules; |
1655 |
- |
|
|