X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCron%2Fbill.pm;h=d727d923d9c69cc4d82117b30c2b919dfe80c277;hb=1e34f4a5d142bd58f5918219db0931e81ad0418e;hp=1feba79484e16a14892769d047edd61138a7cb3c;hpb=1b8a2cc3b3697f3921e26a31691acfabacc1efd6;p=freeside.git diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 1feba7948..d727d923d 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -194,13 +194,14 @@ END my $where = FS::part_event_condition->where_conditions_sql( $eventtable, 'time'=>$time, ); + $where = $where ? "AND $where" : ''; my $are_part_event = "EXISTS ( SELECT 1 FROM part_event $join WHERE check_freq = '$check_freq' AND eventtable = '$eventtable' AND ( disabled = '' OR disabled IS NULL ) - AND $where + $where ) ";