X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;fp=bin%2Fmozilla%2Fct.pl;h=b5b83c19f01d4d20e144546d695958d4de78f749;hb=53d80f2a01439ee73cf679c53326ec8fb32ab1ed;hp=0793a4459aac6627120b136d554db62dd4314e1a;hpb=1e987ead5875777bdc8517d27ca03a0e638bbe74;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 0793a4459..b5b83c19f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -48,6 +48,7 @@ use POSIX qw(strftime); use SL::CT; +use SL::CTI; 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}; + 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); } @@ -392,6 +398,13 @@ sub list_contacts { $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); }