X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition.pm;h=9155a7d42ddbcf44cbf6bc5bd7be632a81c99dd7;hb=b286341305ba302c4a555aeef288f84c7141ccdd;hp=90b83853e59f02fd948337a36cc33222851e9768;hpb=71863412e2d2fd3c48c9c1220e6bf49122db270b;p=freeside.git diff --git a/FS/FS/part_event/Condition.pm b/FS/FS/part_event/Condition.pm index 90b83853e..9155a7d42 100644 --- a/FS/FS/part_event/Condition.pm +++ b/FS/FS/part_event/Condition.pm @@ -457,6 +457,18 @@ sub age2seconds_sql { } +=item condition_sql_option_integer + +As I, but cast the option value to an integer so that +comparison to other integers is type-correct. + +=cut + +sub condition_sql_option_integer { + my ($class, $option) = @_; + 'CAST ('.$class->condition_sql_option($option).' AS INTEGER)'; +} + =head1 NEW CONDITION CLASSES A module should be added in FS/FS/part_event/Condition/ which implements the