diff options
author | ivan <ivan> | 2004-01-16 21:45:37 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-01-16 21:45:37 +0000 |
commit | 5edf279b260fd952457af1ab8489eaec7952204a (patch) | |
tree | 81cb1305de47c9a9456156fd1dfc1532cdf27056 /FS | |
parent | 35561e0c77644baee2be00bffe70991c4f912d4d (diff) |
apply variable substitutions in latex notes also
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_bill.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index a5602a708..3c941ca6f 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -943,15 +943,22 @@ sub print_latex { 'footer' => join("\n", $conf->config('invoice_latexfooter') ), 'quantity' => 1, 'terms' => $conf->config('invoice_default_terms') || 'Payable upon receipt', - 'notes' => join("\n", $conf->config('invoice_latexnotes') ), + #'notes' => join("\n", $conf->config('invoice_latexnotes') ), ); - $invoice_data{'footer'} =~ s/\n+$//; - $invoice_data{'notes'} =~ s/\n+$//; - my $countrydefault = $conf->config('countrydefault') || 'US'; $invoice_data{'country'} = '' if $invoice_data{'country'} eq $countrydefault; + #do variable substitutions in notes + $invoice_data{'notes'} = + join("\n", + map { my $b=$_; $b =~ s/\$(\w+)/$invoice_data{$1}/eg; $b } + $conf->config('invoice_latexnotes') + ); + + $invoice_data{'footer'} =~ s/\n+$//; + $invoice_data{'notes'} =~ s/\n+$//; + $invoice_data{'po_line'} = ( $cust_main->payby eq 'BILL' && $cust_main->payinfo ) ? _latex_escape("Purchase Order #". $cust_main->payinfo) |