sub cust_bill_pkg {
my $self = shift;
- qsearch( 'cust_bill_pkg', { 'invnum' => $self->invnum } );
+ qsearch(
+ { 'table' => 'cust_bill_pkg',
+ 'hashref' => { 'invnum' => $self->invnum },
+ 'order_by' => 'ORDER BY billpkgnum',
+ }
+ );
}
=item cust_pkg
cid -
+unsquelch_cdr - overrides any per customer cdr squelching when true
+
=cut
sub print_generic {
$options{'section'} = $section if $multisection;
$options{'format'} = $format;
$options{'escape_function'} = $escape_function;
+ $options{'format_function'} = sub { () }
+ unless $params{unsquelch_cdr} || $cust_main->squelch_cdr ne 'Y';
foreach my $line_item ( $self->_items_pkg(%options) ) {
my $detail = {
)
);
if ( $multisection ) {
- $adjust_section->{'pretotal'} = 'New charges total '.
- $total->{'total_amount'};
+ $adjust_section->{'pretotal'} = 'New charges total '. $other_money_char.
+ sprintf('%.2f', $self->charged );
}else{
push @total_items, $total;
}
my $format = $opt{format} || '';
my $escape_function = $opt{escape_function} || sub { shift };
+ my $format_function = $opt{format_function} || '';
my @b = ();
foreach my $cust_bill_pkg ( @$cust_bill_pkg ) {
my %details_opt = ( 'format' => $format,
'escape_function' => $escape_function,
+ 'format_function' => $format_function,
);
if ( $cust_bill_pkg->pkgnum > 0 ) {
$cust_pkg->h_labels_short($self->_date);
#$cust_bill_pkg->edate,
#$cust_bill_pkg->sdate),
+ @d = () if $cust_bill_pkg->itemdesc;
push @d, $cust_bill_pkg->details(%details_opt);
push @b, {