'Usage: Unrateable CDRs',
'Usage: Time worked',
#gone in 4.x as a distinct ACL (for now?) { rightname=>'Employees: Commission Report', global=>1 },
- { rightname=>'Employees: Audit Report', global=>1 },
+ { rightname=>'Employee Reports', global=>1 },
#{ rightname => 'List customers of all agents', global=>1 },
],
{ rightname=>'Employee preference telephony integration' },
#]
+ #'RT preference rights' => [
+ { rightname=>'RT activity notification' },
+ #]
+
],
###
},
{
+ 'key' => 'email-to-voice_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',
'description' => 'Ignore the time portion of next bill dates when billing, matching anything from 00:00:00 to 23:59:59 on the billing day.',
{
'key' => 'logout-timeout',
- 'section' => 'UI',
- 'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated. Used to automatically log users out of the backoffice after this many minutes. Set session timeouts in employee groups instead.',
'type' => 'text',
},
'Refund payment' => [ 'Refund credit card payment', 'Refund Echeck payment' ],
'Regular void' => [ 'Void payments' ],
'Unvoid' => [ 'Unvoid payments', 'Unvoid invoices' ],
+ 'Employees: Audit Report' => [ 'Employee Reports' ],
);
foreach my $oldright (keys %migrate) {
'Usage: Unrateable CDRs',
],
'Provision customer service' => [ 'Edit password' ],
- 'Financial reports' => [ 'Employees: Commission Report',
- 'Employees: Audit Report',
- ],
+ 'Financial reports' => 'Employee Reports',
'Change customer package' => 'Detach customer package',
'Services: Accounts' => 'Services: Cable Subscribers',
'Bulk change customer packages' => 'Bulk move customer services',
'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',
],
: '000000';
}
+=item agent_name
+
+=cut
+
+sub agent_name {
+ my $self = shift;
+ $self->cust_linked
+ ? $self->cust_main->agent_name
+ : $self->cust_unlinked_msg;
+}
+
=item prospect_sql
=item active_sql
sub email_search_result {
my($class, $param) = @_;
+ my $conf = FS::Conf->new;
+ my $send_to_domain = $conf->config('email-to-voice_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";
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