X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_event_condition.pm;h=16f84fa77899cc3b6ad393c73b38e50b75dc4312;hp=b51c6b901dae024e34b74da3d2c50c7cbe2fbadd;hb=ffa18709ee8a4d05e18d2d406cf73afe79e52524;hpb=0576052155894acbda02aac05e136ed030b5707f diff --git a/FS/FS/part_event_condition.pm b/FS/FS/part_event_condition.pm index b51c6b901..16f84fa77 100644 --- a/FS/FS/part_event_condition.pm +++ b/FS/FS/part_event_condition.pm @@ -1,13 +1,11 @@ package FS::part_event_condition; +use base qw( FS::option_Common ); use strict; -use vars qw( @ISA $DEBUG @SKIP_CONDITION_SQL ); +use vars qw( $DEBUG @SKIP_CONDITION_SQL ); use FS::UID qw( dbh driver_name ); -use FS::Record qw( qsearch qsearchs ); -use FS::option_Common; use FS::part_event; #for order_conditions_sql... -@ISA = qw( FS::option_Common ); # FS::Record ); $DEBUG = 0; @SKIP_CONDITION_SQL = (); @@ -243,16 +241,17 @@ sub all_conditionnames { keys %conditions } -=item join_conditions_sql [ EVENTTABLE ] +=item join_conditions_sql [ EVENTTABLE [, OPTIONS ] ] Returns an SQL fragment selecting joining all condition options for an event as tables titled "cond_I". Typically used in conjunction with -B. +B. OPTIONS should include 'time', the time to use +in testing event conditions. =cut sub join_conditions_sql { - my ( $class, $eventtable ) = @_; + my ( $class, $eventtable, %options ) = @_; join(' ', map { @@ -261,7 +260,7 @@ sub join_conditions_sql { " AND cond_$_.conditionname = ". dbh->quote($_). " )"; } - map $_->[0], $class->_where_conditions( $eventtable ) #, %options ) + map $_->[0], $class->_where_conditions( $eventtable, %options ) );