From 37f14f37eac4378cd6c16e629e999f72635ff7aa Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 22 Oct 2003 15:39:28 +0000 Subject: [PATCH] Ajoute la fonction classin pour classer une facture dans un projet --- htdocs/facture.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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;