diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2017-01-31 17:29:10 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-09-13 10:54:49 -0700 |
| commit | 2c0ab6236b187a39fbb6e2046180e2531a391333 (patch) | |
| tree | 3e502edbfa2d30e95373370bba8f09804461bd2e | |
| parent | 3c81d2e339059a81100d2009f97d59eabe4c9ef9 (diff) | |
add condition_sql optimization to "Package definitions" condition, RT#74456
| -rw-r--r-- | FS/FS/part_event/Condition/pkg_pkgpart.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/FS/FS/part_event/Condition/pkg_pkgpart.pm b/FS/FS/part_event/Condition/pkg_pkgpart.pm index 6adef8eb6..d5b5c8daa 100644 --- a/FS/FS/part_event/Condition/pkg_pkgpart.pm +++ b/FS/FS/part_event/Condition/pkg_pkgpart.pm @@ -25,15 +25,16 @@ sub option_fields { sub condition { my( $self, $cust_pkg) = @_; - #XXX test my $if_pkgpart = $self->option('if_pkgpart') || {}; $if_pkgpart->{ $cust_pkg->pkgpart }; } -#XXX -#sub condition_sql { -# -#} +sub condition_sql { + my( $self, $table ) = @_; + + 'cust_pkg.pkgpart IN '. + $self->condition_sql_option_option_integer('if_pkgpart'); +} 1; |
