diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 1393ce3a42c..895c73dd174 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -324,6 +324,25 @@ class Facture $sql = "UPDATE llx_facture SET fk_statut = 1, date_valid=now(), fk_user_valid=$userid"; $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;"; + if ($this->db->query($sql) ) + { + return 1; + } + else + { + print $this->db->error() . ' in ' . $sql; + } + } + /** + * Class la facture + * + * + */ + Function classin($cat_id) + { + $sql = "UPDATE llx_facture SET fk_projet = $cat_id"; + $sql .= " WHERE rowid = $this->id;"; + if ($this->db->query($sql) ) { return 1;