From 429155c2ca59b480a24a1ceed243b9c5ea8f375f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 27 Jan 2005 11:21:30 +0000 Subject: [PATCH] =?UTF-8?q?D=E9finit=20la=20remise=20lors=20de=20la=20cr?= =?UTF-8?q?=E9ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/telephonie/lignetel.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index 3d15472b02f..128b592f3c5 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -169,13 +169,16 @@ class LigneTel { if (strlen(trim($this->numero)) == 10) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_societe_ligne"; - $sql .= " (fk_soc, fk_client_comm, ligne, fk_soc_facture, fk_fournisseur, note, remise, fk_commercial, statut, fk_user_creat, fk_concurrent, fk_contrat)"; + $sql .= " (datec,fk_soc, fk_client_comm, ligne, fk_soc_facture, fk_fournisseur, note, remise, fk_commercial, statut, fk_user_creat, fk_concurrent, fk_contrat)"; $sql .= " VALUES ("; - $sql .= " $this->client,$this->client_comm,'$this->numero',$this->client_facture,$this->fournisseur, '$this->note','$this->remise',$this->commercial, -1,$user->id, $this->concurrent, $this->contrat)"; + $sql .= "now(),$this->client,$this->client_comm,'$this->numero',$this->client_facture,$this->fournisseur, '$this->note','$this->remise',$this->commercial, -1,$user->id, $this->concurrent, $this->contrat)"; if ( $this->db->query($sql) ) { $this->id = $this->db->last_insert_id(); + + $this->SetRemise($user, $this->remise, 'Remise initiale'); + return 0; } else