summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action/fee.pm
blob: 3cf50fbca14205e195f0c1448e769f0779ca4480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package FS::part_event::Action::fee;

use strict;
use base qw( FS::part_event::Action );

sub description { 'Late fee (flat)'; }

sub option_fields {
  ( 
    'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
    'reason' => 'Reason',
  );
}

sub default_weight { 10; }

sub do_action {
  my( $self, $cust_object ) = @_;

  my $cust_main = $self->cust_main($cust_object);

  my $error = $cust_main->charge( $self->option('charge'), $self->option('reason') );

  die $error if $error;

  '';
}

1;