From fed350a1aa758b095ca220a798939733b774dcc5 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 27 Jul 2017 12:30:25 -0400 Subject: RT# 74537 - added check for config option selfservice-ACH_info_readonly to deletepayby method --- FS/FS/ClientAPI/MyAccount.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'FS') diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 2b4d52d8f..5c86b7820 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1748,8 +1748,13 @@ sub delete_payby { }) or return { 'error' => 'unknown custpaybynum '. $p->{'custpaybynum'} }; - return { 'error' => $cust_payby->delete }; - + my $conf = new FS::Conf; + if (($cust_payby->payby eq "DCHK" || $cust_payby->payby eq "CHEK") && $conf->exists('selfservice-ACH_info_readonly')) { + return { 'error' => "Sorry you do not have permission to delete bank information." }; + } + else { + return { 'error' => $cust_payby->delete }; + } } sub cancel { -- cgit v1.2.1 From 810e6898f2cc89911edd5a56e90ddb202867c92a Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 27 Jul 2017 12:53:59 -0400 Subject: RT# 76905 - Created ability to delete payment account thru NG selfservice to test API change in ticket 74537 --- FS/FS/ClientAPI/MyAccount.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'FS') diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 5c86b7820..99c5f742b 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -152,6 +152,7 @@ sub skin_info { personal.php Profile personal.php Personal Information + payment_accounts.php Payment Accounts password.php Change Password payment.php Payments -- cgit v1.2.1 From 09a43bd0984104796052ceee7fdae0581612535d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 31 Jul 2017 09:24:50 -0400 Subject: RT# 73490 - added global configuration to check if RT activity alert should be displayed. --- FS/FS/Conf.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d41cc741b..a0b9a9cde 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5304,6 +5304,13 @@ and customer address. Include units.', 'type' => 'checkbox', }, + { + 'key' => 'rt-hide_activity_notification', + 'section' => 'ticketing', + 'description' => 'Hide the notification box when there is activity on tickets', + 'type' => 'checkbox', + }, + { 'key' => 'pkg-balances', 'section' => 'packages', -- cgit v1.2.1 From 1043f465a4c6a1ab94df2e22823a2a688e102bcd Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 10:33:45 -0400 Subject: RT# 75595 - Add billing event condition that will trigger when the contract end date is coming up --- FS/FS/part_event/Condition/pkg_contract_date.pm | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 FS/FS/part_event/Condition/pkg_contract_date.pm (limited to 'FS') diff --git a/FS/FS/part_event/Condition/pkg_contract_date.pm b/FS/FS/part_event/Condition/pkg_contract_date.pm new file mode 100644 index 000000000..2bf791aba --- /dev/null +++ b/FS/FS/part_event/Condition/pkg_contract_date.pm @@ -0,0 +1,38 @@ +package FS::part_event::Condition::pkg_contract_date; +use base qw( FS::part_event::Condition ); + +use strict; + +sub description { + 'Package contract date nearing'; +} + +sub eventtable_hashref { + { 'cust_main' => 1, + 'cust_bill' => 1, + 'cust_pkg' => 1, + 'cust_pay' => 1, + 'cust_pay_batch' => 1, + 'cust_statement' => 1, + }; +} + +sub option_fields { + my $class = shift; + ( + 'within' => { 'label' => 'Package contract date with in', + 'type' => 'freq', + }, + ); +} + +sub condition { + my( $self, $cust_pkg, %opt ) = @_; + + my $contract_end_date = $cust_pkg->contract_end ? $cust_pkg->contract_end : 0; + my $contract_within_time = $self->option_age_from('within', $contract_end_date ); + + $opt{'time'} >= $contract_within_time and $contract_within_time > 0; +} + +1; \ No newline at end of file -- cgit v1.2.1 From 5665dc8243598e7ca6567719b6e91efcfbbea209 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 13:53:42 -0400 Subject: RT # 73490 - removed global conf and user pref check for hide tickets and added group access control. --- FS/FS/AccessRight.pm | 4 ++++ FS/FS/Conf.pm | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'FS') diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 9649e5e0c..6b2dc4a7b 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -362,6 +362,10 @@ tie my %rights, 'Tie::IxHash', { rightname=>'Employee preference telephony integration' }, #] + #'RT preference rights' => [ + { rightname=>'not an RT' }, + #] + ], ### diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index a0b9a9cde..d41cc741b 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5304,13 +5304,6 @@ and customer address. Include units.', 'type' => 'checkbox', }, - { - 'key' => 'rt-hide_activity_notification', - 'section' => 'ticketing', - 'description' => 'Hide the notification box when there is activity on tickets', - 'type' => 'checkbox', - }, - { 'key' => 'pkg-balances', 'section' => 'packages', -- cgit v1.2.1 From cbd61e030fc33f1b858aa874fc25e138d797b4f7 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 1 Aug 2017 15:08:57 -0400 Subject: RT# 75817 - fixed enable selection to send password reset and to allow you to set password in one step --- FS/FS/cust_contact.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FS') diff --git a/FS/FS/cust_contact.pm b/FS/FS/cust_contact.pm index 6820ac4b4..118a9e000 100644 --- a/FS/FS/cust_contact.pm +++ b/FS/FS/cust_contact.pm @@ -106,7 +106,7 @@ and replace methods. sub check { my $self = shift; - if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P') { + if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'E' || $self->selfservice_access eq 'P') { $self->selfservice_access('Y'); $self->_resend('Y'); } -- cgit v1.2.1 From 1dd01d7a9cf72afc02daf5071f2dbbda199191ed Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 2 Aug 2017 11:44:08 -0400 Subject: RT# 73490 - updated group access right with better name, and set one time migration to update all groups. --- FS/FS/AccessRight.pm | 2 +- FS/FS/access_right.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'FS') diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 6b2dc4a7b..161e466a2 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -363,7 +363,7 @@ tie my %rights, 'Tie::IxHash', #] #'RT preference rights' => [ - { rightname=>'not an RT' }, + { rightname=>'RT activity notification' }, #] ], diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm index 29c91b00f..409b44136 100644 --- a/FS/FS/access_right.pm +++ b/FS/FS/access_right.pm @@ -253,6 +253,7 @@ sub _upgrade_data { # class method 'Generate quotation' => 'Disable quotation', 'Add on-the-fly void credit reason' => 'Add on-the-fly void reason', '_ALL' => 'Employee preference telephony integration', + '_ALL' => 'RT activity notification', 'Edit customer package dates' => [ 'Change package start date', #4.x 'Change package contract end date', ], -- cgit v1.2.1 From cd6a235b511326103b31cb4453b4c90fffbcddbf Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 2 Aug 2017 13:42:17 -0400 Subject: RT# 74537 - removed link to list payment accounts page in ng_selfservice --- FS/FS/ClientAPI/MyAccount.pm | 1 - 1 file changed, 1 deletion(-) (limited to 'FS') diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 99c5f742b..5c86b7820 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -152,7 +152,6 @@ sub skin_info { personal.php Profile personal.php Personal Information - payment_accounts.php Payment Accounts password.php Change Password payment.php Payments -- cgit v1.2.1 From a9e3c2ea4635e066f1aabcac4a91ee75cdf22ebd Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 3 Aug 2017 15:18:35 -0400 Subject: RT# 75595 - made it only available for cust_pkg --- FS/FS/part_event/Condition/pkg_contract_date.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'FS') diff --git a/FS/FS/part_event/Condition/pkg_contract_date.pm b/FS/FS/part_event/Condition/pkg_contract_date.pm index 2bf791aba..9cb75f60d 100644 --- a/FS/FS/part_event/Condition/pkg_contract_date.pm +++ b/FS/FS/part_event/Condition/pkg_contract_date.pm @@ -8,12 +8,8 @@ sub description { } sub eventtable_hashref { - { 'cust_main' => 1, - 'cust_bill' => 1, + { 'cust_pkg' => 1, - 'cust_pay' => 1, - 'cust_pay_batch' => 1, - 'cust_statement' => 1, }; } -- cgit v1.2.1 From b6c5d35cc215c18d3fb1d9aeb0239a610eb68c32 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 7 Aug 2017 16:21:09 -0400 Subject: RT# 76992 - Added 3 new import formats that combine Location and Phone Service --- FS/FS/cust_pkg/Import.pm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_pkg/Import.pm b/FS/FS/cust_pkg/Import.pm index 63a9909e5..27fced195 100644 --- a/FS/FS/cust_pkg/Import.pm +++ b/FS/FS/cust_pkg/Import.pm @@ -283,17 +283,23 @@ sub batch_import { }; } - my $formatfields = _formatfields(); + #probably can delete below - moved to line 292 + #my $formatfields = _formatfields(); - die "unknown format $format" unless $formatfields->{$format}; + my @formats = split /-/, $format; + foreach my $f (@formats){ - foreach my $field ( @{ $formatfields->{$format} } ) { + my $formatfields = _formatfields(); + die "unknown format $format" unless $formatfields->{$f}; - push @fields, sub { - my( $self, $value, $conf, $param ) = @_; - $param->{"$format.$field"} = $value; - }; + foreach my $field ( @{ $formatfields->{$f} } ) { + push @fields, sub { + my( $self, $value, $conf, $param ) = @_; + $param->{"$f.$field"} = $value; + }; + + } } $opt->{'fields'} = \@fields; -- cgit v1.2.1 From d7dd43d69c648433cd34f26a339465452082a097 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 7 Aug 2017 17:47:50 -0400 Subject: RT# 76992 - removed some development code --- FS/FS/cust_pkg/Import.pm | 3 --- 1 file changed, 3 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_pkg/Import.pm b/FS/FS/cust_pkg/Import.pm index 27fced195..96c6272b7 100644 --- a/FS/FS/cust_pkg/Import.pm +++ b/FS/FS/cust_pkg/Import.pm @@ -283,9 +283,6 @@ sub batch_import { }; } - #probably can delete below - moved to line 292 - #my $formatfields = _formatfields(); - my @formats = split /-/, $format; foreach my $f (@formats){ -- cgit v1.2.1 From 7d80f005462758e0271215240cdf99a9336f03dd 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. --- FS/FS/Conf.pm | 8 +++ FS/FS/cust_main_Mixin.pm | 11 +++ FS/FS/part_event/Action/notice_to_emailtovoice.pm | 84 +++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 FS/FS/part_event/Action/notice_to_emailtovoice.pm (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d41cc741b..02e65f5aa 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -897,6 +897,14 @@ my $validate_email = sub { $_[0] =~ 'per_agent' => 1, }, + { + 'key' => 'send-to-domain', + 'section' => 'email_to_voice_services', + 'description' => 'The Domain to send email to voice to', + 'type' => 'text', + 'per_agent' => 1, + }, + { 'key' => 'next-bill-ignore-time', 'section' => 'billing', diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index 195574627..5f9a3d6a2 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -397,14 +397,21 @@ use Digest::SHA qw(sha1); # for duplicate checking sub email_search_result { my($class, $param) = @_; + my $conf = FS::Conf->new; + my $send_to_domain = $conf->config('send-to-domain'); + my $msgnum = $param->{msgnum}; my $from = delete $param->{from}; my $subject = delete $param->{subject}; my $html_body = delete $param->{html_body}; my $text_body = delete $param->{text_body}; my $to_contact_classnum = delete $param->{to_contact_classnum}; + my $emailtovoice_name = delete $param->{emailtovoice_contact}; + my $error = ''; + my $to = $emailtovoice_name . '@' . $send_to_domain unless !$emailtovoice_name; + my $job = delete $param->{'job'} or die "email_search_result must run from the job queue.\n"; @@ -465,10 +472,14 @@ sub email_search_result { next; # unlinked object; nothing else we can do } +my %to = {}; +if ($to) { $to{'to'} = $to; } + my $cust_msg = $msg_template->prepare( 'cust_main' => $cust_main, 'object' => $obj, 'to_contact_classnum' => $to_contact_classnum, + %to, ); # For non-cust_main searches, we avoid duplicates based on message diff --git a/FS/FS/part_event/Action/notice_to_emailtovoice.pm b/FS/FS/part_event/Action/notice_to_emailtovoice.pm new file mode 100644 index 000000000..ae766e81b --- /dev/null +++ b/FS/FS/part_event/Action/notice_to_emailtovoice.pm @@ -0,0 +1,84 @@ +package FS::part_event::Action::notice_to_emailtovoice; + +use strict; +use base qw( FS::part_event::Action ); +use FS::Record qw( qsearchs ); +use FS::msg_template; +use FS::Conf; + +sub description { 'Email a email to voice notice'; } + +sub eventtable_hashref { + { + 'cust_main' => 1, + 'cust_bill' => 1, + 'cust_pkg' => 1, + 'cust_pay' => 1, + 'cust_pay_batch' => 1, + 'cust_statement' => 1, + 'svc_acct' => 1, + }; +} + +sub option_fields { + + #my $conf = new FS::Conf; + #my $to_domain = $conf->config('send-to-domain'); + +( + 'to_name' => { 'label' => 'Address To', + 'type' => 'select', + 'options' => [ 'mobile', 'fax', 'daytime' ], + 'option_labels' => { 'mobile' => 'Mobile Phone #', + 'fax' => 'Fax #', + 'daytime' => 'Day Time #', + }, + 'post_field_label' => "@" , #. $to_domain , + }, + + 'msgnum' => { 'label' => 'Template', + 'type' => 'select-table', + 'table' => 'msg_template', + 'name_col' => 'msgname', + 'hashref' => { disabled => '' }, + 'disable_empty' => 1, + }, + ); + +} + +sub default_weight { 56; } #? + +sub do_action { + my( $self, $object ) = @_; + + my $conf = new FS::Conf; + my $to_domain = $conf->config('send-to-domain') + or die "Can't send notice with out send-to-domain, being set in global config \n"; + + my $cust_main = $self->cust_main($object); + + my $msgnum = $self->option('msgnum'); + my $name = $self->option('to_name'); + + my $msg_template = qsearchs('msg_template', { 'msgnum' => $msgnum } ) + or die "Template $msgnum not found"; + + my $to_name = $cust_main->$name + or die "Can't send notice with out " . $cust_main->$name . " number set"; + + ## remove - from phone number + $to_name =~ s/-//g; + + #my $to = $to_name . '@' . $self->option('to_domain'); + my $to = $to_name . '@' . $to_domain; + + $msg_template->send( + 'to' => $to, + 'cust_main' => $cust_main, + 'object' => $object, + ); + +} + +1; -- cgit v1.2.1 From 05de6d688077b77b7da5bc8ae238871f354459a9 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 21 Aug 2017 11:42:36 -0400 Subject: RT# 27969 - created 3 new api functions to add, edit and list advertising sources --- FS/FS/API.pm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) (limited to 'FS') diff --git a/FS/FS/API.pm b/FS/FS/API.pm index fd3793d4f..735088f5a 100644 --- a/FS/FS/API.pm +++ b/FS/FS/API.pm @@ -719,7 +719,63 @@ sub bill_now { } -#next.. Advertising sources? +#next.. Delete Advertising sources? + +sub list_advertising_sources { + my( $class, %opt ) = @_; + return _shared_secret_error() unless _check_shared_secret($opt{secret}); + + my @sources = qsearch('part_referral', {}, '', "") + or return { 'error' => 'No referrals' }; + + my $return = { + 'sources' => [ map $_->hashref, @sources ], + }; + + $return; +} + +sub add_advertising_source { + my( $class, %opt ) = @_; + return _shared_secret_error() unless _check_shared_secret($opt{secret}); + + use FS::part_referral; + + my $new_source = $opt{source}; + + my $source = new FS::part_referral $new_source; + + my $error = $source->insert; + + my $return = {$source->hash}; + $return = { 'error' => $error, } if $error; + + $return; +} + +sub edit_advertising_source { + my( $class, %opt ) = @_; + return _shared_secret_error() unless _check_shared_secret($opt{secret}); + + use FS::part_referral; + + my $refnum = $opt{refnum}; + my $source = $opt{source}; + + my $old = FS::Record::qsearchs('part_referral', {'refnum' => $refnum,}); + my $new = new FS::part_referral { $old->hash }; + + foreach my $key (keys %$source) { + $new->$key($source->{$key}); + } + + my $error = $new->replace; + + my $return = {$new->hash}; + $return = { 'error' => $error, } if $error; + + $return; +} ## -- cgit v1.2.1 From 543ea7d6be3bdf58b30eee5e1363eff737bc58cb Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 21 Aug 2017 12:40:42 -0400 Subject: RT# 27969 - added documentation for advertising_sources api functions --- FS/FS/API.pm | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) (limited to 'FS') diff --git a/FS/FS/API.pm b/FS/FS/API.pm index 735088f5a..f9cc37ea6 100644 --- a/FS/FS/API.pm +++ b/FS/FS/API.pm @@ -721,6 +721,34 @@ sub bill_now { #next.. Delete Advertising sources? +=item list_advertising_sources OPTION => VALUE, ... + +Lists all advertising sources. + +=over + +=item secret + +API Secret + +=back + +Example: + + my $result = FS::API->list_advertising_sources( + 'secret' => 'sharingiscaring', + ); + + if ( $result->{'error'} ) { + die $result->{'error'}; + } else { + # list advertising sources returns an array of hashes for sources. + print Dumper($result->{'sources'}); + } + +=cut + +#list_advertising_sources sub list_advertising_sources { my( $class, %opt ) = @_; return _shared_secret_error() unless _check_shared_secret($opt{secret}); @@ -735,6 +763,56 @@ sub list_advertising_sources { $return; } +=item add_advertising_source OPTION => VALUE, ... + +Add a new advertising source. + +=over + +=item secret + +API Secret + +=item referral + +Referral name + +=item disabled + +Referral disabled, Y for disabled or nothing for enabled + +=item agentnum + +Agent ID number + +=item title + +External referral ID + +=back + +Example: + + my $result = FS::API->add_advertising_source( + 'secret' => 'sharingiscaring', + 'referral' => 'test referral', + + #optional + 'disabled' => 'Y', + 'agentnum' => '2', #agent id number + 'title' => 'test title', + ); + + if ( $result->{'error'} ) { + die $result->{'error'}; + } else { + # add_advertising_source returns new source upon success. + print Dumper($result); + } + +=cut + +#add_advertising_source sub add_advertising_source { my( $class, %opt ) = @_; return _shared_secret_error() unless _check_shared_secret($opt{secret}); @@ -753,6 +831,70 @@ sub add_advertising_source { $return; } +=item edit_advertising_source OPTION => VALUE, ... + +Edit a advertising source. + +=over + +=item secret + +API Secret + +=item refnum + +Referral number to edit + +=item source + +hash of edited source fields. + +=over + +=item referral + +Referral name + +=item disabled + +Referral disabled, Y for disabled or nothing for enabled + +=item agentnum + +Agent ID number + +=item title + +External referral ID + +=back + +=back + +Example: + + my $result = FS::API->edit_advertising_source( + 'secret' => 'sharingiscaring', + 'refnum' => '4', # referral number to edit + 'source' => { + #optional + 'referral' => 'test referral', + 'disabled' => 'Y', + 'agentnum' => '2', #agent id number + 'title' => 'test title', + } + ); + + if ( $result->{'error'} ) { + die $result->{'error'}; + } else { + # edit_advertising_source returns updated source upon success. + print Dumper($result); + } + +=cut + +#edit_advertising_source sub edit_advertising_source { my( $class, %opt ) = @_; return _shared_secret_error() unless _check_shared_secret($opt{secret}); -- cgit v1.2.1 From 2dca91166a0fe163a51741b37edc812c7a32b9a9 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 22 Aug 2017 10:36:04 -0400 Subject: RT# 73964 - Changed global config send-to-domain to email-to-voice_domain --- FS/FS/Conf.pm | 2 +- FS/FS/cust_main_Mixin.pm | 2 +- FS/FS/part_event/Action/notice_to_emailtovoice.pm | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 02e65f5aa..bddeee932 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -898,7 +898,7 @@ my $validate_email = sub { $_[0] =~ }, { - 'key' => 'send-to-domain', + 'key' => 'email-to-voice_domain', 'section' => 'email_to_voice_services', 'description' => 'The Domain to send email to voice to', 'type' => 'text', diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index 5f9a3d6a2..1ef5387c1 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -398,7 +398,7 @@ sub email_search_result { my($class, $param) = @_; my $conf = FS::Conf->new; - my $send_to_domain = $conf->config('send-to-domain'); + my $send_to_domain = $conf->config('email-to-voice_domain'); my $msgnum = $param->{msgnum}; my $from = delete $param->{from}; diff --git a/FS/FS/part_event/Action/notice_to_emailtovoice.pm b/FS/FS/part_event/Action/notice_to_emailtovoice.pm index ae766e81b..a3a5e9824 100644 --- a/FS/FS/part_event/Action/notice_to_emailtovoice.pm +++ b/FS/FS/part_event/Action/notice_to_emailtovoice.pm @@ -23,7 +23,7 @@ sub eventtable_hashref { sub option_fields { #my $conf = new FS::Conf; - #my $to_domain = $conf->config('send-to-domain'); + #my $to_domain = $conf->config('email-to-voice_domain'); ( 'to_name' => { 'label' => 'Address To', @@ -33,7 +33,7 @@ sub option_fields { 'fax' => 'Fax #', 'daytime' => 'Day Time #', }, - 'post_field_label' => "@" , #. $to_domain , + 'post_field_label' => "@", # . $to_domain , }, 'msgnum' => { 'label' => 'Template', @@ -53,7 +53,7 @@ sub do_action { my( $self, $object ) = @_; my $conf = new FS::Conf; - my $to_domain = $conf->config('send-to-domain') + my $to_domain = $conf->config('email-to-voice_domain') or die "Can't send notice with out send-to-domain, being set in global config \n"; my $cust_main = $self->cust_main($object); -- cgit v1.2.1