This commit is contained in:
Regis Houssin 2006-06-27 12:01:52 +00:00
parent c3429ed6f4
commit aaba414d8f
2 changed files with 8 additions and 2 deletions

View File

@ -424,7 +424,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
$result=commande_pdf_create($db, $commande->id,$commande->modelpdf;,$outputlangs);
$result=commande_pdf_create($db, $commande->id,$commande->modelpdf,$outputlangs);
if ($result <= 0)
{
dolibarr_print_error($db,$result);

View File

@ -690,12 +690,18 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
{
$facture = new Facture($db, 0, $_GET['facid']);
$facture->fetch($_GET['facid']);
if ($_REQUEST['modelpdf']) $facture->set_pdf_model($user, $_REQUEST['modelpdf']);
if ($_REQUEST['modelpdf'])
{
$facture->set_pdf_model($user, $_REQUEST['modelpdf']);
}
if ($_REQUEST['lang_id'])
{
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
$result=facture_pdf_create($db, $facture->id, '', $facture->modelpdf, $outputlangs);
if ($result <= 0)
{