summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Condition/agent.pm
blob: da428c15fbf1b56d9c971af57193d418f04c93b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package FS::part_event::Condition::agent;

use strict;

use base qw( FS::part_event::Condition );

# see the FS::part_event::Condition manpage for full documentation on each
# of the required and optional methods.

sub description {
  'Agent';
}

sub option_fields {
  (
    'agentnum'   => { label=>'Agent', type=>'select-agent', },
  );
}

sub condition {
  my($self, $object, %opt) = @_;

  my $cust_main = $self->cust_main($object);

  my $agentnum = $self->option('agentnum');

  $cust_main->agentnum == $agentnum;

}

#sub condition_sql {
#  my( $self, $table ) = @_;
#
#  'true';
#}

1;