skycatcher modifications for pre-printing invoices, but with today's date
[freeside.git] / FS / bin / freeside-daily
index b9742c4..d5748d6 100755 (executable)
@@ -5,9 +5,8 @@ use Getopt::Std;
 use FS::UID qw(adminsuidsetup);
 
 &untaint_argv; #what it sounds like  (eww)
-#use vars qw($opt_d $opt_v $opt_p $opt_a $opt_s $opt_y);
 use vars qw(%opt);
-getopts("p:a:d:vsy:", \%opt);
+getopts("p:a:d:vsy:n", \%opt);
 
 my $user = shift or die &usage;
 adminsuidsetup $user;
@@ -15,6 +14,9 @@ adminsuidsetup $user;
 use FS::Cron::bill qw(bill);
 bill(%opt);
 
+use FS::Cron::notify qw(notify_flat_delay);
+notify_flat_delay(%opt);
+
 use FS::Cron::vacuum qw(vacuum);
 vacuum();
 
@@ -66,6 +68,10 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
       "pretend date" 15 days from whatever was specified by the -d switch
       (or now, if no -d switch was given).
 
+  -n: When used with "-d" and/or "-y", specifies that invoices should be dated
+      with today's date, irregardless of the pretend date used to pre-generate
+      the invoices.
+
   -p: Only process customers with the specified payby (I<CARD>, I<DCRD>, I<CHEK>, I<DCHK>, I<BILL>, I<COMP>, I<LECB>)
 
   -a: Only process customers with the specified agentnum