diff options
author | Mark Wells <mark@freeside.biz> | 2013-11-08 16:47:13 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-11-08 16:47:13 -0800 |
commit | 3b172c8a7b7ca97bd71671dc358f29c5116948da (patch) | |
tree | a85f5037fb0d9490376d59ce684fefec51905f47 /FS/FS/Template_Mixin.pm | |
parent | 8adb2ffe88bff5cc7e9a62c113ff81c2662ae0eb (diff) |
option to make ship_company field available again, #25782
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 ); |