fix phone_sqlradius CDR population?, RT#4100
[freeside.git] / FS / FS / cust_bill.pm
index 45a73cc..c36023d 100644 (file)
@@ -1689,8 +1689,8 @@ sub print_generic {
 
   my $cust_main = $self->cust_main;
   $cust_main->payname( $cust_main->first. ' '. $cust_main->getfield('last') )
-    unless $cust_main->payname && $cust_main->payby !~ /^(CHEK|DCHK)$/;
-
+    unless $cust_main->payname
+        && $cust_main->payby !~ /^(CARD|DCRD|CHEK|DCHK)$/;
 
   my %delimiters = ( 'latex'    => [ '[@--', '--@]' ],
                      'html'     => [ '<%=', '%>' ],
@@ -1894,6 +1894,7 @@ sub print_generic {
     'city'            => &$escape_function($cust_main->city),
     'state'           => &$escape_function($cust_main->state),
     'zip'             => &$escape_function($cust_main->zip),
+    'fax'             => &$escape_function($cust_main->fax),
     'returnaddress'   => $returnaddress,
     #'quantity'        => 1,
     'terms'           => $self->terms,
@@ -2833,7 +2834,7 @@ sub _items_cust_bill_pkg {
             unit_amount     => sprintf("%.2f", $cust_bill_pkg->unitrecur),
             quantity        => $cust_bill_pkg->quantity,
             ext_description => \@d,
-          };
+          } unless ( $type eq 'U' && ! $amount );
 
         }