summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-01-27 21:21:59 -0600
committerMitch Jackson <mitch@freeside.biz>2018-09-25 22:36:05 -0400
commit774a522ebf772f28ccf3b19f531e2424c62fcc0f (patch)
treec53970489aaab8f04f58a3d20945642f5fad0371 /FS/FS
parent4af1201514d154f0f76c35085d6a9f33d85ecfdc (diff)
RT# 73421 Add allow messages flag message_dest to contact_email
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/Schema.pm3
-rw-r--r--FS/FS/contact.pm7
-rw-r--r--FS/FS/cust_contact.pm7
3 files changed, 11 insertions, 6 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 08eae6a..873c67e 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1764,7 +1764,8 @@ sub tables_hashref {
'classnum', 'int', 'NULL', '', '', '',
'comment', 'varchar', 'NULL', 255, '', '',
'selfservice_access', 'char', 'NULL', 1, '', '',
- 'invoice_dest', 'char', 'NULL', 1, '', '',
+ 'invoice_dest', 'char', 'NULL', 1, '', '', # Y or NULL
+ 'message_dest', 'char', 'NULL', 1, '', '', # Y or NULL
],
'primary_key' => 'custcontactnum',
'unique' => [ [ 'custnum', 'contactnum' ], ],
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index fc06ca8..9505dee 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -155,7 +155,7 @@ sub insert {
$self->custnum('');
my %link_hash = ();
- for (qw( classnum comment selfservice_access invoice_dest )) {
+ for (qw( classnum comment selfservice_access invoice_dest message_dest)) {
$link_hash{$_} = $self->get($_);
$self->$_('');
}
@@ -437,7 +437,7 @@ sub replace {
$self->custnum('');
my %link_hash = ();
- for (qw( classnum comment selfservice_access invoice_dest )) {
+ for (qw( classnum comment selfservice_access invoice_dest message_dest )) {
$link_hash{$_} = $self->get($_);
$self->$_('');
}
@@ -968,7 +968,7 @@ sub cgi_contact_fields {
my @contact_fields = qw(
classnum first last title comment emailaddress selfservice_access
- invoice_dest password
+ invoice_dest message_dest password
);
push @contact_fields, 'phonetypenum'. $_->phonetypenum
@@ -1041,4 +1041,3 @@ L<FS::Record>, schema.html from the base documentation.
=cut
1;
-
diff --git a/FS/FS/cust_contact.pm b/FS/FS/cust_contact.pm
index 118a9e0..adad46e 100644
--- a/FS/FS/cust_contact.pm
+++ b/FS/FS/cust_contact.pm
@@ -59,6 +59,11 @@ empty or Y
'Y' if the customer should get invoices sent to this address, null if not
+=item message_dest
+
+'Y' if contact should get non-invoice email messages sent to this address,
+NULL if not
+
=back
=head1 METHODS
@@ -119,6 +124,7 @@ sub check {
|| $self->ut_textn('comment')
|| $self->ut_enum('selfservice_access', [ '', 'Y' ])
|| $self->ut_flag('invoice_dest')
+ || $self->ut_flag('message_dest')
;
return $error if $error;
@@ -148,4 +154,3 @@ L<FS::contact>, L<FS::cust_main>, L<FS::Record>
=cut
1;
-