diff options
author | ivan <ivan> | 2009-07-02 11:22:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-07-02 11:22:48 +0000 |
commit | 69678d308805f5ca4b171ea0c5ac1da957811aa0 (patch) | |
tree | df846cada38cb49897906248d36db5e68b5efd3b /httemplate/edit/cust_main/billing.html | |
parent | 8db53bcb53bbb32855c38f62afa4d1b39777cb7d (diff) |
settlement cdr processing, RT#5495
Diffstat (limited to 'httemplate/edit/cust_main/billing.html')
-rw-r--r-- | httemplate/edit/cust_main/billing.html | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 4c4be23c0..3f3d80176 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -477,10 +477,13 @@ my @payby = grep /\w/, $conf->config('payby'); @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) unless @payby; -#false laziness w/view/cust_main/billing.html -my $term_sql = "SELECT COUNT(*) FROM cust_pkg LEFT JOIN part_pkg USING ( pkgpart ) WHERE custnum = ? AND plan = 'cdr_termination' LIMIT 1"; -my $term_sth = dbh->prepare($term_sql) or die dbh->errstr; -$term_sth->execute($cust_main->custnum) or die $term_sth->errstr; -my $show_term = $term_sth->fetchrow_arrayref->[0]; +my $show_term = ''; +if ( $cust_main->custnum ) { + #false laziness w/view/cust_main/billing.html + my $term_sql = "SELECT COUNT(*) FROM cust_pkg LEFT JOIN part_pkg USING ( pkgpart ) WHERE custnum = ? AND plan = 'cdr_termination' LIMIT 1"; + my $term_sth = dbh->prepare($term_sql) or die dbh->errstr; + $term_sth->execute($cust_main->custnum) or die $term_sth->errstr; + $show_term = $term_sth->fetchrow_arrayref->[0]; +} </%init> |