X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=2755be0ae3948746c1bf7562a46d724dd283af63;hp=802e2bfbde839dd3126d6a7fa1a69784abefd63b;hb=8cf1905a8e2473e5e03f2fdf9cfb017b14bbd0de;hpb=ce4c49bc935f2df34381d13089fc1c61291742c9 diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 802e2bfbd..2755be0ae 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -720,14 +720,16 @@ L and L for conversion functions. =cut +#still some false laziness w/print_text sub print_text { my( $self, $today, $template ) = @_; $today ||= time; + # my $invnum = $self->invnum; - my $cust_main = qsearchs('cust_main', { 'custnum', $self->custnum } ); + my $cust_main = $self->cust_main; $cust_main->payname( $cust_main->first. ' '. $cust_main->getfield('last') ) - unless $cust_main->payname && $cust_main->payby ne 'CHEK'; + unless $cust_main->payname && $cust_main->payby !~ /^(CHEK|DCHK)$/; my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance # my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits @@ -967,7 +969,7 @@ sub print_latex { # my $invnum = $self->invnum; my $cust_main = $self->cust_main; $cust_main->payname( $cust_main->first. ' '. $cust_main->getfield('last') ) - unless $cust_main->payname && $cust_main->payby ne 'CHEK'; + unless $cust_main->payname && $cust_main->payby !~ /^(CHEK|DCHK)$/; my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance # my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits