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

(-)a/C4/Letters.pm (-6 / +7 lines)
Lines 675-685 sub GetPreparedLetter { Link Here
675
    my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef;
675
    my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef;
676
676
677
    my $borrowernumber = $tables->{borrowers};
677
    my $borrowernumber = $tables->{borrowers};
678
    my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber  });
678
    if($borrowernumber && !ref($borrowernumber)){
679
    my ($totalfine) = $lines->total_outstanding;
679
        my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber  });
680
    my $totalfine_formatted = currency_format($currency_format, "$totalfine", FMT_SYMBOL);
680
        my ($totalfine) = $lines->total_outstanding;
681
    $totalfine_formatted = sprintf("%.2f", $totalfine) unless $totalfine_formatted;
681
        my $totalfine_formatted = currency_format($currency_format, "$totalfine", FMT_SYMBOL);
682
    $letter->{content} =~ s/<<borrowers.account_balance>>/$totalfine_formatted/go;
682
        $totalfine_formatted = sprintf("%.2f", $totalfine) unless $totalfine_formatted;
683
        $letter->{content} =~ s/<<borrowers.account_balance>>/$totalfine_formatted/go;
684
    }
683
685
684
    if ($want_librarian) {
686
    if ($want_librarian) {
685
        # parsing librarian name
687
        # parsing librarian name
686
- 

Return to bug 13961