View | Details | Raw Unified | Return to bug 33411
Collapse All | Expand All

(-)a/C4/SIP/ILS/Patron.pm (-4 / +5 lines)
Lines 93-101 sub new { Link Here
93
        $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees;
93
        $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees;
94
        $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on related accounts" if $fine_blocked;
94
        $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on related accounts" if $fine_blocked;
95
    } elsif ( $noissueschargeguarantees ) {
95
    } elsif ( $noissueschargeguarantees ) {
96
        $fines_amount += $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 0, include_this_patron => 0 });
96
        if( $patron->guarantee_relationships->count ){
97
        $fine_blocked ||= $fines_amount > $noissueschargeguarantees;
97
            $fines_amount += $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 1, include_this_patron => 0 });
98
        $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on guaranteed accounts" if $fine_blocked;
98
            $fine_blocked ||= $fines_amount > $noissueschargeguarantees;
99
            $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on guaranteed accounts" if $fine_blocked;
100
        }
99
    }
101
    }
100
102
101
    my $circ_blocked =( C4::Context->preference('OverduesBlockCirc') ne "noblock" &&  defined $flags->{ODUES}->{itemlist} ) ? 1 : 0;
103
    my $circ_blocked =( C4::Context->preference('OverduesBlockCirc') ne "noblock" &&  defined $flags->{ODUES}->{itemlist} ) ? 1 : 0;
102
- 

Return to bug 33411