diff options
author | ivan <ivan> | 2005-06-09 06:36:37 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-06-09 06:36:37 +0000 |
commit | 28aa236f554e009b2fc416378717e478992ec715 (patch) | |
tree | 53b9ec88f89c08f99bec3baa94b006f5ffeb66d5 | |
parent | 0fae7e51cc148a1cb589923f78afc3f5eb1e17c3 (diff) |
and make (html|latex)(small)?footer optionall per-agent too
-rw-r--r-- | FS/FS/cust_bill.pm | 15 | ||||
-rw-r--r-- | FS/FS/part_bill_event.pm | 7 |
2 files changed, 14 insertions, 8 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 2a7d50637..a603310ae 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1358,8 +1358,8 @@ sub print_latex { 'city' => _latex_escape($cust_main->city), 'state' => _latex_escape($cust_main->state), 'zip' => _latex_escape($cust_main->zip), - 'footer' => join("\n", $conf->config('invoice_latexfooter') ), - 'smallfooter' => join("\n", $conf->config('invoice_latexsmallfooter') ), + 'footer' => join("\n", $conf->config_orbase('invoice_latexfooter', $template) ), + 'smallfooter' => join("\n", $conf->config_orbase('invoice_latexsmallfooter', $template) ), 'returnaddress' => $returnaddress, 'quantity' => 1, 'terms' => $conf->config('invoice_default_terms') || 'Payable upon receipt', @@ -1805,11 +1805,12 @@ sub print_html { # $conf->config_orbase('invoice_latexnotes', $suffix) # ); - $invoice_data{'footer'} = $conf->exists('invoice_htmlfooter') - ? join("\n", $conf->config('invoice_htmlfooter') ) - : join("\n", map { s/~/ /g; s/\\\\\*?\s*$/<BR>/; $_; } - $conf->config('invoice_latexfooter') - ); + $invoice_data{'footer'} = + length($conf->config_orbase('invoice_htmlfooter', $template)) + ? join("\n", $conf->config_orbase('invoice_htmlfooter', $template) ) + : join("\n", map { s/~/ /g; s/\\\\\*?\s*$/<BR>/; $_; } + $conf->config_orbase('invoice_latexfooter', $template) + ); $invoice_data{'po_line'} = ( $cust_main->payby eq 'BILL' && $cust_main->payinfo ) diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index 5731f7883..573b21b59 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -158,7 +158,12 @@ sub check { if ( $self->plandata =~ /^(agent_)?templatename\s+(.*)$/m ) { my $name= $2; - foreach my $file (qw( template latex latexnotes html htmlnotes )) { + foreach my $file (qw( template + latex latexnotes latexreturnaddress latexfooter + latexsmallfooter + html htmlnotes htmlreturnaddress htmlfooter + )) + { unless ( $conf->exists("invoice_${file}_$name") ) { $conf->set( "invoice_${file}_$name" => |