summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-08-11 23:56:52 +0000
committerivan <ivan>2004-08-11 23:56:52 +0000
commit8cf1905a8e2473e5e03f2fdf9cfb017b14bbd0de (patch)
tree935ea9f5df24bcf2351abef99696a709cde107d8
parentce4c49bc935f2df34381d13089fc1c61291742c9 (diff)
fix bank name showing up on invoices
-rw-r--r--FS/FS/cust_bill.pm8
1 files changed, 5 insertions, 3 deletions
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<Time::Local> and L<Date::Parse> 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