I am making report system using asterisk cdr records and a2billing cc_call records.
I tried to join those calls using uniqueid field that exists in both tables and found a bug in a2billing.php
there is line :
Code:
if ($i>0) $A2B-> uniqueid=$A2B-> uniqueid+ 1000000000;
but uniqueid field is string not a float number and it gets distorted with this addition. Decimals are lost or zero at the end.
for example 1171468489.13458 , 1171472390.13698
Maybe code should use substring for this operation
Code:
if ($i>0)
{
$unique_rest = substr($A2B-> uniqueid,1);
$unique_num = substr($A2B-> uniqueid,0,1);
$unique_num++;
$A2B-> uniqueid = "$unique_num$unique_rest";
}
or something like this