projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 83075 - fixed sorting by referrals error
[freeside.git]
/
FS
/
FS
/
part_event_condition.pm
diff --git
a/FS/FS/part_event_condition.pm
b/FS/FS/part_event_condition.pm
index
b51c6b9
..
16f84fa
100644
(file)
--- a/
FS/FS/part_event_condition.pm
+++ b/
FS/FS/part_event_condition.pm
@@
-1,13
+1,11
@@
package FS::part_event_condition;
package FS::part_event_condition;
+use base qw( FS::option_Common );
use strict;
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::UID qw( dbh driver_name );
-use FS::Record qw( qsearch qsearchs );
-use FS::option_Common;
use FS::part_event; #for order_conditions_sql...
use FS::part_event; #for order_conditions_sql...
-@ISA = qw( FS::option_Common ); # FS::Record );
$DEBUG = 0;
@SKIP_CONDITION_SQL = ();
$DEBUG = 0;
@SKIP_CONDITION_SQL = ();
@@
-243,16
+241,17
@@
sub all_conditionnames {
keys %conditions
}
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<conditionname>". Typically used in conjunction with
Returns an SQL fragment selecting joining all condition options for an event as
tables titled "cond_I<conditionname>". Typically used in conjunction with
-B<where_conditions_sql>.
+B<where_conditions_sql>. OPTIONS should include 'time', the time to use
+in testing event conditions.
=cut
sub join_conditions_sql {
=cut
sub join_conditions_sql {
- my ( $class, $eventtable ) = @_;
+ my ( $class, $eventtable
, %options
) = @_;
join(' ',
map {
join(' ',
map {
@@
-261,7
+260,7
@@
sub join_conditions_sql {
" AND cond_$_.conditionname = ". dbh->quote($_).
" )";
}
" AND cond_$_.conditionname = ". dbh->quote($_).
" )";
}
- map $_->[0], $class->_where_conditions( $eventtable
) #
, %options )
+ map $_->[0], $class->_where_conditions( $eventtable, %options )
);
);