[freeside-commits] branch FREESIDE_3_BRANCH updated. ca052a8ef27b32d46730ccd7a371a5deb397a9d0
Ivan Kohler
ivan at freeside.biz
Wed Apr 4 12:58:57 PDT 2018
The branch, FREESIDE_3_BRANCH has been updated
via ca052a8ef27b32d46730ccd7a371a5deb397a9d0 (commit)
from 64913975f8f1344e76ee97af2893dd8a1296fcd5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ca052a8ef27b32d46730ccd7a371a5deb397a9d0
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Apr 4 12:49:49 2018 -0700
invoice_sections_with_taxes per-agent, RT#79636
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 1ebc13d03..8f0d3e990 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1711,6 +1711,7 @@ and customer address. Include units.',
'description' => 'Split invoice into sections and label according to either package category or location when enabled.',
'type' => 'checkbox',
'per_agent' => 1,
+ 'config_bool' => 1,
},
{
@@ -1742,6 +1743,8 @@ and customer address. Include units.',
'section' => 'invoicing',
'description' => 'Include taxes within each section of mutli-section invoices.',
'type' => 'checkbox',
+ 'per_agent' => 1,
+ 'agent_bool' => 1,
},
{
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 99019e91e..791415f76 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
@@ -939,7 +939,7 @@ sub print_generic {
my $multisection = $self->has_sections;
$invoice_data{'multisection'} = $multisection;
my $section_with_taxes = 1
- if $conf->exists('invoice_sections_with_taxes');
+ if $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum);
my $late_sections;
my $extra_sections = [];
my $extra_lines = ();
@@ -1377,7 +1377,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;
@@ -2028,8 +2028,8 @@ 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') ) {
- # if enabled, the due date is shown with Total New Charges (see
+ || $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)
if ( $self->due_date ) {
@@ -3885,8 +3885,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(
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 3 +++
FS/FS/Template_Mixin.pm | 14 +++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list