From 35f9c8a5ed701f9e9362d69084f2f334b8634a5c Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 21 Sep 2009 20:48:49 +0000 Subject: [PATCH] i think it is new Pg (or... new Record.pm???) that causes this problem... before it just returned nothing for the search instead of erroring out? --- FS/FS/cust_bill.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index f6c5eeb81..79f85c807 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1857,7 +1857,7 @@ sub print_generic { my( $self, %params ) = @_; my $today = $params{today} ? $params{today} : time; - warn "FS::cust_bill::print_generic called on $self with suffix $params{template}\n" + warn "$me print_generic called on $self with suffix $params{template}\n" if $DEBUG; my $format = $params{format}; @@ -2208,7 +2208,7 @@ sub print_generic { $invoice_data{'total_items'} = \@total_items; $invoice_data{'buf'} = \@buf; $invoice_data{'sections'} = \@sections; - + my $previous_section = { 'description' => 'Previous Charges', 'subtotal' => $other_money_char. sprintf('%.2f', $pr_total), @@ -2381,7 +2381,7 @@ sub print_generic { } } $invoice_data{'taxtotal'} = sprintf('%.2f', $taxtotal); - + push @buf,['','-----------']; push @buf,[( $conf->exists('disable_previous_balance') ? 'Total Charges' @@ -2456,7 +2456,7 @@ sub print_generic { foreach my $credit ( $self->_items_credits('trim_len'=>32) ) { push @buf, [ $credit->{'description'}, $money_char.$credit->{'amount'} ]; } - + # payments my $paymenttotal = 0; foreach my $payment ( $self->_items_payments ) { @@ -2965,8 +2965,6 @@ sub _items_cust_bill_pkg { my $type = $display->type; - my $cust_pkg = $cust_bill_pkg->cust_pkg; - my $desc = $cust_bill_pkg->desc; $desc = substr($desc, 0, 50). '...' if $format eq 'latex' && length($desc) > 50; @@ -2978,6 +2976,8 @@ sub _items_cust_bill_pkg { if ( $cust_bill_pkg->pkgnum > 0 ) { + my $cust_pkg = $cust_bill_pkg->cust_pkg; + if ( $cust_bill_pkg->setup != 0 && (!$type || $type eq 'S') ) { my $description = $desc; -- 2.11.0