1 package FS::part_event::Action::Mixin::fee;
4 use base qw( FS::part_event::Action );
6 sub event_stage { 'pre-bill'; }
10 'feepart' => { label => 'Fee definition',
11 type => 'select-table', #select-part_fee XXX
13 hashref => { disabled => '' },
14 name_col => 'itemdesc',
15 value_col => 'feepart',
21 sub default_weight { 10; }
24 my( $self, $cust_object, $cust_event ) = @_;
26 die "no fee definition selected for event '".$self->event."'\n"
27 unless $self->option('feepart');
29 # mark the event so that the fee will be charged
30 # the logic for calculating the fee amount is in FS::part_fee
31 # the logic for attaching it to the base invoice/line items is in
33 my $cust_event_fee = FS::cust_event_fee->new({
34 'eventnum' => $cust_event->eventnum,
35 'feepart' => $self->option('feepart'),
39 my $error = $cust_event_fee->insert;