From 13c4a108a7f3ecf11eba6fd9103bcb2c018ec8b0 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 9 Nov 2005 16:03:08 +0000 Subject: [PATCH] Ajout date_last_commande --- htdocs/telephonie/lignetel.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index c841ae71b0b..edadecdf64d 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -508,6 +508,7 @@ class LigneTel { { $sql = "UPDATE ".MAIN_DB_PREFIX."telephonie_societe_ligne"; $sql .= " SET date_commande = now()"; + $sql .= ", date_commande_last = now()"; $sql .= ", fk_user_commande=".$user->id; $sql .= " WHERE rowid =".$this->id; $sql .= " AND date_commande IS NULL"; @@ -518,6 +519,18 @@ class LigneTel { } $this->db->query($sql); + + $sql = "UPDATE ".MAIN_DB_PREFIX."telephonie_societe_ligne"; + $sql .= " SET date_commande_last = now()"; + $sql .= ", fk_user_commande=".$user->id; + $sql .= " WHERE rowid =".$this->id; + + if ($fourn > 0) + { + $sql .= " AND fk_fournisseur =".$fourn; + } + + $this->db->query($sql); } if ($datea)