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