From 784b773a13ebd8eda8e122b1d0046760f2b757f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Nov 2005 22:33:30 +0000 Subject: [PATCH] Fix: Pb sur contrats avec lignes sans produits --- htdocs/contrat/contrat.class.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index d5794fcfae3..8cabd7a04cb 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -388,7 +388,7 @@ class Contrat while ($j < $num) { $objp = $this->db->fetch_object($result); - $ligne = new PropaleLigne(); + $ligne = new ContratLigne(); $ligne->libelle = stripslashes($objp->description); $ligne->desc = stripslashes($objp->description); $ligne->qty = $objp->qty; @@ -768,26 +768,6 @@ class Contrat $this->total_ht = $calculs[0]; $this->total_tva = $calculs[1]; $this->total_ttc = $calculs[2]; - - /* - // Met a jour en base - $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET"; - $sql .= " price='". ereg_replace(",",".",$this->total_ht)."'"; - $sql .= ", tva='". ereg_replace(",",".",$this->total_tva)."'"; - $sql .= ", total='". ereg_replace(",",".",$this->total_ttc)."'"; - $sql .= ", remise='".ereg_replace(",",".",$this->remise)."'"; - $sql .=" WHERE rowid = $this->id"; - - if ( $this->db->query($sql) ) - { - return 1; - } - else - { - $this->error=$this->db->error(); - return -1; - } - */ }