summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-04-04 12:49:57 -0700
committerIvan Kohler <ivan@freeside.biz>2018-04-04 12:49:57 -0700
commit61536edebfca5fab5892614a3714f68e43d52327 (patch)
treec86f4f5e378fdac053017ca3f98ddf9674740671 /FS/FS/Template_Mixin.pm
parentd0a592d22b43b8d884c85a74364bc0366127cee2 (diff)
invoice_sections_with_taxes per-agent, RT#79636
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index c2e3a26..6c4f6fe 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -299,7 +299,7 @@ before that line item (quotations only)
=item template
-Dprecated. Used as a suffix for a configuration template. Please
+Deprecated. Used as a suffix for a configuration template. Please
don't use this, it deprecated in favor of more flexible alternatives.
=back
@@ -1194,7 +1194,7 @@ sub print_generic {
my %options = ();
$options{'section'} = $section if $multisection;
$options{'section_with_taxes'} = 1
- if $conf->exists('invoice_sections_with_taxes');
+ if $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum);
$options{'format'} = $format;
$options{'escape_function'} = $escape_function;
$options{'no_usage'} = 1 unless $unsquelched;
@@ -1383,7 +1383,7 @@ sub print_generic {
$tax_section->{'description'} = $self->mt($tax_description);
$tax_section->{'summarized'} = '';
- if ( $conf->exists('invoice_sections_with_taxes')) {
+ if ( $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum) ) {
# remove tax section if taxes are itemized within other sections
@sections = grep{ $_ ne $tax_section } @sections;
@@ -2037,7 +2037,7 @@ sub balance_due_msg {
my $msg = $self->mt('Balance Due');
return $msg unless $self->terms; # huh?
if ( !$self->conf->exists('invoice_show_prior_due_date')
- or $self->conf->exists('invoice_sections') ) {
+ || $self->has_sections ) {
# if enabled, the due date is shown with Total New Charges (see
# _items_total) and not here
# (yes, or if invoice_sections is enabled; this is just for compatibility)
@@ -3841,8 +3841,8 @@ sub has_sections {
return 0 unless $self->invnum > 0;
- $agentnum ||= $self->cust_main->agentnum;
- return 1 if $self->conf->exists('invoice_sections', $agentnum);
+ $agentnum ||= $self->agentnum;
+ return 1 if $self->conf->config_bool('invoice_sections', $agentnum);
return 1 if $self->conf->exists('sections_by_location', $agentnum);
my $location_min = $self->conf->config(