diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-11-09 12:03:52 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-11-09 12:03:52 -0800 |
commit | 0c04fc78f66d17a5736686757cd8f838715c8380 (patch) | |
tree | 582834c1115e6e28c78974a4cd336bed89d23cd9 /FS/FS/Template_Mixin.pm | |
parent | 9545a93c2cb4ee76c4226e0eacf9a6fb9c169adf (diff) | |
parent | b668e94b7ed814217c9e4a9cfec6ed4df98e023a (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 840df7558..2314c02c1 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -581,11 +581,14 @@ sub print_generic { my $countrydefault = $conf->config('countrydefault') || 'US'; foreach ( qw( address1 address2 city state zip country fax) ){ my $method = 'ship_'.$_; - $invoice_data{"ship_$_"} = _latex_escape($cust_main->$method); + $invoice_data{"ship_$_"} = $escape_function->($cust_main->$method); } - foreach ( qw( contact company ) ) { #compatibility - $invoice_data{"ship_$_"} = _latex_escape($cust_main->$_); + if ( length($cust_main->ship_company) ) { + $invoice_data{'ship_company'} = $escape_function->($cust_main->ship_company); + } else { + $invoice_data{'ship_company'} = $escape_function->($cust_main->company); } + $invoice_data{'ship_contact'} = $escape_function->($cust_main->contact); $invoice_data{'ship_country'} = '' if ( $invoice_data{'ship_country'} eq $countrydefault ); |