X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=db909309fa041c29f76a2d72673a18e45fcc8500;hp=95e705802b2bd40c858d378aebea2a7139b19e26;hb=f39624dd22a91495798f253aa5f122e05a77bc41;hpb=8c8a76cd23a7022b7616cdf16bb3bbe208813810 diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 95e705802..db909309f 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2822,20 +2822,26 @@ sub _items_total { my @items; my ($pr_total) = $self->previous; - my ($new_charges_desc, $new_charges_amount); + my ($previous_charges_desc, $new_charges_desc, $new_charges_amount); if ( $conf->exists('previous_balance-exclude_from_total') ) { + # can we do some caching on this stuff? it's going to change infrequently + # in production + $previous_charges_desc = $self->mt( + $conf->config('previous_balance-text') || 'Previous Balance' + ); + # then return separate lines for previous balance and total new charges if ( $pr_total ) { push @items, - { total_item => $self->mt('Previous Balance'), + { total_item => $previous_charges_desc, total_amount => sprintf('%.2f',$pr_total) }; } $new_charges_desc = $self->mt( - $conf->config('previous_balance-exclude_from_total') + $conf->config('previous_balance-text-total_new_charges') || 'Total New Charges' - ); # localize 'Total New Charges' or whatever's in the config + ); $new_charges_amount = $self->charged;