summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Condition/message_email.pm
blob: 7cceba697c8568563fc2dc937df84b807096a821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package FS::part_event::Condition::message_email;
use base qw( FS::part_event::Condition );
use strict;

sub description {
  'Customer allows email notices'
}

sub condition {
  my( $self, $object ) = @_;
  my $cust_main = $self->cust_main($object);

  $cust_main->message_noemail ? 0 : 1;
}

sub condition_sql {
  my( $self, $table ) = @_;

  "cust_main.message_noemail IS NULL"
}

1;