silly 'use of unitialized value' errors
[freeside.git] / FS / bin / freeside-bill
index 8f2c32f..417df76 100755 (executable)
@@ -28,6 +28,9 @@ my($time)= $main::opt_d ? str2time($main::opt_d) : $^T;
 my($cust_main,%saw);
 foreach $cust_main (
   map {
+    unless ( exists $saw{ $_->custnum } && defined $saw{ $_->custnum} ) {
+      $saw{ $_->custnum } = 0; # to avoid 'use of uninitialized value' errors
+    }
     if (
       ( $main::opt_a || ( ( $_->getfield('bill') || 0 ) <= $time ) )
       && $bill_only{ $_->custnum }
@@ -45,7 +48,6 @@ foreach $cust_main (
   # and bill them
 
   print "Billing customer #" . $cust_main->getfield('custnum') . "\n";
-  next;
 
   my($error);
 
@@ -110,7 +112,7 @@ customers.  Otherwise, bills all customers.
 
 =head1 VERSION
 
-$Id: freeside-bill,v 1.1 1999-08-11 20:41:27 ivan Exp $
+$Id: freeside-bill,v 1.3 1999-10-04 08:23:26 ivan Exp $
 
 =head1 BUGS