X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition%2Fcust_pay_batch_declined.pm;fp=FS%2FFS%2Fpart_event%2FCondition%2Fcust_pay_batch_declined.pm;h=b3a8d705f80ba275603135adbd79b724438c48fd;hb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;hp=0000000000000000000000000000000000000000;hpb=32b5d3a31f112a381f0a15ac5e3a2204242f3405;p=freeside.git diff --git a/FS/FS/part_event/Condition/cust_pay_batch_declined.pm b/FS/FS/part_event/Condition/cust_pay_batch_declined.pm new file mode 100644 index 000000000..b3a8d705f --- /dev/null +++ b/FS/FS/part_event/Condition/cust_pay_batch_declined.pm @@ -0,0 +1,51 @@ +package FS::part_event::Condition::cust_pay_batch_declined; + +use strict; + +use base qw( FS::part_event::Condition ); + +sub description { + 'Batch payment declined'; +} + +sub eventtable_hashref { + { 'cust_main' => 0, + 'cust_bill' => 0, + 'cust_pkg' => 0, + 'cust_pay_batch' => 1, + }; +} + +#sub option_fields { +# ( +# 'field' => 'description', +# +# 'another_field' => { 'label'=>'Amount', 'type'=>'money', }, +# +# 'third_field' => { 'label' => 'Types', +# 'type' => 'checkbox-multiple', +# 'options' => [ 'h', 's' ], +# 'option_labels' => { 'h' => 'Happy', +# 's' => 'Sad', +# }, +# ); +#} + +sub condition { + my($self, $cust_pay_batch, %opt) = @_; + + #my $cust_main = $self->cust_main($object); + #my $value_of_field = $self->option('field'); + #my $time = $opt{'time'}; #use this instead of time or $^T + + $cust_pay_batch->status =~ /Declined/i; + +} + +#sub condition_sql { +# my( $class, $table ) = @_; +# #... +# 'true'; +#} + +1;