summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2005-06-09 05:59:57 +0000
committerivan <ivan>2005-06-09 05:59:57 +0000
commitbd37cef4d8a2930a7550efe857d354a790ffc65f (patch)
treeb1661e14f88de7fb61ffd0c2cab42cc93f2e5f98
parent6cd950830fa622fa6cbe87895dc58fb1c9868eef (diff)
make sure invoice_(latex|html)returnaddress is configurable per-agent
-rw-r--r--FS/FS/cust_bill.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index a9bb7452b..ed08ae79a 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1336,11 +1336,10 @@ sub print_latex {
}
my $returnaddress;
- if ( $conf->exists('invoice_latexreturnaddress')
- && length($conf->exists('invoice_latexreturnaddress'))
- )
- {
- $returnaddress = join("\n", $conf->config('invoice_latexreturnaddress') );
+ if ( length($conf->config_orbase('invoice_latexreturnaddress', $template) ) {
+ $returnaddress = join("\n",
+ $conf->config_orbase('invoice_latexreturnaddress', $template)
+ );
} else {
$returnaddress = '~';
}
@@ -1762,16 +1761,17 @@ sub print_html {
# 'conf_dir' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
);
- $invoice_data{'returnaddress'} = $conf->exists('invoice_htmlreturnaddress')
- ? join("\n", $conf->config('invoice_htmlreturnaddress') )
- : join("\n", map {
- s/~/&nbsp;/g;
- s/\\\\\*?\s*$/<BR>/;
- s/\\hyphenation\{[\w\s\-]+\}//;
- $_;
- }
- $conf->config('invoice_latexreturnaddress')
- );
+ $invoice_data{'returnaddress'} =
+ length( $conf->config_orbase('invoice_htmlreturnaddress', $template) )
+ ? join("\n", $conf->config('invoice_htmlreturnaddress', $template) )
+ : join("\n", map {
+ s/~/&nbsp;/g;
+ s/\\\\\*?\s*$/<BR>/;
+ s/\\hyphenation\{[\w\s\-]+\}//;
+ $_;
+ }
+ $conf->config_orbase('invoice_latexreturnaddress', $template)
+ );
my $countrydefault = $conf->config('countrydefault') || 'US';
if ( $cust_main->country eq $countrydefault ) {