diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-02-12 16:54:38 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-02-12 16:54:38 -0800 |
commit | 00f058e191f1c2450fad45eecf31fb7b17fc4e76 (patch) | |
tree | 247277cb1f800a4ec0977b3e09933d8dee08b773 /FS/FS/Template_Mixin.pm | |
parent | 5c4affbb64c04367fa2366c56d2ed5c07d279a5f (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 f679d8e..7086701 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -655,10 +655,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 = (); |