Fix: for compatibility

This commit is contained in:
Regis Houssin 2012-07-25 12:57:59 +02:00
parent 70cf8227a2
commit a0f78aad4a

View File

@ -230,7 +230,7 @@ class Contrat extends CommonObject
* @return void * @return void
*/ */
function cloture($user) function cloture($user)
{ {
$this->db->begin(); $this->db->begin();
// Load lines // Load lines
@ -280,7 +280,7 @@ class Contrat extends CommonObject
function validate($user) function validate($user)
{ {
global $langs, $conf; global $langs, $conf;
$error=0; $error=0;
$sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET statut = 1"; $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_private = $result["note_private"];
$this->note_public = $result["note_public"]; $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->socid = $result["fk_soc"];
$this->fk_soc = $result["fk_soc"]; $this->fk_soc = $result["fk_soc"];
@ -441,7 +442,7 @@ class Contrat extends CommonObject
$line->statut = $objp->statut; $line->statut = $objp->statut;
$line->remise_percent = $objp->remise_percent; $line->remise_percent = $objp->remise_percent;
$line->price_ht = $objp->price_ht; $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_ht = $objp->total_ht;
$line->total_tva = $objp->total_tva; $line->total_tva = $objp->total_tva;
$line->total_localtax1 = $objp->total_localtax1; $line->total_localtax1 = $objp->total_localtax1;
@ -700,7 +701,7 @@ class Contrat extends CommonObject
function delete($user) function delete($user)
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
$this->db->begin(); $this->db->begin();
@ -788,7 +789,7 @@ class Contrat extends CommonObject
$error++; $error++;
} }
} }
if (! $error) if (! $error)
{ {
// Appel des triggers // Appel des triggers
@ -800,7 +801,7 @@ class Contrat extends CommonObject
} }
// Fin appel triggers // Fin appel triggers
} }
if (! $error) if (! $error)
{ {
// We remove directory // We remove directory