1 package FS::part_event::Condition::has_cust_payby_auto;
6 use FS::Record qw(qsearch);
8 use base qw( FS::part_event::Condition );
11 'Customer has automatic payment information';
14 tie my %payby, 'Tie::IxHash', FS::payby->cust_payby2shortname;
15 delete $payby{'DCRD'};
16 delete $payby{'DCHK'};
21 label => 'Has automatic payment info',
23 options => [ keys %payby ],
24 option_labels => \%payby,
30 my( $self, $object ) = @_;
32 my $cust_main = $self->cust_main($object);
35 'table' => 'cust_payby',
36 'hashref' => { 'custnum' => $cust_main->custnum,
37 'payby' => $self->option('payby')
39 'order_by' => 'LIMIT 1',