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)