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 |
- |
|
|