diff --git a/htdocs/telephonie/contrat/liste.php b/htdocs/telephonie/contrat/liste.php
index 1b7fb227925..6d08f722ef3 100644
--- a/htdocs/telephonie/contrat/liste.php
+++ b/htdocs/telephonie/contrat/liste.php
@@ -146,7 +146,7 @@ if ($result)
print "
| ";
- print '';
+ print '';
print img_file();
print ' ';
diff --git a/htdocs/telephonie/fournisseur/pre.inc.php b/htdocs/telephonie/fournisseur/pre.inc.php
index 0a1ab8edc03..8e15a5adc3c 100644
--- a/htdocs/telephonie/fournisseur/pre.inc.php
+++ b/htdocs/telephonie/fournisseur/pre.inc.php
@@ -36,9 +36,6 @@ function llxHeader($head = "", $title="") {
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie");
- $menu->add(DOL_URL_ROOT."/telephonie/simulation/fiche.php", "Simulation");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/simulation/fiche.php?action=create", "Nouvelle");
-
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
$menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients");
diff --git a/htdocs/telephonie/fournisseurtel.class.php b/htdocs/telephonie/fournisseurtel.class.php
index 1c3e64222a1..3324698245e 100644
--- a/htdocs/telephonie/fournisseurtel.class.php
+++ b/htdocs/telephonie/fournisseurtel.class.php
@@ -29,6 +29,7 @@ class FournisseurTelephonie {
{
$this->db = $DB;
$this->id = $id;
+ $this->classdir = DOL_DOCUMENT_ROOT.'/telephonie/fournisseur/commande/';
return 1;
}
/**
@@ -130,9 +131,7 @@ class FournisseurTelephonie {
{
clearstatcache();
- $dir = DOL_DOCUMENT_ROOT.'/telephonie/fournisseur/commande/';
-
- $handle=opendir($dir);
+ $handle=opendir($this->classdir);
$arr = array();
@@ -141,12 +140,12 @@ class FournisseurTelephonie {
dolibarr_syslog($file);
- if (is_readable($dir.$file) && substr($file, 0, 8) == 'commande' && substr($file, -10) == '.class.php')
+ if (is_readable($this->classdir.$file) && substr($file, 0, 8) == 'commande' && substr($file, -10) == '.class.php')
{
$name = substr($file, 9, strlen($file) -19);
- $filebis = $dir . $file;
+ $filebis = $this->classdir . $file;
// Chargement de la classe de numérotation
$classname = "CommandeMethode".ucfirst($name);
@@ -161,5 +160,30 @@ class FournisseurTelephonie {
}
return $arr;
}
+ /**
+ *
+ *
+ *
+ *
+ */
+ function CreateCommande($user)
+ {
+ dolibarr_syslog("FournisseurTelephonie::CreateCommande User:$user->id");
+
+ $fileclass = $this->classdir.'commande.'.$this->class_commande.'.class.php';
+
+ require_once($fileclass);
+
+ $classname = "CommandeMethode".ucfirst($this->class_commande);
+
+ dolibarr_syslog("FournisseurTelephonie::CreateCommande user $classname");
+
+ $ct = new $classname($this->db, $user, $this);
+
+ $result = $ct->create();
+
+ return $result;
+ }
+
}
?>
|