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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 857-863 sub CanBookBeIssued { Link Here
857
    my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
857
    my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
858
    $no_issues_charge_guarantors = undef unless looks_like_number( $no_issues_charge_guarantors );
858
    $no_issues_charge_guarantors = undef unless looks_like_number( $no_issues_charge_guarantors );
859
    if ( defined $no_issues_charge_guarantors ) {
859
    if ( defined $no_issues_charge_guarantors ) {
860
        my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guaranor => 0, include_this_patron => 1 });
860
        my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
861
861
862
        if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors && !$inprocess && !$allowfineoverride) {
862
        if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors && !$inprocess && !$allowfineoverride) {
863
            $issuingimpossible{DEBT_GUARANTORS} = $guarantors_non_issues_charges;
863
            $issuingimpossible{DEBT_GUARANTORS} = $guarantors_non_issues_charges;
(-)a/C4/SIP/ILS/Patron.pm (-1 / +1 lines)
Lines 70-76 sub new { Link Here
70
    my $fines_amount = $flags->{CHARGES}->{amount}; #TODO Replace with $patron->account->non_issues_charges
70
    my $fines_amount = $flags->{CHARGES}->{amount}; #TODO Replace with $patron->account->non_issues_charges
71
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
71
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
72
    if ( C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees') ) {
72
    if ( C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees') ) {
73
        $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guaranor => 0, include_this_patron => 1 });
73
        $fines_amount += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
74
    } else {
74
    } else {
75
        my $guarantees_fines_amount = $flags->{CHARGES_GUARANTEES} ? $flags->{CHARGES_GUARANTEES}->{amount} : 0; #TODO: Replace with $patron->relationships_debt
75
        my $guarantees_fines_amount = $flags->{CHARGES_GUARANTEES} ? $flags->{CHARGES_GUARANTEES}->{amount} : 0; #TODO: Replace with $patron->relationships_debt
76
        $fines_amount += $guarantees_fines_amount;
76
        $fines_amount += $guarantees_fines_amount;
(-)a/circ/circulation.pl (-2 / +1 lines)
Lines 497-503 if ( $patron ) { Link Here
497
    # Check the debt of this patrons guarantors *and* the guarantees of those guarantors
497
    # Check the debt of this patrons guarantors *and* the guarantees of those guarantors
498
    my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
498
    my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
499
    if ( $no_issues_charge_guarantors ) {
499
    if ( $no_issues_charge_guarantors ) {
500
        my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guaranor => 0, include_this_patron => 1 });
500
        my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
501
501
502
        if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) {
502
        if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) {
503
            $template->param(
503
            $template->param(
504
- 

Return to bug 19382