[freeside-commits] branch FREESIDE_4_BRANCH updated. 00f058e191f1c2450fad45eecf31fb7b17fc4e76

Ivan Kohler ivan at freeside.biz
Mon Feb 12 16:54:39 PST 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  00f058e191f1c2450fad45eecf31fb7b17fc4e76 (commit)
      from  5c4affbb64c04367fa2366c56d2ed5c07d279a5f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 00f058e191f1c2450fad45eecf31fb7b17fc4e76
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Feb 12 16:54:38 2018 -0800

    don't barf displaying invoices for location-less customers, RT#79312

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index f679d8e17..7086701d6 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 = ();

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list