event refactor, landing on HEAD!
[freeside.git] / FS / FS / part_event / Condition / cust_pay_batch_declined.pm
1 package FS::part_event::Condition::cust_pay_batch_declined;
2
3 use strict;
4
5 use base qw( FS::part_event::Condition );
6
7 sub description {
8   'Batch payment declined';
9 }
10
11 sub eventtable_hashref {
12     { 'cust_main'      => 0,
13       'cust_bill'      => 0,
14       'cust_pkg'       => 0,
15       'cust_pay_batch' => 1,
16     };
17 }
18
19 #sub option_fields {
20 #  (
21 #    'field'         => 'description',
22 #
23 #    'another_field' => { 'label'=>'Amount', 'type'=>'money', },
24 #
25 #    'third_field'   => { 'label'         => 'Types',
26 #                         'type'          => 'checkbox-multiple',
27 #                         'options'       => [ 'h', 's' ],
28 #                         'option_labels' => { 'h' => 'Happy',
29 #                                              's' => 'Sad',
30 #                                            },
31 #  );
32 #}
33
34 sub condition {
35   my($self, $cust_pay_batch, %opt) = @_;
36
37   #my $cust_main = $self->cust_main($object);
38   #my $value_of_field = $self->option('field');
39   #my $time = $opt{'time'}; #use this instead of time or $^T
40
41   $cust_pay_batch->status =~ /Declined/i;
42
43 }
44
45 #sub condition_sql {
46 #  my( $class, $table ) = @_;
47 #  #...
48 #  'true';
49 #}
50
51 1;