Ajout possibilite d'annuler un contrat
This commit is contained in:
parent
f332174ee9
commit
6bd36d8b25
@ -98,6 +98,18 @@ class Contrat
|
|||||||
|
|
||||||
$result = $this->db->query($sql) ;
|
$result = $this->db->query($sql) ;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function annule($user)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET enservice = 0";
|
||||||
|
$sql .= " , date_cloture = now(), fk_user_cloture = ".$user->id;
|
||||||
|
$sql .= " WHERE rowid = ".$this->id . " AND enservice = 1";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql) ;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -127,6 +139,7 @@ class Contrat
|
|||||||
$this->user_cloture->id = $result["fk_user_cloture"];
|
$this->user_cloture->id = $result["fk_user_cloture"];
|
||||||
|
|
||||||
$this->product->fetch($result["fk_product"]);
|
$this->product->fetch($result["fk_product"]);
|
||||||
|
|
||||||
$this->societe->fetch($result["fk_soc"]);
|
$this->societe->fetch($result["fk_soc"]);
|
||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user