summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-07-20 13:02:15 -0700
committerIvan Kohler <ivan@freeside.biz>2016-07-20 13:02:15 -0700
commitc22d84e565ab16db142395dce2e8621624eff140 (patch)
tree3670e2bc0bf200910c3af24e5459e8b6966a992b /FS/FS/Template_Mixin.pm
parente9a7ae3aadab31f34c6bacb2376f817ecd4d7d8d (diff)
parentf235a64b4e96e8d613fb3ecdd3acc7f65f9f291d (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 5153f87e8..c8ddffd79 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({
@@ -3320,6 +3322,7 @@ sub _items_cust_bill_pkg {
# append the word 'Setup' to the setup line if there's going to be
# a recur line for the same package (i.e. not a one-time charge)
+ # XXX localization
my $description = $desc;
$description .= ' Setup'
if $cust_bill_pkg->recur != 0
@@ -3340,8 +3343,11 @@ sub _items_cust_bill_pkg {
# always pass the svc_label through to the template, even if
# not displaying it as an ext_description
my @svc_labels = map &{$escape_function}($_),
- $cust_pkg->h_labels_short($self->_date, undef, 'I');
-
+ $cust_pkg->h_labels_short($self->_date,
+ undef,
+ 'I',
+ $self->conf->{locale},
+ );
$svc_label = $svc_labels[0];
unless ( $cust_pkg->part_pkg->hide_svc_detail
@@ -3431,7 +3437,9 @@ sub _items_cust_bill_pkg {
push @dates, undef if !$prev;
my @svc_labels = map &{$escape_function}($_),
- $cust_pkg->h_labels_short(@dates, 'I');
+ $cust_pkg->h_labels_short(@dates,
+ 'I',
+ $self->conf->{locale});
$svc_label = $svc_labels[0];
# show service labels, unless...