Bug 19382: Add blocking of ability to checkout on circulation.pl
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
7a7a0a2474
commit
899bd08e0c
|
|
@ -494,6 +494,19 @@ if ( $patron ) {
|
|||
);
|
||||
}
|
||||
|
||||
# Check the debt of this patrons guarantors *and* the guarantees of those guarantors
|
||||
my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
|
||||
if ( $no_issues_charge_guarantors ) {
|
||||
my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guaranor => 0, include_this_patron => 1 });
|
||||
|
||||
if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) {
|
||||
$template->param(
|
||||
charges_guarantors_guarantees => $guarantors_non_issues_charges
|
||||
);
|
||||
$noissues = 1 unless C4::Context->preference("allowfineoverride");
|
||||
}
|
||||
}
|
||||
|
||||
my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees");
|
||||
$no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
|
||||
if ( defined $no_issues_charge_guarantees ) {
|
||||
|
|
|
|||
|
|
@ -770,14 +770,22 @@
|
|||
<li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span>
|
||||
[% END %]
|
||||
|
||||
[% IF ( charges ) %]
|
||||
[% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
|
||||
[% END %]
|
||||
|
||||
[% IF age_limitations %]
|
||||
[% INCLUDE 'category-out-of-age-limit.inc' %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( charges ) %]
|
||||
[% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
|
||||
[% END %]
|
||||
[% IF ( charges_guarantors_guarantees ) %]
|
||||
<li>
|
||||
<span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
|
||||
[% IF noissues %]
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( charges_guarantees ) %]
|
||||
<li>
|
||||
<span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
|
||||
|
|
|
|||
|
|
@ -46,18 +46,26 @@
|
|||
<div class="dialog alert">You are not allowed to use batch checkout for this patron</div>
|
||||
[% ELSIF patron and noissues and not checkout_infos %]
|
||||
<div class="dialog alert">
|
||||
Cannot check out!
|
||||
[% IF charges %]
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
[% END %]
|
||||
[% IF charges_guarantees %]
|
||||
<li>
|
||||
<span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
|
||||
</li>
|
||||
<li>
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
</li>
|
||||
[% END %]
|
||||
Cannot check out!
|
||||
[% IF ( charges ) %]
|
||||
[% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
|
||||
[% END %]
|
||||
[% IF ( charges_guarantors_guarantees ) %]
|
||||
<li>
|
||||
<span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
|
||||
[% IF noissues %]
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF ( charges_guarantees ) %]
|
||||
<li>
|
||||
<span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
|
||||
[% IF noissues %]
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
</div>
|
||||
[% ELSIF patron and not checkout_infos %]
|
||||
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
|
||||
|
|
|
|||
Loading…
Reference in New Issue