diff options
author | ivan <ivan> | 2011-08-05 03:27:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-08-05 03:27:14 +0000 |
commit | 81bf969e05f0154490a20b6522f496195e4fafc7 (patch) | |
tree | ea92b943dad5245ff425d18738fecc9e95b5c1ae | |
parent | 084c341bec705eb1ad1b315aa1b16fedf342766c (diff) |
fix billday condition without a delay option causing the event to never run, RT#13915
-rw-r--r-- | FS/FS/part_event/Condition.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/part_event/Condition.pm b/FS/FS/part_event/Condition.pm index efe0d3cf3..b62440750 100644 --- a/FS/FS/part_event/Condition.pm +++ b/FS/FS/part_event/Condition.pm @@ -469,7 +469,10 @@ sub condition_sql_option_integer { my $integer = ($driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER'; - 'CAST('. $class->condition_sql_option($option). " AS $integer )"; + 'CAST( + COALESCE('. $class->condition_sql_option($option). + " ,'0') ". + " AS $integer )"; } =head1 NEW CONDITION CLASSES |