Bug 39658: (follow-up) block checkout when linked accounts over charge limit
When AllowFineOverride is disabled and NoIssuesChargeLinkedAccounts is exceeded, hide the barcode field and show 'Cannot check out'. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Kellie Stephens <kellie.stephens@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
bfd2474a1a
commit
3e483cd61a
|
|
@ -751,6 +751,18 @@ if ($patron) {
|
|||
}
|
||||
}
|
||||
|
||||
# Check the debt of this patron's linked accounts
|
||||
my $no_issues_charge_linked = $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{limit};
|
||||
if ( defined $no_issues_charge_linked ) {
|
||||
if ( $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{overlimit} ) {
|
||||
$template->param(
|
||||
charges_linked_accounts => 1,
|
||||
chargesamount_linked_accounts => $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{charge},
|
||||
);
|
||||
$noissues = 1 unless C4::Context->preference("allowfineoverride");
|
||||
}
|
||||
}
|
||||
|
||||
if ( $patron->has_overdues ) {
|
||||
$template->param( odues => 1 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
[% SET return_claims = patron.return_claims %]
|
||||
[% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %]
|
||||
|
||||
[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_out_of_range || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %]
|
||||
[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_out_of_range || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || charges_linked_accounts || credits || patron.account_locked ) %]
|
||||
<h3>Attention</h3>
|
||||
<ul>
|
||||
[% IF ( has_modifications ) %]
|
||||
|
|
@ -179,6 +179,15 @@
|
|||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( charges_linked_accounts ) %]
|
||||
<li class="charges_linked_accounts">
|
||||
<span class="circ-hlt">Charges:</span> Patron's linked accounts collectively owe [% chargesamount_linked_accounts | $Price %].
|
||||
[% IF noissues %]
|
||||
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
|
||||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( credits ) %]
|
||||
<li class="credits"><span class="circ-hlt">Credits:</span> Patron has outstanding credits [% IF ( creditsamount ) %]of <span class="credit"><strong>[% creditsamount | $Price %]</strong></span>[% END %]</li>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue