diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-03-20 16:37:31 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-03-20 16:37:31 -0700 |
| commit | c6e2c0a41e2195ff3907c447eb52409b03d04273 (patch) | |
| tree | ec58c9121d7c6528e42028b798e23892767c2c7b | |
| parent | 41d528f2db67da268ba2a300f5fa9f57bb9ce96c (diff) | |
fix multiple services w/cust_bill_has_service condition, RT#17035
| -rw-r--r-- | FS/FS/part_event/Condition/cust_bill_has_service.pm | 11 |
1 files changed, 5 insertions, 6 deletions
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 61e32ce3d..65c996437 100644 --- a/FS/FS/part_event/Condition/cust_bill_has_service.pm +++ b/FS/FS/part_event/Condition/cust_bill_has_service.pm @@ -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,14 +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', + $opt{'driver_name'}, + ); my $sql = qq| 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; |
