Skip to content

Commit

Permalink
0.7.8 rev 5109
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Sep 28, 2016
1 parent e967f8e commit 693bb72
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.8 rev 5108
0.7.8 rev 5109
26 changes: 15 additions & 11 deletions api/libs/api.exhorse.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,12 @@ protected function preprocessUkvData() {
}

if ($this->storeTmp['c_activeusers'] != 0) {
$this->storeTmp['c_arpau'] = round($this->storeTmp['c_totalmoney'] / $this->storeTmp['c_activeusers'], 2);
if (($this->complexFlag) AND ( $this->complexMasks)) {
$this->storeTmp['c_arpau'] = round($this->storeTmp['c_totalmoney'] / ($this->storeTmp['c_activeusers'] - $this->storeTmp['c_complex']), 2);
} else {
//no complex services enabled
$this->storeTmp['c_arpau'] = round($this->storeTmp['c_totalmoney'] / $this->storeTmp['c_activeusers'], 2);
}
}
}
}
Expand Down Expand Up @@ -608,7 +613,7 @@ protected function preprocessAskoziaData() {
$normalCalls = array();
$fields = array(
'extension_number' => 'all',
'cdr_filter' => 'incoming',
'cdr_filter' => 'incomingoutgoing',
'period_from' => $this->curmonth . '-01',
'period_to' => curdate(),
'date_format' => 'Y-m-d',
Expand Down Expand Up @@ -643,20 +648,19 @@ protected function preprocessAskoziaData() {

if (!empty($normalCalls)) {
unset($normalCalls[0]);
$this->storeTmp['a_totalcalls'] = sizeof($normalCalls);
foreach ($normalCalls as $io => $each) {
if (ispos($each[14], 'ANSWERED')) {
$this->storeTmp['a_totalanswered'] ++;
if ($each[16] != 'outbound') {
if (ispos($each[14], 'ANSWERED')) {
$this->storeTmp['a_totalanswered'] ++;
}
$this->storeTmp['a_totalcalls'] ++;
//call duration in seconds increment
$this->storeTmp['a_totalcallsduration']+=$each[13];
}

//call duration in seconds increment
$this->storeTmp['a_totalcallsduration']+=$each[13];
}

//average calls duration
$this->storeTmp['a_averagecallduration'] = $this->storeTmp['a_totalcallsduration'] / $this->storeTmp['a_totalanswered'];

// debarr($normalCalls);
}
}
}
Expand Down Expand Up @@ -1002,7 +1006,7 @@ public function renderReport() {
if ($this->askoziaFlag) {
$result.=wf_tag('h2') . __('AskoziaPBX integration') . wf_tag('h2', true);
$cells = wf_TableCell(__('Month'));
$cells.= wf_TableCell(__('Total calls'));
$cells.= wf_TableCell(__('Incoming calls'));
$cells.= wf_TableCell(__('Total answered'));
$cells.= wf_TableCell(__('No answer'));
$cells.= wf_TableCell(__('Total duration'));
Expand Down
2 changes: 1 addition & 1 deletion config/alter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,4 @@ UKV_ILLEGEL_TARIFFID=10
;UKV complex users tariff id
UKV_COMPLEX_TARIFFID=11
;UKV socail service tariff id
UKV_SOCIAL_TARIFFID=1
UKV_SOCIAL_TARIFFID=1
8 changes: 8 additions & 0 deletions config/globalmenu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,14 @@ CATEGORY=3
NEED_RIGHT=REPORTDSTAT
NEED_OPTION=

[exhorse]
NAME="Existential horse"
URL="?module=exhorse"
ICON="exhorse.png"
CATEGORY=3
NEED_RIGHT=EXHORSE
NEED_OPTION=EXHORSE_ENABLED

[jobreport]
NAME="Job report"
URL="?module=jobreport"
Expand Down
2 changes: 2 additions & 0 deletions languages/russian/billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,8 @@
$lang['def']['Answers percent'] = 'Процент ответов';
$lang['def']['DOCSIS Modems'] = 'DOCSIS модемы';
$lang['def']['right to use existential horse'] = 'Право использовать экзистенциального коня';
$lang['def']['Incoming calls'] = 'Входящих звонков';
$lang['def'][''] = '';
$lang['def'][''] = '';


Expand Down
1 change: 1 addition & 0 deletions languages/ukrainian/billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2270,5 +2270,6 @@
$lang['def']['Answers percent'] = 'Відсоток відповідей';
$lang['def']['DOCSIS Modems'] = 'DOCSIS модеми';
$lang['def']['right to use existential horse'] = 'Право використовувати екзистенціального коня';
$lang['def']['Incoming calls'] = 'Вхідних дзвінків';

?>
Binary file added skins/menuicons/exhorse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 693bb72

Please sign in to comment.