diff options
author | Mark Wells <mark@freeside.biz> | 2016-07-12 15:46:47 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-07-12 15:46:55 -0700 |
commit | 6f5ea058941c0acb13b02c86287c54974bd3d59f (patch) | |
tree | 4146d9db6d729d26ea1ee4bd010b846f74917007 /FS/FS/Template_Mixin.pm | |
parent | 44d27f7842c32750ddf6210c83b949d5b440a6c5 (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.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index ddc933e..2355529 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -3186,7 +3186,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({ @@ -3358,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; + 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); @@ -3468,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; + 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); |