Merge pull request #3832 from frederic34/patch-16

NEW Add supplier order to the Direct Printing System
This commit is contained in:
Laurent Destailleur 2015-11-02 11:27:00 +01:00
commit a9ddcc1a80
3 changed files with 9 additions and 2 deletions

View File

@ -46,7 +46,12 @@ if ($action == 'print_file' and $user->rights->printing->read)
if (! empty($conf->global->{$printer->active})) { if (! empty($conf->global->{$printer->active})) {
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':''); $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) { //if ($errorprint < 0) {
// setEventMessage($interface->errors, 'errors'); // setEventMessage($interface->errors, 'errors');
//} //}

View File

@ -285,7 +285,7 @@ class FormFile
} }
$printer=0; $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; $printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled))?true:false;
} }

View File

@ -872,6 +872,8 @@ if (empty($reshook))
} }
} }
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
/* /*
* Create an order * Create an order