diff --git a/htdocs/telephonie/script/facturation-calcul.php b/htdocs/telephonie/script/facturation-calcul.php
index ae39fc23434b4cadd6c4299abd7736848e35dfca..7dd08a878fd0bd6bd27acc1b244d55018dbe4e32 100644
--- a/htdocs/telephonie/script/facturation-calcul.php
+++ b/htdocs/telephonie/script/facturation-calcul.php
@@ -226,7 +226,7 @@ if (!$error)
 	  
 	  if (!$error)
 	    {
-	      if ($ligne->isfacturable == 1)
+	      if ($ligne->facturable == 1)
 		{
 		  $facturable = 'oui';
 		}
@@ -235,7 +235,7 @@ if (!$error)
 		  $facturable = 'non';
 		}
 	      
-	      $sql = "INSERT INTO llx_telephonie_facture";
+	      $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_facture";
 	      $sql .= " (fk_ligne, ligne, date, isfacturable, fk_batch)";
 	      $sql .= " VALUES (".$ligne->id.",";
 	      $sql .= " '$ligne->numero','".$year."-".$month."-01'";
@@ -243,7 +243,7 @@ if (!$error)
 	      
 	      if ($db->query($sql))
 		{
-		  $facid = $db->last_insert_id("llx_telephonie_facture");
+		  $facid = $db->last_insert_id(MAIN_DB_PREFIX."telephonie_facture");
 		}
 	      else
 		{