3cf50fbca14205e195f0c1448e769f0779ca4480
[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 { 'Late fee (flat)'; }
7
8 sub option_fields {
9   ( 
10     'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
11     'reason' => 'Reason',
12   );
13 }
14
15 sub default_weight { 10; }
16
17 sub do_action {
18   my( $self, $cust_object ) = @_;
19
20   my $cust_main = $self->cust_main($cust_object);
21
22   my $error = $cust_main->charge( $self->option('charge'), $self->option('reason') );
23
24   die $error if $error;
25
26   '';
27 }
28
29 1;