projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generische Unterstützung für CTI: Click-to-dial
[kivitendo-erp.git]
/
bin
/
mozilla
/
ct.pl
diff --git
a/bin/mozilla/ct.pl
b/bin/mozilla/ct.pl
index
0793a44
..
b5b83c1
100644
(file)
--- a/
bin/mozilla/ct.pl
+++ b/
bin/mozilla/ct.pl
@@
-48,6
+48,7
@@
use POSIX qw(strftime);
use SL::CT;
use POSIX qw(strftime);
use SL::CT;
+use SL::CTI;
use SL::CVar;
use SL::Request qw(flatten);
use SL::DB::Business;
use SL::CVar;
use SL::Request qw(flatten);
use SL::DB::Business;
@@
-268,6
+269,11
@@
sub list_names {
my $column = $ref->{formtype} eq 'invoice' ? 'invnumber' : $ref->{formtype} eq 'order' ? 'ordnumber' : 'quonumber';
$row->{$column}->{data} = $ref->{$column};
my $column = $ref->{formtype} eq 'invoice' ? 'invnumber' : $ref->{formtype} eq 'order' ? 'ordnumber' : 'quonumber';
$row->{$column}->{data} = $ref->{$column};
+ if (my $number = SL::CTI->sanitize_number(number => $ref->{phone})) {
+ $row->{phone}->{link} = SL::CTI->call_link(number => $number);
+ $row->{phone}->{link_class} = 'cti_call_action';
+ }
+
$report->add_data($row);
}
$report->add_data($row);
}
@@
-392,6
+398,13
@@
sub list_contacts {
$row->{$_}->{link} = 'mailto:' . E($ref->{$_}) if $ref->{$_};
}
$row->{$_}->{link} = 'mailto:' . E($ref->{$_}) if $ref->{$_};
}
+ for (qw(cp_phone1 cp_phone2 cp_mobile1)) {
+ next unless my $number = SL::CTI->sanitize_number(number => $ref->{$_});
+
+ $row->{$_}->{link} = SL::CTI->call_link(number => $number);
+ $row->{$_}->{link_class} = 'cti_call_action';
+ }
+
$report->add_data($row);
}
$report->add_data($row);
}