1 package FS::part_event::Action::fee;
4 use base qw( FS::part_event::Action );
6 sub description { 'Late fee (flat)'; }
8 sub event_stage { 'pre-bill'; }
12 'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
14 'taxclass' => { label=>'Tax class', type=>'select-taxclass', },
15 'nextbill' => { label=>'Hold late fee until next invoice',
16 type=>'checkbox', value=>'Y' },
17 'setuptax' => { label=>'Late fee is tax exempt',
18 type=>'checkbox', value=>'Y' },
22 sub default_weight { 10; }
25 my( $self, $cust_object ) = @_;
27 my $cust_main = $self->cust_main($cust_object);
29 my $conf = new FS::Conf;
32 'amount' => $self->option('charge'),
33 'pkg' => $self->option('reason'),
34 'taxclass' => $self->option('taxclass'),
35 'classnum' => scalar($conf->config('finance_pkgclass')),
36 'setuptax' => $self->option('setuptax'),
39 $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away?
40 if $self->option('nextbill');
42 my $error = $cust_main->charge( \%charge );