{extends file="layout.html"} {block name=title}::: LMS :{$layout.pagetitle|striphtml} :::{/block} {block name=module_content} {* check DIRECTION *} {assign var="direction_check" value="{if $listdata.direction == "desc"}asc{else}desc{/if}"} {* check ORDER is set *} {function order_check category=''} {if $listdata.direction == "asc" && $listdata.order == $category},desc{/if} {/function}

{$layout.pagetitle}

{assign var="number_of_table_columns" value="11"} {if $pagination->getTotal() != 0} {/if} {cycle values="light,lucid" print=false} {section name=i loop=$billings start=(($page-1)*$pagelimit) max=$pagelimit} {sectionelse} {/section} {if $pagination->getTotal() != 0} {/if} {$sum = 0} {$call_time = 0} {$talk_time = 0} {foreach $billings as $b} {$sum = $sum + $b.price} {$call_time = $call_time + $b.callbegintime} {$call_talk = $call_talk + $b.callanswertime} {/foreach}
{trans("Begin time:")} {if $listdata.order == "begintime"} {/if} {trans("Customer:")} {if $listdata.order == "caller_name"} {/if} {trans("Customer:")} {if $listdata.order == "callee_name"} {/if} {trans("Caller:")} {if $listdata.order == "caller"} {/if} {trans("Callee:")} {if $listdata.order == "callee"} {/if} {trans("Call begin time:")} {if $listdata.order == "callbegintime"} {/if} {trans("Call answer time:")} {if $listdata.order == "callanswertime"} {/if} {trans("Connection type:")} {if $listdata.order == "type"} {/if} {trans("Status:")} {if $listdata.order == "status"} {/if} {trans("Price:")} {if $listdata.order == "price"} {/if} {t a=$total}Total: $a{/t}
{trans("Filter:")} {trans("Customer:")} {trans("Period")} {trans("from")}  {trans("to")}    {trans("Connection type:")} {trans("Status:")} »»»
{include file="pagination.html"}
{$billings[i].begintime|date_format:"%e %B %Y %H:%M:%S"} {if !empty($billings[i].callerownerid)} {$billings[i].caller_lastname|lower|ucfirst} {$billings[i].caller_name|ucfirst} {else} {trans("Customer from outside")} {/if} {trans("to")} {if !empty($billings[i].calleeownerid)} {$billings[i].callee_lastname|lower|ucfirst} {$billings[i].callee_name|ucfirst} {else} {trans("customer from outside")} {/if} {if !empty($billings[i].callerownerid)} {$billings[i].caller} {else} {$billings[i].caller} {/if} {if !empty($billings[i].calleeownerid)} {$billings[i].callee} {else} {$billings[i].callee} {/if} {$min_tmp = intval($billings[i].callbegintime / 60)} {$sec_tmp = $billings[i].callbegintime % 60} {if $min_tmp}{$min_tmp}min{/if} {if $sec_tmp}{$sec_tmp}s{/if} {$min_tmp = intval($billings[i].callanswertime / 60)} {$sec_tmp = $billings[i].callanswertime % 60} {if $min_tmp}{$min_tmp}min{/if} {if $sec_tmp}{$sec_tmp}s{/if} {if $billings[i].type == CALL_OUTGOING} {trans("outgoing")} {elseif $billings[i].type == CALL_INCOMING} {trans("incoming")} {/if} {if $billings[i].status == CALL_BUSY} {trans("busy")} {elseif $billings[i].status == CALL_ANSWERED} {trans("answered")} {elseif $billings[i].status == CALL_NO_ANSWER} {trans("no answer")} {elseif $billings[i].status == CALL_SERVER_FAILED} {trans("server error")} {/if} {$billings[i].price|money_format} {if $billings[i].callanswertime && ($billings[i].caller_flags || $billings[i].callee_flags)} {documentview id="{$billings[i].id}" type="audio/mp3" name="{trans("ID:")} {$billings[i].id}, {trans("Date:")} {$billings[i].begintime|date_format:"%e %B %Y %H:%M:%S"}" url="?m=voipcallrecording&id={$billings[i].id}" text=""} {/if} {trans(

{trans("No CDR records found in database.")}

{include file="pagination.html"}
{trans("Page total:")|lower}
{trans("all")}:
{gmdate("H:i:s", $call_time)}
{gmdate("H:i:s", $stats.totaltime)}
{gmdate("H:i:s", $call_talk)}
{gmdate("H:i:s", $stats.billedtime)}
{$sum|money_format}
{$stats.price|money_format}
{if $total}{$total}{else}0{/if}
{intval($stats.cnt)}
{/block}