Print IPP printing in "Fiche Commande"

This commit is contained in:
frederic34 2013-03-08 12:00:16 +01:00
parent 135de9ecdb
commit 89399121ba

View File

@ -1102,6 +1102,14 @@ else if ($action == 'remove_file')
}
}
// Print file
else if ($action == 'print_file' AND $user->rights->printipp->use)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/dolprintipp.class.php';
$printer = new dolPrintIPP($db,$conf->global->PRINTIPP_HOST,$conf->global->PRINTIPP_PORT,$user->login,$conf->global->PRINTIPP_USER,$conf->global->PRINTIPP_PASSWORD);
$printer->print_file(GETPOST('file',alpha),GETPOST('printer',alpha));
}
/*
* Add file in email form
*/
@ -2354,8 +2362,9 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->commande->creer;
$delallowed=$user->rights->commande->supprimer;
$somethingshown=$formfile->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
$printer = false;
if ($user->rights->printipp->use AND $conf->printipp->enabled) $printer = true;
$somethingshown=$formfile->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang,$printer);
/*
* Linked object block