From 3d7f0402bbdd3c722aae54f86bdff22ff842074d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 9 Feb 2006 13:35:26 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20onglet=20aper=E7u=20sur=20la=20fiche=20?= =?UTF-8?q?commande=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 06e51557aea..947170ebb55 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -545,6 +545,33 @@ class Commande return -1; } } + + /* + * + * + * + */ + + function set_pdf_model($user, $modelpdf) + { + if ($user->rights->commande->creer) + { + + $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET model_pdf = '$modelpdf'"; + $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;"; + + if ($this->db->query($sql) ) + { + return 1; + } + else + { + dolibarr_print_error($this->db); + return 0; + } + } + } + /** * *