From b6bf33ca202d92564afc770252bd8ac178b2bfe1 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 19 May 2005 08:24:04 +0000 Subject: [PATCH] =?UTF-8?q?Ne=20mets=20pas=20=E0=20jour=20la=20date=20de?= =?UTF-8?q?=20commande=20la=20deuxi=E8me=20fois?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/telephonie/lignetel.class.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index f7de1d790be..a24c8b3e29b 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -379,17 +379,23 @@ class LigneTel { { $sql = "UPDATE ".MAIN_DB_PREFIX."telephonie_societe_ligne"; $sql .= " SET statut = ".$statut ; - - if ($statut == 2) - { - $sql .= ", date_commande = now()"; - $sql .= ",fk_user_commande=".$user->id; - } - $sql .= " WHERE rowid =".$this->id; $this->db->query($sql); + + if ($statut == 2) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."telephonie_societe_ligne"; + $sql .= " SET statut = ".$statut ; + $sql .= ", date_commande = now()"; + $sql .= ", fk_user_commande=".$user->id; + $sql .= " WHERE rowid =".$this->id; + $sql .= " AND date_commande IS NULL"; + + $this->db->query($sql); + } + if ($datea) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_societe_ligne_statut";