From e5063010b2d1b813cd69b686cdd12c3cf0c53ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 29 Oct 2015 19:07:00 +0100 Subject: [PATCH 1/3] Update actions_printing.inc.php --- htdocs/core/actions_printing.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'); //} From b1c4e032fc09f5447058d11a4969deb9f952fa65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 29 Oct 2015 19:08:38 +0100 Subject: [PATCH 2/3] Update html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From ff9648eed9fa59ecb7e85a4f546b0303f424456d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 29 Oct 2015 19:09:37 +0100 Subject: [PATCH 3/3] Update card.php --- htdocs/fourn/commande/card.php | 2 ++ 1 file changed, 2 insertions(+) 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