Gnre le pdf lors de la validation de la commande

This commit is contained in:
Rodolphe Quiedeville 2006-12-13 10:02:12 +00:00
parent 0a0b39dbc6
commit 736fae90c0

View File

@ -147,7 +147,7 @@ if ($_POST['action'] == 'addligne' && $user->rights->fournisseur->commande->cree
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
commande_supplier_pdf_create($db, $commande->id, $commande->modelpdf, $outputlangs);
commande_supplier_pdf_create($db, $commande->id, $commande->modelpdf, $outputlangs);
}
else
{
@ -196,7 +196,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->c
exit;
}
if ($_GET['action'] == 'deleteline' && $user->rights->fournisseur->commande->creer)
if ($_GET['action'] == 'deleteline' && $user->rights->fournisseur->commande->creer)
{
$commande = new CommandeFournisseur($db);
$commande->fetch($_GET['id']);
@ -217,9 +217,10 @@ if ($_POST['action'] == 'confirm_valid' && $_POST['confirm'] == 'yes' && $user->
$commande->fetch($_GET['id']);
$soc = new Societe($db);
$soc->fetch($commande->socid);
$result = $commande->valid($user);
$result = $commande->valid($user);
if ($result >= 0)
{
commande_supplier_pdf_create($db, $commande->id, $commande->modelpdf, $outputlangs);
Header("Location: fiche.php?id=".$_GET["id"]);
exit;
}