From 2e8b99606ef36a5ef6d4b8137f69eb4c771fee7a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 29 Sep 2019 15:45:41 +0200 Subject: [PATCH] Update facture.class.php --- htdocs/compta/facture/class/facture.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 73323235448..823f7cf7e50 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2146,8 +2146,8 @@ class Facture extends CommonInvoice if (! $close_code) $sql.= ', paye=1'; if ($close_code) $sql.= ", close_code='".$this->db->escape($close_code)."'"; if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'"; - $sql.= ', fk_user_cloture = '.$user->id; - $sql.= ", date_cloture = '".$this->db->idate($now)."'"; + $sql.= ', fk_user_closing = '.$user->id; + $sql.= ", date_closing = '".$this->db->idate($now)."'"; $sql.= ' WHERE rowid = '.$this->id; $resql = $this->db->query($sql); @@ -2200,7 +2200,7 @@ class Facture extends CommonInvoice $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture'; $sql.= ' SET paye=0, fk_statut='.self::STATUS_VALIDATED.', close_code=null, close_note=null'; - $sql.= ' date_cloture as datecloture,'; + $sql.= ' date_closing as dateclosing,'; $sql.= ' fk_user_author, fk_user_valid, fk_user_cloture'; $sql.= ' WHERE rowid = '.$this->id; @@ -3527,8 +3527,8 @@ class Facture extends CommonInvoice public function info($id) { $sql = 'SELECT c.rowid, datec, date_valid as datev, tms as datem,'; - $sql.= ' date_cloture as datecloture,'; - $sql.= ' fk_user_author, fk_user_valid, fk_user_cloture'; + $sql.= ' date_closing as dateclosing,'; + $sql.= ' fk_user_author, fk_user_valid, fk_user_closing'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as c'; $sql.= ' WHERE c.rowid = '.$id; @@ -3551,17 +3551,17 @@ class Facture extends CommonInvoice $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) + if ($obj->fk_user_closing) { $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; + $cluser->fetch($obj->fk_user_closing); + $this->user_closing = $cluser; } $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->datem); $this->date_validation = $this->db->jdate($obj->datev); - $this->date_cloture = $this->db->jdate($obj->datecloture); + $this->date_closing = $this->db->jdate($obj->dateclosing); } $this->db->free($result); }