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]:''); }