From 5da4d0262e2eda2f5def95195854ee52ae60a3c1 Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 28 Jan 2015 17:28:44 +0100 Subject: [PATCH] =?UTF-8?q?[CORE]=20ajouts=20des=20conditions=20n=C3=A9ces?= =?UTF-8?q?saire=20pour=20l'int=C3=A9gration=20du=20module=20(#new=5Fask?= =?UTF-8?q?=5Fprice).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.formfile.class.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 274fa19a417..ef6f3fe225d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -273,7 +273,7 @@ class FormFile } $printer=0; - if (in_array($modulepart,array('facture','propal','proposal','order','commande','expedition'))) // This feature is implemented only for such elements + if (in_array($modulepart,array('facture', 'askpricesupplier','propal','proposal','order','commande','expedition'))) // This feature is implemented only for such elements { $printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled))?true:false; } @@ -316,6 +316,15 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; $modellist=ModelePDFPropales::liste_modeles($this->db); } + } + else if ($modulepart == 'askpricesupplier') + { + if (is_array($genallowed)) $modellist=$genallowed; + else + { + include_once DOL_DOCUMENT_ROOT.'/core/modules/askpricesupplier/modules_askpricesupplier.php'; + $modellist=ModelePDFAskPriceSupplier::liste_modeles($this->db); + } } else if ($modulepart == 'commande') { @@ -923,6 +932,11 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance=new Propal($this->db); } + else if ($modulepart == 'askpricesupplier') + { + include_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php'; + $object_instance=new AskPriceSupplier($this->db); + } else if ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; @@ -984,6 +998,7 @@ class FormFile if ($modulepart == 'invoice') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); } if ($modulepart == 'invoice_supplier') { preg_match('/([^\/]+)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); if (is_numeric($ref)) { $id=$ref; $ref=''; } } // $ref may be also id with old supplier invoices if ($modulepart == 'propal') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); } + if ($modulepart == 'askpricesupplier') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); } if ($modulepart == 'order') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); } if ($modulepart == 'order_supplier') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); } if ($modulepart == 'contract') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }