event refactor, landing on HEAD!
[freeside.git] / FS / FS / part_event / Action / fee.pm
1 package FS::part_event::Action::fee;
2
3 use strict;
4 use base qw( FS::part_event::Action );
5
6 sub description {
7   'Late fee (flat)';
8 }
9
10 sub option_fields {
11   ( 
12     'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
13     'reason' => 'Reason',
14   );
15 };
16
17 sub default_weight {
18   10;
19 }
20
21 sub do_action {
22   my( $self, $cust_object ) = @_;
23
24   my $cust_main = $self->cust_main($cust_object);
25
26   my $error = $cust_main->charge( $self->option('charge'), $self->option('reason') );
27
28   die $error if $error;
29
30   '';
31 }
32
33 1;