@@ -, +, @@ NoIssuesChargeGuarantees 1 - Find an adult patron in Koha 2 - Add two guarantees 3 - Add $1 fine to parent, $5 fine to each guarantee 4 - Set no issues charge guarantees to 10 5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 6 - Note the 64 message starts with Y's that mean patron is blocked 7 - Repeat with each child barcode 8 - They are blocked? 9 - Apply patch, restart all --- C4/SIP/ILS/Patron.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/C4/SIP/ILS/Patron.pm +++ a/C4/SIP/ILS/Patron.pm @@ -93,9 +93,11 @@ sub new { $fine_blocked ||= $fines_amount > $noissueschargeguarantorswithguarantees; $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on related accounts" if $fine_blocked; } elsif ( $noissueschargeguarantees ) { - $fines_amount += $patron->relationships_debt({ include_guarantors => 0, only_this_guarantor => 0, include_this_patron => 0 }); - $fine_blocked ||= $fines_amount > $noissueschargeguarantees; - $fines_msg .= " -- " . "Patron blocked by fines ($fines_amount) on guaranteed accounts" if $fine_blocked; + 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; + } } my $circ_blocked =( C4::Context->preference('OverduesBlockCirc') ne "noblock" && defined $flags->{ODUES}->{itemlist} ) ? 1 : 0; --