+ # Previous Charges section
+ # subtotal is the first return value from $self->previous
+ my $previous_section;
+ # if the invoice has major sections, or if we're summarizing previous
+ # charges with a single line, or if we've been specifically told to put them
+ # in a section, create a section for previous charges:
+ if ( $multisection or
+ $conf->exists('previous_balance-summary_only') or
+ $conf->exists('previous_balance-section') ) {
+
+ $previous_section = { 'description' => $self->mt('Previous Charges'),
+ 'subtotal' => $other_money_char.
+ sprintf('%.2f', $pr_total),
+ 'summarized' => '', #why? $summarypage ? 'Y' : '',
+ };
+ $previous_section->{posttotal} = '0 / 30 / 60 / 90 days overdue '.
+ join(' / ', map { $cust_main->balance_date_range(@$_) }
+ $self->_prior_month30s
+ )
+ if $conf->exists('invoice_include_aging');
+
+ } else {
+ # otherwise put them in the main section
+ $previous_section = $default_section;
+ }
+