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:31 -0700 |
commit | ddfa1b3070f48aacfeb380dd2624040d2daaac8e (patch) | |
tree | 94a76f75b15cac79e0a126041fa631ff32e8b9d9 /FS/FS/Template_Mixin.pm | |
parent | 7e8171aede9c416c8b8380dfd081fd48e2fa1615 (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 1cc6e97fc..5abcc143c 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -685,7 +685,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) |