X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition%2Fpayby.pm;h=16bf4800359e3f89a072a32b36b24cf8953e0aa1;hb=aeb90ade381fc3d5477db0334048c2af623fccfe;hp=d93156828073714d3852af81a15bdae13eb8ab6d;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/FS/FS/part_event/Condition/payby.pm b/FS/FS/part_event/Condition/payby.pm index d93156828..16bf48003 100644 --- a/FS/FS/part_event/Condition/payby.pm +++ b/FS/FS/part_event/Condition/payby.pm @@ -30,21 +30,15 @@ sub condition { my $cust_main = $self->cust_main($object); - #uuh.. all right? test this. my $hashref = $self->option('payby') || {}; $hashref->{ $cust_main->payby }; } -#sub condition_sql { -# my( $self, $table ) = @_; -# -# #uuh... yeah... something like this. test it for sure. -# -# my @payby = keys %{ $self->option('payby') }; -# -# ' ( '. join(' OR ', map { "cust_main.payby = '$_'" } @payby ). ' ) '; -# -#} +sub condition_sql { + my( $self, $table ) = @_; + + 'cust_main.payby IN '. $self->condition_sql_option_option('payby'); +} 1;