use FS::part_event_option;
use FS::part_event_condition;
use FS::cust_event;
-use FS::agent;
$DEBUG = 0;
Returns the conditions associated with this event, as FS::part_event_condition
objects (see L<FS::part_event_condition>)
-=cut
-
-sub part_event_condition {
- my $self = shift;
- qsearch( 'part_event_condition', { 'eventpart' => $self->eventpart } );
-}
-
=item new_cust_event OBJECT, [ OPTION => VALUE ]
Creates a new customer event (see L<FS::cust_event>) for the provided object.
Returns the associated agent for this event, if any, as an FS::agent object.
-=cut
-
-sub agent {
- my $self = shift;
- qsearchs('agent', { 'agentnum' => $self->agentnum } );
-}
-
=item templatename
Returns the alternate invoice template name, if any, or false if there is
}
# this is the 'event' side
- my $join = FS::part_event_condition->join_conditions_sql( $eventtable );
+ my $join = FS::part_event_condition->join_conditions_sql( $eventtable,
+ 'time' => $time
+ );
my $where = FS::part_event_condition->where_conditions_sql( $eventtable,
'time' => $time
);
(
map { $_ => $actions{$_} }
sort { $actions{$a}->{'default_weight'}<=>$actions{$b}->{'default_weight'} }
+ # || $actions{$a}->{'description'} cmp $actions{$b}->{'description'} }
$class->all_actions( $eventtable )
);
$part_event->initialize;
}
+sub _upgrade_data { #class method
+ my ($class, %opts) = @_;
+
+ foreach my $part_event (
+ qsearch('part_event', { 'action' => 'cust_bill_realtime_card' }),
+ qsearch('part_event', { 'action' => 'cust_bill_realtime_check' }),
+ ) {
+
+ $part_event->action('realtime_auto');
+ my $error = $part_event->replace;
+ die $error if $error;
+
+ }
+
+}
+
=back
=head1 SEE ALSO