253 |
} |
} |
254 |
|
|
255 |
$sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_facture"; |
$sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_facture"; |
256 |
$sql .= " (fk_ligne, ligne, date, isfacturable, fk_batch)"; |
$sql .= " (fk_ligne, ligne, date, isfacturable, fk_batch, fk_contrat)"; |
257 |
$sql .= " VALUES (".$ligne->id.","; |
$sql .= " VALUES (".$ligne->id.","; |
258 |
$sql .= " '$ligne->numero','".$year."-".$month."-01'"; |
$sql .= " '$ligne->numero','".$year."-".$month."-01'"; |
259 |
$sql .= ", '$facturable',".$batch_id.")"; |
$sql .= ", '$facturable',".$batch_id; |
260 |
|
$sql .= ", ".$ligne->contrat.")"; |
261 |
|
|
262 |
if ($db->query($sql)) |
if ($db->query($sql)) |
263 |
{ |
{ |