Lines 477-482
sub TooMany {
Link Here
|
477 |
reason => 'TOO_MANY_ONSITE_CHECKOUTS', |
477 |
reason => 'TOO_MANY_ONSITE_CHECKOUTS', |
478 |
count => $onsite_checkout_count, |
478 |
count => $onsite_checkout_count, |
479 |
max_allowed => $max_onsite_checkouts_allowed, |
479 |
max_allowed => $max_onsite_checkouts_allowed, |
|
|
480 |
issuing_rule => $issuing_rule, |
480 |
} |
481 |
} |
481 |
} |
482 |
} |
482 |
} |
483 |
} |
Lines 487-492
sub TooMany {
Link Here
|
487 |
reason => 'TOO_MANY_CHECKOUTS', |
488 |
reason => 'TOO_MANY_CHECKOUTS', |
488 |
count => $checkout_count, |
489 |
count => $checkout_count, |
489 |
max_allowed => $max_checkouts_allowed, |
490 |
max_allowed => $max_checkouts_allowed, |
|
|
491 |
issuing_rule => $issuing_rule, |
490 |
}; |
492 |
}; |
491 |
} |
493 |
} |
492 |
} elsif ( not $onsite_checkout ) { |
494 |
} elsif ( not $onsite_checkout ) { |
Lines 495-500
sub TooMany {
Link Here
|
495 |
reason => 'TOO_MANY_CHECKOUTS', |
497 |
reason => 'TOO_MANY_CHECKOUTS', |
496 |
count => $checkout_count - $onsite_checkout_count, |
498 |
count => $checkout_count - $onsite_checkout_count, |
497 |
max_allowed => $max_checkouts_allowed, |
499 |
max_allowed => $max_checkouts_allowed, |
|
|
500 |
issuing_rule => $issuing_rule, |
498 |
}; |
501 |
}; |
499 |
} |
502 |
} |
500 |
} |
503 |
} |
Lines 531-536
sub TooMany {
Link Here
|
531 |
reason => 'TOO_MANY_ONSITE_CHECKOUTS', |
534 |
reason => 'TOO_MANY_ONSITE_CHECKOUTS', |
532 |
count => $onsite_checkout_count, |
535 |
count => $onsite_checkout_count, |
533 |
max_allowed => $max_onsite_checkouts_allowed, |
536 |
max_allowed => $max_onsite_checkouts_allowed, |
|
|
537 |
issuing_rule => $issuing_rule, |
534 |
} |
538 |
} |
535 |
} |
539 |
} |
536 |
} |
540 |
} |
Lines 541-546
sub TooMany {
Link Here
|
541 |
reason => 'TOO_MANY_CHECKOUTS', |
545 |
reason => 'TOO_MANY_CHECKOUTS', |
542 |
count => $checkout_count, |
546 |
count => $checkout_count, |
543 |
max_allowed => $max_checkouts_allowed, |
547 |
max_allowed => $max_checkouts_allowed, |
|
|
548 |
issuing_rule => $issuing_rule, |
544 |
}; |
549 |
}; |
545 |
} |
550 |
} |
546 |
} elsif ( not $onsite_checkout ) { |
551 |
} elsif ( not $onsite_checkout ) { |
Lines 549-561
sub TooMany {
Link Here
|
549 |
reason => 'TOO_MANY_CHECKOUTS', |
554 |
reason => 'TOO_MANY_CHECKOUTS', |
550 |
count => $checkout_count - $onsite_checkout_count, |
555 |
count => $checkout_count - $onsite_checkout_count, |
551 |
max_allowed => $max_checkouts_allowed, |
556 |
max_allowed => $max_checkouts_allowed, |
|
|
557 |
issuing_rule => $issuing_rule, |
552 |
}; |
558 |
}; |
553 |
} |
559 |
} |
554 |
} |
560 |
} |
555 |
} |
561 |
} |
556 |
|
562 |
|
557 |
if ( not defined( $issuing_rule ) and not defined($branch_borrower_circ_rule->{maxissueqty}) ) { |
563 |
if ( not defined( $issuing_rule ) and not defined($branch_borrower_circ_rule->{maxissueqty}) ) { |
558 |
return { reason => 'NO_RULE_DEFINED', max_allowed => 0 }; |
564 |
return { reason => 'NO_RULE_DEFINED', max_allowed => 0, issuing_rule => $issuing_rule }; |
559 |
} |
565 |
} |
560 |
|
566 |
|
561 |
# OK, the patron can issue !!! |
567 |
# OK, the patron can issue !!! |
Lines 842-854
sub CanBookBeIssued {
Link Here
|
842 |
$needsconfirmation{PATRON_CANT} = 1; |
848 |
$needsconfirmation{PATRON_CANT} = 1; |
843 |
} |
849 |
} |
844 |
if ( C4::Context->preference("AllowTooManyOverride") ) { |
850 |
if ( C4::Context->preference("AllowTooManyOverride") ) { |
845 |
$needsconfirmation{TOO_MANY} = $toomany->{reason}; |
851 |
$needsconfirmation{TOO_MANY} = $toomany->{reason}; |
846 |
$needsconfirmation{current_loan_count} = $toomany->{count}; |
852 |
$needsconfirmation{current_loan_count} = $toomany->{count}; |
847 |
$needsconfirmation{max_loans_allowed} = $toomany->{max_allowed}; |
853 |
$needsconfirmation{max_loans_allowed} = $toomany->{max_allowed}; |
|
|
854 |
$needsconfirmation{issuing_rule} = $toomany->{issuing_rule}; |
848 |
} else { |
855 |
} else { |
849 |
$issuingimpossible{TOO_MANY} = $toomany->{reason}; |
856 |
$issuingimpossible{TOO_MANY} = $toomany->{reason}; |
850 |
$issuingimpossible{current_loan_count} = $toomany->{count}; |
857 |
$issuingimpossible{current_loan_count} = $toomany->{count}; |
851 |
$issuingimpossible{max_loans_allowed} = $toomany->{max_allowed}; |
858 |
$issuingimpossible{max_loans_allowed} = $toomany->{max_allowed}; |
|
|
859 |
$issuingimpossible{issuing_rule} = $toomany->{issuing_rule}; |
852 |
} |
860 |
} |
853 |
} |
861 |
} |
854 |
|
862 |
|