View | Details | Raw Unified | Return to bug 18925
Collapse All | Expand All

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

Return to bug 18925