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

(-)a/circ/circulation.pl (-2 / +5 lines)
Lines 626-631 if ($patron) { Link Here
626
        $template->param( is_anonymous => 1 );
626
        $template->param( is_anonymous => 1 );
627
        $noissues = 1;
627
        $noissues = 1;
628
    }
628
    }
629
    my $lines = Koha::Account::Lines->search({ borrowernumber => $patron->id });
630
    my $credits_balance = $lines->credits_total;
629
    my $patron_charge_limits = $patron->is_patron_inside_charge_limits();
631
    my $patron_charge_limits = $patron->is_patron_inside_charge_limits();
630
    if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) {
632
    if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) {
631
        my $noissuescharge =
633
        my $noissuescharge =
Lines 636-645 if ($patron) { Link Here
636
            charges       => 1,
638
            charges       => 1,
637
            chargesamount => $patron_charge_limits->{noissuescharge}->{charge},
639
            chargesamount => $patron_charge_limits->{noissuescharge}->{charge},
638
        );
640
        );
639
    } elsif ( $balance < 0 ) {
641
    }
642
    if ( $credits_balance < 0 ) {
640
        $template->param(
643
        $template->param(
641
            credits       => 1,
644
            credits       => 1,
642
            creditsamount => -$balance,
645
            creditsamount => -$credits_balance,
643
        );
646
        );
644
    }
647
    }
645
648
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc (-1 / +1 lines)
Lines 150-156 Link Here
150
150
151
        [% IF ( credits ) %]
151
        [% IF ( credits ) %]
152
            <li class="credits">
152
            <li class="credits">
153
                <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of <span class="credit"><strong>[% creditsamount | $Price %]</strong></span>[% END %]
153
                <span class="circ-hlt">Credits:</span> Patron has outstanding credits[% IF ( creditsamount ) %] of <span class="credit"><strong>[% creditsamount | $Price %]</strong></span>[% END %]
154
            </li>
154
            </li>
155
        [% END %]
155
        [% END %]
156
        [% IF (noissues && CAN_user_circulate_force_checkout && !moremember) %]
156
        [% IF (noissues && CAN_user_circulate_force_checkout && !moremember) %]
(-)a/members/moremember.pl (-3 / +6 lines)
Lines 242-257 my $issues = $patron->checkouts; Link Here
242
my $balance = 0;
242
my $balance = 0;
243
$balance = $patron->account->balance;
243
$balance = $patron->account->balance;
244
244
245
my $lines = Koha::Account::Lines->search({ borrowernumber => $patron->id });
246
my $credits_balance = $lines->credits_total;
247
245
my $patron_charge_limits = $patron->is_patron_inside_charge_limits();
248
my $patron_charge_limits = $patron->is_patron_inside_charge_limits();
246
if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) {
249
if ( $patron_charge_limits->{noissuescharge}->{charge} > 0 ) {
247
    $template->param(
250
    $template->param(
248
        charges       => 1,
251
        charges       => 1,
249
        chargesamount => $patron_charge_limits->{noissuescharge}->{charge},
252
        chargesamount => $patron_charge_limits->{noissuescharge}->{charge},
250
    );
253
    );
251
} elsif ( $balance < 0 ) {
254
} 
255
if ( $credits_balance < 0 ) {
252
    $template->param(
256
    $template->param(
253
        credits       => 1,
257
        credits       => 1,
254
        creditsamount => -$balance,
258
        creditsamount => -$credits_balance,
255
    );
259
    );
256
}
260
}
257
261
258
- 

Return to bug 38532