Beispiel #1
0
 if (!$quiet) {
     print sizeof($forwarded) . "\n";
 }
 if (!$quiet) {
     print "Download internal : ";
 }
 sleep(3);
 $internal = HiperusActions::Getbilling($from, $to, null, null, false, null, 'internal');
 if (!$quiet) {
     print sizeof($internal) . "\n";
 }
 if (!$quiet) {
     print "Download vpbx : ";
 }
 sleep(3);
 $vpbx = HiperusActions::Getbilling($from, $to, null, null, false, null, 'vpbx');
 if (!$quiet) {
     print sizeof($vpbx) . "\n";
 }
 sleep(5);
 $bill = array_merge($incoming, $outgoing, $disa, $forwarded, $internal, $vpbx);
 $ter = array();
 $DB->BeginTrans();
 for ($i = 0; $i < sizeof($bill); $i++) {
     if (!isset($ter[$bill[$i]['id_terminal_in']])) {
         $cusid = $DB->GetOne('SELECT customerid FROM hv_terminal WHERE id = ? LIMIT 1;', array($bill[$i]['id_terminal_in']));
         $ter[$bill[$i]['id_terminal_in']] = $cusid ? $cusid : NULL;
     }
     $bill[$i]['customerid'] = $ter[$bill[$i]['id_terminal_in']];
     if (!$DB->GetOne('SELECT 1 FROM hv_billing WHERE id = ? LIMIT 1;', array($bill[$i]['id']))) {
         $DB->Execute('INSERT INTO hv_billing (id,customerid,rel_cause,start_time,start_time_unix,customer_name,terminal_name,ext_billing_id,caller,bill_cpb,duration,calltype,
Beispiel #2
0
 function AllImportBilling($from = NULL, $to = NULL)
 {
     $lista = HiperusActions::Getbilling($from, $to);
     return $lista;
 }
Beispiel #3
0
 function AllImportBilling($from = NULL, $to = NULL, $offset = NULL, $limit = NULL, $success = false, $idcustomer = NULL, $calltype = NULL)
 {
     $lista = HiperusActions::Getbilling($from, $to, $offset, $limit, $success, $idcustomer, $calltype);
     return $lista;
 }