|
Lines 2374-2379
sub account_balance {
Link Here
|
| 2374 |
return $self->account->balance; |
2374 |
return $self->account->balance; |
| 2375 |
} |
2375 |
} |
| 2376 |
|
2376 |
|
|
|
2377 |
=head3 balance_details |
| 2378 |
|
| 2379 |
my $balance_details = $patron->balance_details |
| 2380 |
|
| 2381 |
Return the patron's account balance details. |
| 2382 |
|
| 2383 |
=cut |
| 2384 |
|
| 2385 |
sub balance_details { |
| 2386 |
my ($self) = @_; |
| 2387 |
|
| 2388 |
my $account = $self->account; |
| 2389 |
|
| 2390 |
# get outstanding debits and credits |
| 2391 |
my $debits = $account->outstanding_debits; |
| 2392 |
my $credits = $account->outstanding_credits; |
| 2393 |
|
| 2394 |
return { |
| 2395 |
balance => $account->balance, |
| 2396 |
outstanding_debits => { |
| 2397 |
total => $debits->total_outstanding, |
| 2398 |
lines => $debits->to_api, |
| 2399 |
}, |
| 2400 |
outstanding_credits => { |
| 2401 |
total => $credits->total_outstanding, |
| 2402 |
lines => $credits->to_api, |
| 2403 |
} |
| 2404 |
}; |
| 2405 |
} |
| 2406 |
|
| 2377 |
=head3 notify_library_of_registration |
2407 |
=head3 notify_library_of_registration |
| 2378 |
|
2408 |
|
| 2379 |
$patron->notify_library_of_registration( $email_patron_registrations ); |
2409 |
$patron->notify_library_of_registration( $email_patron_registrations ); |