40if ($action ==
'print_file' && $user->hasRight(
'printing',
'read')) {
41 $langs->load(
"printing");
42 require_once DOL_DOCUMENT_ROOT.
'/core/modules/printing/modules_printing.php';
44 $list = $objectprint->listDrivers($db, 10);
45 $dirmodels = array_merge(array(
'/core/modules/printing/'), (array)
$conf->modules_parts[
'printing']);
49 foreach ($list as $driver) {
50 foreach ($dirmodels as $dir) {
51 if (file_exists(
dol_buildpath($dir, 0).$driver.
'.modules.php')) {
56 require_once $classfile;
57 $classname =
'printing_'.$driver;
58 $printer =
new $classname($db);
59 '@phan-var-force PrintingDriver $printer';
61 $langs->load(
'printing');
68 $module =
GETPOST(
'printer',
'alpha');
72 $module =
'expedition';
77 case 'commande_fournisseur':
78 $module =
'fournisseur';
83 $ret = $printer->printFile(
GETPOST(
'file',
'alpha'), $module, $subdir);
91 setEventMessages($langs->transnoentitiesnoconv(
"FileWasSentToPrinter", basename(
GETPOST(
'file',
'alpha'))).
' '.$langs->transnoentitiesnoconv(
"ViaModule").
' '.$printer->name,
null);
99 if ($printerfound == 0) {
100 setEventMessages($langs->trans(
"NoActivePrintingModuleFound", $langs->transnoentities(
"Module64000Name")),
null,
'warnings');
Parent class of emailing target selectors modules.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...