From 3ceca93e2a975c91cf4471cea68e32c12546d158 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 23 Apr 2008 02:59:15 +0000 Subject: [PATCH] fixup return address fallback --- FS/FS/cust_bill.pm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index ea177be88..520bfe1f2 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1785,13 +1785,17 @@ sub print_generic { ); } elsif ( grep /\S/, $conf->config('company_address') ) { - $returnaddress = join( "\n", $conf->config('company_address') ); - - $returnaddress = - join( '\\*'."\n", map s/( {2,})/'~' x length($1)/eg, - $conf->config('company_address') - ) - if $format eq 'latex'; + my $convert_map = $convert_maps{$format}{'returnaddress'}; + $returnaddress = join( "\n", &$convert_map( + map { s/( {2,})/'~' x length($1)/eg; + s/$/\\\\\*/; + $_ + } + ( $conf->config('company_name'), + $conf->config('company_address'), + ) + ) + ); } else { -- 2.11.0