1 package FS::part_pkg::base_delayed;
4 use vars qw(@ISA %info);
5 #use FS::Record qw(qsearch qsearchs);
6 use FS::part_pkg::base_rate;
8 @ISA = qw(FS::part_pkg::base_rate);
11 'name' => 'Free (or setup fee) for X days, then base rate'.
12 ' (anniversary billing)',
14 'setup_fee' => { 'name' => 'Setup fee for this package',
17 'free_days' => { 'name' => 'Initial free days',
20 'recur_fee' => { 'name' => 'Recurring base fee for this package',
23 'recur_notify' => { 'name' => 'Number of days before recurring billing'.
24 'commences to notify customer. (0 means '.
28 'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
29 ' of service at cancellation',
33 'fieldorder' => [ 'free_days', 'setup_fee', 'recur_fee', 'recur_notify',
36 #'setup' => '\'my $d = $cust_pkg->bill || $time; $d += 86400 * \' + what.free_days.value + \'; $cust_pkg->bill($d); $cust_pkg_mod_flag=1; \' + what.setup_fee.value',
37 #'recur' => 'what.recur_fee.value',
42 my($self, $cust_pkg, $time ) = @_;
44 my $d = $cust_pkg->bill || $time;
45 $d += 86400 * $self->option('free_days');
48 $self->option('setup_fee');