[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.11, 1.271.2.12
Ivan,,,
ivan at wavetail.420.am
Fri Jun 8 17:41:18 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv29674/FS/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_main.pm
Log Message:
skycatcher modifications for pre-printing invoices, but with today's date
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.11
retrieving revision 1.271.2.12
diff -u -d -r1.271.2.11 -r1.271.2.12
--- cust_main.pm 6 Jun 2007 20:02:33 -0000 1.271.2.11
+++ cust_main.pm 9 Jun 2007 00:41:15 -0000 1.271.2.12
@@ -1814,22 +1814,23 @@
Generates invoices (see L<FS::cust_bill>) for this customer. Usually used in
conjunction with the collect method.
-Options are passed as name-value pairs.
+If there is an error, returns the error, otherwise returns false.
-Currently available options are:
+Options are passed as name-value pairs. Currently available options are:
-resetup - if set true, re-charges setup fees.
+=over 4
-time - bills the customer as if it were that time. Specified as a UNIX
-timestamp; see L<perlfunc/"time">). Also see L<Time::Local> and
-L<Date::Parse> for conversion functions. For example:
+=item resetup - if set true, re-charges setup fees.
+
+=item time - bills the customer as if it were that time. Specified as a UNIX timestamp; see L<perlfunc/"time">). Also see L<Time::Local> and L<Date::Parse> for conversion functions. For example:
use Date::Parse;
...
$cust_main->bill( 'time' => str2time('April 20th, 2001') );
+=item invoice_time - used in conjunction with the I<time> option, this option specifies the date of for the generated invoices. Other calculations, such as whether or not to generate the invoice in the first place, are not affected.
-If there is an error, returns the error, otherwise returns false.
+=back
=cut
@@ -1862,7 +1863,7 @@
# no line items] and we're inside a transaciton so nothing else will see it)
my $cust_bill = new FS::cust_bill ( {
'custnum' => $self->custnum,
- '_date' => $time,
+ '_date' => ( $options{'invoice_time'} || $time ),
#'charged' => $charged,
'charged' => 0,
} );
More information about the freeside-commits
mailing list