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

(-)a/misc/cronjobs/overdue_notices.pl (-10 / +5 lines)
Lines 40-45 use C4::Dates qw/format_date/; Link Here
40
use C4::Debug;
40
use C4::Debug;
41
use C4::Letters;
41
use C4::Letters;
42
use C4::Overdues qw(GetFine);
42
use C4::Overdues qw(GetFine);
43
use C4::Budgets qw(GetCurrency);
43
44
44
=head1 NAME
45
=head1 NAME
45
46
Lines 687-699 sub parse_letter { Link Here
687
        $tables{'branches'} = $p;
688
        $tables{'branches'} = $p;
688
    }
689
    }
689
690
690
    my $currency_format;
691
    my $currency_format = GetCurrency()->{currency};
691
    if ( defined $params->{'letter'}->{'content'}
692
        and $params->{'letter'}->{'content'} =~ m/<fine>(.*)<\/fine>/o )
693
    {    # process any fine tags...
694
        $currency_format = $1;
695
        $params->{'letter'}->{'content'} =~ s/<fine>.*<\/fine>/<<item.fine>>/o;
696
    }
697
692
698
    my @item_tables;
693
    my @item_tables;
699
    if ( my $i = $params->{'items'} ) {
694
    if ( my $i = $params->{'items'} ) {
Lines 705-712 sub parse_letter { Link Here
705
                $item_format = $1;
700
                $item_format = $1;
706
            }
701
            }
707
702
708
            $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL)
703
            $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL);
709
              if $currency_format;
704
            # if active currency isn't correct ISO code fallback to sprintf
705
            $item->{'fine'} = sprintf('%.2f', $fine) unless $item->{'fine'};
710
706
711
            push @item_tables, {
707
            push @item_tables, {
712
                'biblio' => $item->{'biblionumber'},
708
                'biblio' => $item->{'biblionumber'},
713
- 

Return to bug 8378