summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-07-12 15:46:47 -0700
committerMark Wells <mark@freeside.biz>2016-07-12 15:46:47 -0700
commit7773547423c9cd0e8ac7915de58daacbec7ccf09 (patch)
treebb519bb7594b49135e85a67dff80fcf7c264f281 /FS/FS/Template_Mixin.pm
parentfe92beb1b4322f86815a83491723b07aca2f9b93 (diff)
option to show all package locations on invoice, #71474
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index ed4bb6273..b197c6ce2 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -3177,7 +3177,9 @@ sub _items_cust_bill_pkg {
# for location labels: use default location on the invoice date
my $default_locationnum;
- if ( $self->custnum ) {
+ if ( $conf->exists('invoice-all_pkg_addresses') ) {
+ $default_locationnum = 0; # treat them all as non-default
+ } elsif ( $self->custnum ) {
my $h_cust_main;
my @h_search = FS::h_cust_main->sql_h_search($self->_date);
$h_cust_main = qsearchs({
@@ -3394,7 +3396,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;
+ my $loc = $cust_pkg->location_label(no_prefix => 1);
$loc = substr($loc, 0, $maxlength). '...'
if $format eq 'latex' && length($loc) > $maxlength;
push @d, &{$escape_function}($loc);
@@ -3504,7 +3506,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;
+ my $loc = $cust_pkg->location_label(no_prefix => 1);
$loc = substr($loc, 0, $maxlength). '...'
if $format eq 'latex' && length($loc) > $maxlength;
push @d, &{$escape_function}($loc);