From 91681d4c4832030a86e8565d7ec2c46c94eebc8d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 16 Aug 2017 10:55:56 -0400 Subject: 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. --- httemplate/elements/select-cust_phone.html | 31 +++++++++++++++++++++++++++ httemplate/elements/select.html | 2 +- httemplate/elements/tr-select-cust_phone.html | 12 +++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 httemplate/elements/select-cust_phone.html create mode 100644 httemplate/elements/tr-select-cust_phone.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/select-cust_phone.html b/httemplate/elements/select-cust_phone.html new file mode 100644 index 000000000..94cd41322 --- /dev/null +++ b/httemplate/elements/select-cust_phone.html @@ -0,0 +1,31 @@ + + +<%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; +} + + \ No newline at end of file diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html index 689566e36..100df94d0 100644 --- a/httemplate/elements/select.html +++ b/httemplate/elements/select.html @@ -69,7 +69,7 @@ % % } - + <% $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 000000000..cf88392b0 --- /dev/null +++ b/httemplate/elements/tr-select-cust_phone.html @@ -0,0 +1,12 @@ + + <% $opt{'label'} || 'Customer Phones' %> + + <% include( '/elements/select-cust_phone.html', %opt ) %> + + + +<%init> + +my %opt = @_; + + -- cgit v1.2.1