X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition.pm;h=9155a7d42ddbcf44cbf6bc5bd7be632a81c99dd7;hp=90b83853e59f02fd948337a36cc33222851e9768;hb=b286341305ba302c4a555aeef288f84c7141ccdd;hpb=e32e1a2357e42a596d12d814f06b8902d05240a1 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