[Koha-bugs] [Bug 7560] SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 4 20:37:24 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7560

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|Failed QA                   |RESOLVED

--- Comment #50 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Looking at the code, I am pretty sure this has been fixed since, see also bug
29755.

C4/SIP/ILS/Patron.pm:

sub _fee_limit {
    return C4::Context->preference('noissuescharge') || 5;
}

    # Get fines and add fines for guarantees (depends on preference
NoIssuesChargeGuarantees)
    my $fines_amount = ($patron->account->balance > 0) ?
$patron->account->non_issues_charges : 0;
    my $personal_fines_amount = $fines_amount;
    my $fee_limit = _fee_limit();
    my $noissueschargeguarantorswithguarantees =
C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees');
    my $fines_msg = "";
    my $fine_blocked = 0;
    my $noissueschargeguarantees =
C4::Context->preference('NoIssuesChargeGuarantees');
    if( $fines_amount > $fee_limit ){
        $fine_blocked = 1;
        $fines_msg .= " -- " . "Patron blocked by fines" if $fine_blocked;
    } elsif ( $noissueschargeguarantorswithguarantees ) {
        $fines_amount += $patron->relationships_debt({ include_guarantors => 1,
only_this_guarantor => 0, include_this_patron => 0 });
        $fine_blocked ||= $fines_amount >
$noissueschargeguarantorswithguarantees;
        $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on
related accounts" if $fine_blocked;
    } elsif ( $noissueschargeguarantees ) {
        if( $patron->guarantee_relationships->count ){
            $fines_amount += $patron->relationships_debt({ include_guarantors
=> 0, only_this_guarantor => 1, include_this_patron => 0 });
            $fine_blocked ||= $fines_amount > $noissueschargeguarantees;
            $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on
guaranteed accounts" if $fine_blocked;
        }
    }

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list