diff --git a/htdocs/core/actions_printing.inc.php b/htdocs/core/actions_printing.inc.php index 431ac89a94e..6dfd1122eac 100644 --- a/htdocs/core/actions_printing.inc.php +++ b/htdocs/core/actions_printing.inc.php @@ -46,7 +46,12 @@ if ($action == 'print_file' and $user->rights->printing->read) if (! empty($conf->global->{$printer->active})) { $subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':''); - $errorprint = $printer->print_file(GETPOST('file', 'alpha'), GETPOST('printer', 'alpha'), $subdir); + $module = GETPOST('printer', 'alpha'); + if ($module =='commande_fournisseur') { + $module = 'fournisseur'; + $subdir = 'commande'; + } + $errorprint = $printer->print_file(GETPOST('file', 'alpha'), $module, $subdir); //if ($errorprint < 0) { // setEventMessage($interface->errors, 'errors'); //} diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 230ffa99504..59a7c183d76 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -285,7 +285,7 @@ class FormFile } $printer=0; - if (in_array($modulepart,array('facture','askpricesupplier','propal','proposal','order','commande','expedition'))) // The direct print feature is implemented only for such elements + if (in_array($modulepart,array('facture','askpricesupplier','propal','proposal','order','commande','expedition', 'commande_fournisseur'))) // The direct print feature is implemented only for such elements { $printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled))?true:false; } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 37809f6bf87..cb1754fa8d3 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -872,6 +872,8 @@ if (empty($reshook)) } } + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + /* * Create an order