FIX missing print button for delivery form
This commit is contained in:
parent
0ad991766c
commit
0fe2c63bc0
@ -47,11 +47,21 @@ if ($action == 'print_file' && $user->rights->printing->read) {
|
|||||||
{
|
{
|
||||||
$printerfound++;
|
$printerfound++;
|
||||||
|
|
||||||
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
|
$subdir='';
|
||||||
$module = GETPOST('printer', 'alpha');
|
$module = GETPOST('printer', 'alpha');
|
||||||
if ($module =='commande_fournisseur') {
|
switch ($module )
|
||||||
|
{
|
||||||
|
case 'livraison' :
|
||||||
|
$subdir = 'receipt';
|
||||||
|
$module = 'expedition';
|
||||||
|
break;
|
||||||
|
case 'expedition' :
|
||||||
|
$subdir = 'sending';
|
||||||
|
break;
|
||||||
|
case 'commande_fournisseur' :
|
||||||
$module = 'fournisseur';
|
$module = 'fournisseur';
|
||||||
$subdir = 'commande';
|
$subdir = 'commande';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$ret = $printer->printFile(GETPOST('file', 'alpha'), $module, $subdir);
|
$ret = $printer->printFile(GETPOST('file', 'alpha'), $module, $subdir);
|
||||||
|
|||||||
@ -310,7 +310,7 @@ class FormFile
|
|||||||
$param.= 'entity='.(!empty($object->entity)?$object->entity:$conf->entity);
|
$param.= 'entity='.(!empty($object->entity)?$object->entity:$conf->entity);
|
||||||
|
|
||||||
$printer=0;
|
$printer=0;
|
||||||
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur', 'expensereport'))) // The direct print feature is implemented only for such elements
|
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur', 'expensereport','livraison'))) // 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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -292,6 +292,7 @@ elseif ($action == 'remove_file')
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user