From: ivan Date: Fri, 5 Aug 2011 03:27:15 +0000 (+0000) Subject: fix billday condition without a delay option causing the event to never run, RT#13915 X-Git-Tag: freeside_2_3_1~356 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=ac62d1f855e6c6de100872c81956fbbf092fcb88;hp=faef4c382220dcda940e41b575aecee358d1e0c8;p=freeside.git fix billday condition without a delay option causing the event to never run, RT#13915 --- 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