tyop
[freeside.git] / FS / bin / freeside-bill
index a251df4..680d29d 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 }
@@ -69,7 +72,9 @@ foreach $cust_main (
 
 sub untaint_argv {
   foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
-    $ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+    #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+    # Date::Parse
+    $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
     $ARGV[$_]=$1;
   }
 }
@@ -99,7 +104,7 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
   -i: real-time billing (as opposed to batch billing).  only relevant
       for credit cards.
 
-  -d: Pretent it's 'date'.  Date is in any format Date::Parse is happy with,
+  -d: Pretend it's 'date'.  Date is in any format Date::Parse is happy with,
       but be careful.
 
 user: From the mapsecrets file - see config.html from the base documentation
@@ -109,7 +114,7 @@ customers.  Otherwise, bills all customers.
 
 =head1 VERSION
 
-$Id: freeside-bill,v 1.2 1999-08-11 20:51:54 ivan Exp $
+$Id: freeside-bill,v 1.5 2000-06-22 10:52:37 ivan Exp $
 
 =head1 BUGS