summaryrefslogtreecommitdiff
path: root/eg/part_event-Action-template.pm
blob: c2f5ba58f5835fd6d057cab8c79b80772edb5fbd (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package FS::part_event::Action::myaction;

use strict;

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

# see the FS::part_event::Action manpage for full documentation on each
# of the required and optional methods.

sub description {
  'New action (the author forgot to change this description)';
}

#sub eventtable_hashref {
#    { 'cust_main' => 1,
#      'cust_bill' => 1,
#      'cust_pkg'  => 1,
#    };
#}

#sub option_fields {
#  (
#    'field'         => 'description',
#
#    'another_field' => { 'label'=>'Amount', 'type'=>'money', },
#
#    'third_field'   => { 'label'         => 'Types',
#                         'type'          => 'select',
#                         'options'       => [ 'h', 's' ],
#                         'option_labels' => { 'h' => 'Happy',
#                                              's' => 'Sad',
#                                            },
#  );
#}

#sub default_weight {
#  100;
#}


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

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

  my $value_of_field = $self->option('field');

  #do your action
  
  #die "Error: $error";
  return 'Null example action completed sucessfully.';

}

1;