diff options
author | Mark Wells <mark@freeside.biz> | 2016-01-08 17:03:46 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-01-08 17:04:04 -0800 |
commit | 571291dda91dd92db80660aa3d67333b0c88fc34 (patch) | |
tree | e2a2d75bca09be9d6e887d49675a7992d73c85d4 /httemplate | |
parent | c47980a8d9e1b83a80232674a57a875e319f9643 (diff) |
reconcile invoice destination contacts with multiple-customer contacts, #25536 and #27943
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/REST/1.0/cust_main | 4 | ||||
-rw-r--r-- | httemplate/edit/cust_main/name.html | 2 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 2 | ||||
-rw-r--r-- | httemplate/elements/contact.html | 4 | ||||
-rw-r--r-- | httemplate/view/cust_main/contacts_new.html | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/httemplate/REST/1.0/cust_main b/httemplate/REST/1.0/cust_main index 5401195fc..a8b1511d9 100644 --- a/httemplate/REST/1.0/cust_main +++ b/httemplate/REST/1.0/cust_main @@ -51,7 +51,7 @@ if ( $r->method eq 'GET' ) { JOIN contact USING (contactnum) JOIN contact_email USING (contactnum) WHERE cust_main.custnum = cust_contact.custnum - AND contact.invoice_dest = 'Y' + AND cust_contact.invoice_dest = 'Y' AND contact_email.emailaddress = $dest ) "; @@ -62,7 +62,7 @@ if ( $r->method eq 'GET' ) { JOIN contact USING (contactnum) JOIN contact_email USING (contactnum) WHERE cust_main.custnum = cust_contact.custnum - AND contact.invoice_dest = 'Y' + AND cust_contact.invoice_dest = 'Y' AND contact_email.emailaddress ILIKE $dest ) "; diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index 12d9d7405..20258897d 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -37,7 +37,7 @@ : 'label' %>">Email address(es)</SPAN> </TH> <TD> - <INPUT TYPE="text" NAME="invoice_email" ID="invoice_email_input" + <INPUT TYPE="text" NAME="invoice_email" ID="invoice_email_input" SIZE=40 VALUE="<% $cust_main->invoicing_list_emailonly_scalar %>"> </TD> </TR> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 747de201a..d590fdef0 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -165,7 +165,7 @@ if ( $cgi->param('residential_commercial') eq 'Residential' ) { $error = 'Email address required'; } - $options{'invoicing_list'} = [ $email ]; + $options{'invoicing_list'} = [ split(/\s*,\s*/, $email) ]; # XXX really should include the phone numbers in here also } else { diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index ab14dfbe8..3fbcc0518 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -40,7 +40,9 @@ % } % } elsif ( $field eq 'emailaddress' ) { % $value = join(', ', map $_->emailaddress, $contact->contact_email); -% } elsif ( $field eq 'selfservice_access' || $field eq 'comment' ) { +% } elsif ( $field eq 'selfservice_access' +% or $field eq 'comment' +% or $field eq 'invoice_dest' ) { % $value = $X_contact->get($field); % } else { % $value = $contact->get($field); diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index a0dd30125..94488670d 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -31,7 +31,7 @@ % my @contact_email = $contact->contact_email; <%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD> - <%$td%><% $contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %></TD> + <%$td%><% $cust_contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %></TD> <%$td%> % if ( $cust_contact->selfservice_access ) { Enabled |