From a0f78aad4aed9d27080aa1a1f4ff19af8087721f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 25 Jul 2012 12:57:59 +0200 Subject: [PATCH] Fix: for compatibility --- htdocs/contrat/class/contrat.class.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index a5c48e902fd..d8aff02b7d0 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -230,7 +230,7 @@ class Contrat extends CommonObject * @return void */ function cloture($user) - { + { $this->db->begin(); // Load lines @@ -280,7 +280,7 @@ class Contrat extends CommonObject function validate($user) { global $langs, $conf; - + $error=0; $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET statut = 1"; @@ -352,7 +352,8 @@ class Contrat extends CommonObject $this->note_private = $result["note_private"]; $this->note_public = $result["note_public"]; - $this->fk_projet = $result["fk_projet"]; + $this->fk_projet = $result["fk_projet"]; // deprecated + $this->fk_project = $result["fk_projet"]; $this->socid = $result["fk_soc"]; $this->fk_soc = $result["fk_soc"]; @@ -441,7 +442,7 @@ class Contrat extends CommonObject $line->statut = $objp->statut; $line->remise_percent = $objp->remise_percent; $line->price_ht = $objp->price_ht; - $line->price = $objp->price; // For backward compatibility + $line->price = $objp->price_ht; // For backward compatibility $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; $line->total_localtax1 = $objp->total_localtax1; @@ -700,7 +701,7 @@ class Contrat extends CommonObject function delete($user) { global $conf, $langs; - + $error=0; $this->db->begin(); @@ -788,7 +789,7 @@ class Contrat extends CommonObject $error++; } } - + if (! $error) { // Appel des triggers @@ -800,7 +801,7 @@ class Contrat extends CommonObject } // Fin appel triggers } - + if (! $error) { // We remove directory