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

(-)a/C4/Circulation.pm (-2 / +3 lines)
Lines 437-448 sub TooMany { Link Here
437
                $checkouts = $patron->checkouts->search(
437
                $checkouts = $patron->checkouts->search(
438
                    { 'me.branchcode' => $maxissueqty_rule->branchcode } );
438
                    { 'me.branchcode' => $maxissueqty_rule->branchcode } );
439
            } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
439
            } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
440
                ; # if branch is the patron's home branch, then count all loans by patron
440
                $checkouts = $patron->checkouts; # if branch is the patron's home branch, then count all loans by patron
441
            } else {
441
            } else {
442
                $checkouts = $patron->checkouts->search(
442
                $checkouts = $patron->checkouts->search(
443
                    { 'item.homebranch' => $maxissueqty_rule->branchcode },
443
                    { 'item.homebranch' => $maxissueqty_rule->branchcode },
444
                    { prefetch          => 'item' } );
444
                    { prefetch          => 'item' } );
445
            }
445
            }
446
        } else {
447
            $checkouts = $patron->checkouts; # if rule is not branch specific then count all loans by patron
446
        }
448
        }
447
        my $sum_checkouts;
449
        my $sum_checkouts;
448
        my $rule_itemtype = $maxissueqty_rule->itemtype;
450
        my $rule_itemtype = $maxissueqty_rule->itemtype;
449
- 

Return to bug 26132