1 package FS::part_event::Condition::payby;
7 use base qw( FS::part_event::Condition );
10 #'customer payment types: ';
11 'Customer payment type';
15 tie my %payby, 'Tie::IxHash', FS::payby->cust_payby2longname;
19 label => 'Customer payment type',
20 #type => 'select-multiple',
21 type => 'checkbox-multiple',
22 options => [ keys %payby ],
23 option_labels => \%payby,
29 my( $self, $object ) = @_;
31 my $cust_main = $self->cust_main($object);
33 #uuh.. all right? test this.
34 my $hashref = $self->option('payby') || {};
35 $hashref->{ $cust_main->payby };
40 # my( $self, $table ) = @_;
42 # #uuh... yeah... something like this. test it for sure.
44 # my @payby = keys %{ $self->option('payby') };
46 # ' ( '. join(' OR ', map { "cust_main.payby = '$_'" } @payby ). ' ) ';