cust_pay_batch
cust_bill_pay_batch
cust_bill_pkg
+ cust_bill_batch
)) {
foreach my $linked ( $self->$table() ) {
}
+=item cust_bill_batch
+
+Returns all invoice batch records (L<FS::cust_bill_batch>) for this invoice.
+
+=cut
+
+sub cust_bill_batch {
+ my $self = shift;
+ qsearch('cust_bill_batch', { 'invnum' => $self->invnum });
+}
+
=item tax
Returns the tax amount (see L<FS::cust_bill_pkg>) for this invoice.
'description' => 'Usage by Account Code',
'post_total' => '',
'summarized' => '',
- 'total_generator' => sub { '' },
'header' => '',
};
my @lines;
ext_description => [],
};
+ $section->{'amount'} += $amount;
$accountcodes{$accountcode}{'amount'} += $amount;
$accountcodes{$accountcode}{calls}++;
$accountcodes{$accountcode}{duration} += $detail->duration;
push @lines, $l;
}
- return ($section,\@lines);
+ my @sorted_lines = sort { $a->{'description'} <=> $b->{'description'} } @lines;
+
+ return ($section,\@sorted_lines);
}
sub _items_svc_phone_sections {