# start setting up summary subtotals
my @summary_subtotals;
my $method = $conf->config('summary_subtotals_method');
- if ( $method and $method ne $conf->config($tc.'sections_method') ) {
+ if ( ( ref($self) ne 'FS::quotation' ) and $method and $method ne $conf->config($tc.'sections_method') ) {
# then re-section them by the correct method
my %section_method = ( by_category => 1 );
if ( $conf->config('summary_subtotals_method') eq 'location' ) {
# 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({
my @details = $cust_bill_pkg->details;
# and I guess they're never bundled either?
- if ( $cust_bill_pkg->setup != 0 ) {
+ if (( $cust_bill_pkg->setup != 0 ) || ( $cust_bill_pkg->setup_show_zero )) {
my $description = $desc;
$description .= ' Setup'
if $cust_bill_pkg->recur != 0
),
};
}
- if ( $cust_bill_pkg->recur != 0 ) {
+ if (( $cust_bill_pkg->recur != 0 ) || ( $cust_bill_pkg->recur_show_zero )) {
#push @b, {
$r = {
'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref
# 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
# 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
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...