+# the default start date; takes an FS::cust_main as an argument
+sub default_start_date {
+ my $self = shift;
+ my $cust_main = shift;
+ my $conf = FS::Conf->new;
+
+ if ( $self->delay_start ) {
+ my $delay = $self->delay_start;
+
+ my ($mday,$mon,$year) = (localtime(time))[3,4,5];
+ my $start_date = timelocal(0,0,0,$mday,$mon,$year) + 86400 * $delay;
+ return $start_date;
+
+ } elsif ( $conf->exists('order_pkg-no_start_date') ) {
+
+ return ''
+
+ } else {
+
+ return $cust_main->next_bill_date;
+
+ }
+}
+