Ajout methode de showSample
This commit is contained in:
parent
9cdc9d0668
commit
04a87c3346
@ -35,6 +35,17 @@ class CdrFormatFructidor
|
||||
$this->datas = array();
|
||||
}
|
||||
|
||||
function showSample()
|
||||
{
|
||||
$sample = '
|
||||
0297500000;05/09/2006;12:50:34;33617000000;France-Mobile-SFR;5;0.0116
|
||||
0297500001;05/09/2006;12:58:45;33240000000;France national ;124;0.0256
|
||||
0297500000;27/09/2006;16:18:18;33625000000;France-Mobile-SFR;4;0.0093
|
||||
0297500000;27/09/2006;16:22:32;33240000000;France national ;14;0.0029';
|
||||
|
||||
return $sample;
|
||||
}
|
||||
|
||||
function ReadFile($file)
|
||||
{
|
||||
dolibarr_syslog("CdrFormatFructidor::ReadFile($file)", LOG_DEBUG);
|
||||
@ -53,19 +64,19 @@ class CdrFormatFructidor
|
||||
$tabline = explode(";", $cont);
|
||||
if (sizeof($tabline) == 7)
|
||||
{
|
||||
$this->datas[$i]['index'] = $line;
|
||||
$this->datas[$i]['ligne'] = ereg_replace('"','',$tabline[1]);
|
||||
$this->datas[$i]['date'] = $tabline[1];
|
||||
$this->datas[$i]['heure'] = $tabline[2];
|
||||
$this->datas[$i]['numero'] = ereg_replace('"','',$tabline[3]);
|
||||
|
||||
$this->datas[$i]['montant'] = trim($tabline[6]);
|
||||
$this->datas[$i]['duree'] = trim($tabline[5]);
|
||||
$this->datas[$i]['index'] = $i;
|
||||
$this->datas[$i]['ligne'] = ereg_replace('"','',$tabline[0]);
|
||||
$this->datas[$i]['date'] = $tabline[1];
|
||||
$this->datas[$i]['heure'] = $tabline[2];
|
||||
$this->datas[$i]['numero'] = ereg_replace('"','',$tabline[3]);
|
||||
$this->datas[$i]['tarif'] = trim($tabline[4]);
|
||||
$this->datas[$i]['duree'] = trim($tabline[5]);
|
||||
$this->datas[$i]['montant'] = trim($tabline[6]);
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_syslog("CdrFormatFructidor::ReadFile Mauvais format de fichier ligne $line");
|
||||
dolibarr_syslog("CdrFormatFructidor::ReadFile Mauvais format de fichier ligne $line", LOG_ERR);
|
||||
}
|
||||
}
|
||||
$line++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user