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

(-)a/C4/Circulation.pm (+4 lines)
Lines 555-560 sub TooMany { Link Here
555
        }
555
        }
556
    }
556
    }
557
557
558
    if ( not defined( $issuing_rule ) and not defined($branch_borrower_circ_rule->{maxissueqty}) ) {
559
        return { reason => 'NO_RULE_DEFINED', max_allowed => 0 };
560
    }
561
558
    # OK, the patron can issue !!!
562
    # OK, the patron can issue !!!
559
    return;
563
    return;
560
}
564
}
(-)a/t/db_dependent/Circulation/TooMany.t (-7 / +6 lines)
Lines 92-106 C4::Context->set_userenv($patron->{borrowernumber}, $patron->{userid}, 'usercnum Link Here
92
92
93
subtest 'no rules exist' => sub {
93
subtest 'no rules exist' => sub {
94
    plan tests => 2;
94
    plan tests => 2;
95
    is(
95
    is_deeply(
96
        C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ),
96
        C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ),
97
        undef,
97
        { reason => 'NO_RULE_DEFINED', max_allowed => 0 },
98
        'CO should be allowed, in any cases'
98
        'CO should not be allowed, in any cases'
99
    );
99
    );
100
    is(
100
    is_deeply(
101
        C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item, { onsite_checkout => 1 } ),
101
        C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item, { onsite_checkout => 1 } ),
102
        undef,
102
        { reason => 'NO_RULE_DEFINED', max_allowed => 0 },
103
        'OSCO should be allowed, in any cases'
103
        'OSCO should not be allowed, in any cases'
104
    );
104
    );
105
};
105
};
106
106
107
- 

Return to bug 8361