X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fsubscription.pm;h=e03573b7bf26fa5e317b3a5b664997d9c862e8e8;hb=6cf964d0dc008621fb30fd2da28e2c44f29c6364;hp=4dc9252a79cc9d74ada68e4a2ad9d46972750fe1;hpb=b8cfd0780aa40bb07f3215bf9cb58011f5e32a35;p=freeside.git diff --git a/FS/FS/part_pkg/subscription.pm b/FS/FS/part_pkg/subscription.pm index 4dc9252a7..e03573b7b 100644 --- a/FS/FS/part_pkg/subscription.pm +++ b/FS/FS/part_pkg/subscription.pm @@ -6,30 +6,25 @@ use Time::Local qw(timelocal); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( - 'name' => 'First partial month full charge, then flat-rate (1st of month billing)', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee' ], - #'setup' => 'what.setup_fee.value', - #'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; $sdate = timelocal(0,0,0,1,$mon,$year); \' + what.recur_fee.value', - 'freq' => 'm', - 'weight' => 30, + 'name' => 'First partial month full charge, then flat-rate (1st of month billing)', + 'fields' => { + 'setup_fee' => { 'name' => 'Setup fee for this package', + 'default' => 0, + }, + 'recur_fee' => { 'name' => 'Recurring fee for this package', + 'default' => 0, + }, + }, + 'fieldorder' => [ 'setup_fee', 'recur_fee' ], + #'setup' => 'what.setup_fee.value', + #'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; $sdate = timelocal(0,0,0,1,$mon,$year); \' + what.recur_fee.value', + 'freq' => 'm', + 'weight' => 30, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg, $sdate ) = @_;