restore location labels on invoices, but remove the 'default service location' prefix...
authorMark Wells <mark@freeside.biz>
Wed, 13 Jul 2016 00:31:33 +0000 (17:31 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 13 Jul 2016 00:31:56 +0000 (17:31 -0700)
FS/FS/Template_Mixin.pm
FS/FS/cust_location.pm

index 2355529..c8ddffd 100644 (file)
@@ -3360,7 +3360,7 @@ sub _items_cust_bill_pkg {
             # location, and we're not grouping items by location already
             if ( $cust_pkg->locationnum != $default_locationnum
                   and !defined($locationnum) ) {
-              my $loc = $cust_pkg->location_label(no_prefix => 1);
+              my $loc = $cust_pkg->location_label;
               $loc = substr($loc, 0, $maxlength). '...'
                 if $format eq 'latex' && length($loc) > $maxlength;
               push @d, &{$escape_function}($loc);
@@ -3470,7 +3470,7 @@ sub _items_cust_bill_pkg {
             # location, and we're not grouping items by location already
             if ( $cust_pkg->locationnum != $default_locationnum
                   and !defined($locationnum) ) {
-              my $loc = $cust_pkg->location_label(no_prefix => 1);
+              my $loc = $cust_pkg->location_label;
               $loc = substr($loc, 0, $maxlength). '...'
                 if $format eq 'latex' && length($loc) > $maxlength;
               push @d, &{$escape_function}($loc);
index 0dec065..9040098 100644 (file)
@@ -722,9 +722,12 @@ sub label_prefix {
   } elsif ( $label_prefix eq '_location' && $self->locationname ) {
     $prefix = $self->locationname;
 
-  } elsif (    ( $opt{'cust_main'} || $self->custnum )
-          && $self->locationnum == $cust_or_prospect->ship_locationnum ) {
-    $prefix = 'Default service location';
+  #} elsif (    ( $opt{'cust_main'} || $self->custnum )
+  #        && $self->locationnum == $cust_or_prospect->ship_locationnum ) {
+  #  $prefix = 'Default service location';
+  #}
+  } else {
+    $prefix = '';
   }
 
   $prefix;