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

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

Return to bug 13961