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);
30 'amount' => $self->option('charge'),
31 'pkg' => $self->option('reason'),
32 'taxclass' => $self->option('taxclass'),
33 'setuptax' => $self->option('setuptax'),
36 $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away?
37 if $self->option('nextbill');
39 my $error = $cust_main->charge( \%charge );