X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition%2Fcust_bill_has_service.pm;h=898b08d10ccc7fcdb37b175705bd1e0dae95423b;hp=80c47cf52585cd22b7a8d21bf29214f585618769;hb=aeb90ade381fc3d5477db0334048c2af623fccfe;hpb=77c039757aa4733b1498bdfe25ab287f60698c72 diff --git a/FS/FS/part_event/Condition/cust_bill_has_service.pm b/FS/FS/part_event/Condition/cust_bill_has_service.pm index 80c47cf52..898b08d10 100644 --- a/FS/FS/part_event/Condition/cust_bill_has_service.pm +++ b/FS/FS/part_event/Condition/cust_bill_has_service.pm @@ -6,7 +6,7 @@ use FS::cust_bill; use base qw( FS::part_event::Condition ); sub description { - 'Invoice is billing for certain service definitions'; + 'Invoice is billing for (any of) certain service definitions'; } sub eventtable_hashref { @@ -16,9 +16,6 @@ sub eventtable_hashref { }; } -# could not find component for path '/elements/tr-select-part_svc.html' -# sub disabled { 1; } - sub option_fields { ( 'has_service' => { 'label' => 'Has service', @@ -44,16 +41,16 @@ sub condition { sub condition_sql { my( $class, $table, %opt ) = @_; - my $servicenum = - $class->condition_sql_option_option('has_service'); + my $servicenums = + $class->condition_sql_option_option_integer('has_service'); - my $sql = qq| 0 < ( SELECT COUNT(cs.svcpart) + my $sql = " 0 < ( SELECT COUNT(cs.svcpart) FROM cust_bill_pkg cbp, cust_svc cs WHERE cbp.invnum = cust_bill.invnum AND cs.pkgnum = cbp.pkgnum - AND cs.svcpart IN $servicenum + AND cs.svcpart IN $servicenums ) - |; + "; return $sql; }