diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-08-16 10:55:56 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2017-08-16 10:55:56 -0400 |
commit | 7d80f005462758e0271215240cdf99a9336f03dd (patch) | |
tree | 7eb83d75c14189d5232f3c96d6c4adaf281838ca /httemplate/elements | |
parent | d7dd43d69c648433cd34f26a339465452082a097 (diff) |
RT# 73964 - Added biling event action to send an email to phone nunber, and updated email a notice to customer to allow emailing to phone number for email_to_voice service.
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/select-cust_phone.html | 31 | ||||
-rw-r--r-- | httemplate/elements/select.html | 2 | ||||
-rw-r--r-- | httemplate/elements/tr-select-cust_phone.html | 12 |
3 files changed, 44 insertions, 1 deletions
diff --git a/httemplate/elements/select-cust_phone.html b/httemplate/elements/select-cust_phone.html new file mode 100644 index 0000000..94cd413 --- /dev/null +++ b/httemplate/elements/select-cust_phone.html @@ -0,0 +1,31 @@ +<SELECT NAME="<% $opt{'field_name'} %>" ID="<% $opt{'field_name'} %>"> + + <OPTION VALUE="" selected="selected">Select a phone number + +% foreach $p (@$phone_types) { + <OPTION VALUE="<% $phones_formatted{$p} %>"><% $p |h%> (<% $cust_phones->$p |h %>) +%} + +</SELECT> + +<%init> + +my %opt = @_; +my $cust_num = $opt{'cust_num'}; +my $phone_types = $opt{'phone_types'}; +my $format = $opt{'format'}; + +my $cust_phones = qsearchs('cust_main', { 'custnum' => $cust_num }) + or die 'unknown custnum' . $cust_num; + +my %phones_formatted = map { + $_ => format_phone_number($cust_phones->$_, $format) +} @$phone_types; + +sub format_phone_number { + my ($n, $f) = @_; + if ($f eq 'xxxxxxxxxx') { $n =~ s/-//g; } + return $n; +} + +</%init>
\ No newline at end of file diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html index 689566e..100df94 100644 --- a/httemplate/elements/select.html +++ b/httemplate/elements/select.html @@ -69,7 +69,7 @@ % % } -</SELECT> +</SELECT> <% $opt{'post_field_label'} %> % } <%init> diff --git a/httemplate/elements/tr-select-cust_phone.html b/httemplate/elements/tr-select-cust_phone.html new file mode 100644 index 0000000..cf88392 --- /dev/null +++ b/httemplate/elements/tr-select-cust_phone.html @@ -0,0 +1,12 @@ + <TR> + <TD ALIGN="right"><% $opt{'label'} || 'Customer Phones' %></TD> + <TD> + <% include( '/elements/select-cust_phone.html', %opt ) %> + </TD> + </TR> + +<%init> + +my %opt = @_; + +</%init> |