add direct print for contracts
This commit is contained in:
parent
2d92130c1e
commit
5473dbd3f0
@ -916,6 +916,8 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Actions when printing a doc from card
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->contrat->multidir_output[$object->entity];
|
||||
|
||||
@ -442,7 +442,8 @@ class FormFile
|
||||
}
|
||||
|
||||
$printer = 0;
|
||||
if (in_array($modulepart, array('facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) { // The direct print feature is implemented only for such elements
|
||||
// The direct print feature is implemented only for such elements
|
||||
if (in_array($modulepart, array('contract', 'facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) {
|
||||
$printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled)) ?true:false;
|
||||
}
|
||||
|
||||
@ -944,7 +945,7 @@ class FormFile
|
||||
$out .= '">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||
}
|
||||
if ($printer) {
|
||||
$out .= '<a class="marginleftonly reposition" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&token='.newToken().'printer='.urlencode($modulepart).'&file='.urlencode($relativepath);
|
||||
$out .= '<a class="marginleftonly reposition" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&token='.newToken().'&printer='.urlencode($modulepart).'&file='.urlencode($relativepath);
|
||||
$out .= ($param ? '&'.$param : '');
|
||||
$out .= '">'.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').'</a>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user