diff options
author | Mark Wells <mark@freeside.biz> | 2015-10-01 21:05:14 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-10-01 21:05:14 -0700 |
commit | bf6c11bc520aa4e4e0fa75f0469c66a11cf11a31 (patch) | |
tree | 69f87245d3f2a731f57d07ff34323780e5ad22bd /FS/FS/Template_Mixin.pm | |
parent | 55de788f065cebc8273bcc52befb82cec9eff129 (diff) |
refine disable_previous_balance behavior to show new charges only, #35222, #37396
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 206c03c..1a3217c 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -684,7 +684,12 @@ sub print_generic { my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance # my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits #my $balance_due = $self->owed + $pr_total - $cr_total; - my $balance_due = $self->owed + $pr_total; + my $balance_due = $self->owed; + if ( $self->enable_previous ) { + $balance_due += $pr_total; + } + # otherwise the previous balance is not shown, so including it in the + # balance due is just confusing # the sum of amount owed on all invoices # (this is used in the summary & on the payment coupon) |