diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-02-12 16:54:35 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-02-12 16:54:35 -0800 |
commit | 2e55db01a7c8990957256d959911312eadc33255 (patch) | |
tree | 6e70e983ab18617270526aa94c769e8d3d49d28c /FS/FS/Template_Mixin.pm | |
parent | 73689cc60458a87931d2d3d304d650d69bcf690c (diff) |
don't barf displaying invoices for location-less customers, RT#79312
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index b9f3e92..88fd4e8 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -657,10 +657,11 @@ sub print_generic { $invoice_data{'cid'} = $params{'cid'} if $params{'cid'}; - if ( $cust_main->country eq $countrydefault ) { - $invoice_data{'country'} = ''; - } else { + if ( $cust_main->bill_locationnum + && $cust_main->bill_location->country ne $countrydefault ) { $invoice_data{'country'} = &$escape_function($cust_main->bill_country_full); + } else { + $invoice_data{'country'} = ''; } my @address = (); |