Lines 637-647
sub GetPreparedLetter {
Link Here
|
637 |
my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef; |
637 |
my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef; |
638 |
|
638 |
|
639 |
my $borrowernumber = $tables->{borrowers}; |
639 |
my $borrowernumber = $tables->{borrowers}; |
640 |
my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber }); |
640 |
if($borrowernumber && !ref($borrowernumber)){ |
641 |
my ($totalfine) = $lines->total_outstanding; |
641 |
my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber }); |
642 |
my $totalfine_formatted = currency_format($currency_format, "$totalfine", FMT_SYMBOL); |
642 |
my ($totalfine) = $lines->total_outstanding; |
643 |
$totalfine_formatted = sprintf("%.2f", $totalfine) unless $totalfine_formatted; |
643 |
my $totalfine_formatted = currency_format($currency_format, "$totalfine", FMT_SYMBOL); |
644 |
$letter->{content} =~ s/<<borrowers.account_balance>>/$totalfine_formatted/go; |
644 |
$totalfine_formatted = sprintf("%.2f", $totalfine) unless $totalfine_formatted; |
|
|
645 |
$letter->{content} =~ s/<<borrowers.account_balance>>/$totalfine_formatted/go; |
646 |
} |
645 |
|
647 |
|
646 |
if ($want_librarian) { |
648 |
if ($want_librarian) { |
647 |
# parsing librarian name |
649 |
# parsing librarian name |
648 |
- |
|
|