1 package FS::part_event::Condition::has_cust_payby_auto;
2 use base qw( FS::part_event::Condition );
7 use FS::Record qw(qsearch);
10 'Customer has automatic payment information';
13 tie my %payby, 'Tie::IxHash', FS::payby->cust_payby2shortname;
14 delete $payby{'DCRD'};
15 delete $payby{'DCHK'};
20 label => 'Has automatic payment info',
22 options => [ keys %payby ],
23 option_labels => \%payby,
29 my( $self, $object ) = @_;
31 my $cust_main = $self->cust_main($object);
34 'table' => 'cust_payby',
35 'hashref' => { 'custnum' => $cust_main->custnum,
36 'payby' => $self->option('payby')
38 'order_by' => 'LIMIT 1',