Génère le pdf lors de la validation de la commande
This commit is contained in:
parent
0a0b39dbc6
commit
736fae90c0
@ -147,7 +147,7 @@ if ($_POST['action'] == 'addligne' && $user->rights->fournisseur->commande->cree
|
|||||||
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
||||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
$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
|
else
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->c
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['action'] == 'deleteline' && $user->rights->fournisseur->commande->creer)
|
if ($_GET['action'] == 'deleteline' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
$commande->fetch($_GET['id']);
|
$commande->fetch($_GET['id']);
|
||||||
@ -217,9 +217,10 @@ if ($_POST['action'] == 'confirm_valid' && $_POST['confirm'] == 'yes' && $user->
|
|||||||
$commande->fetch($_GET['id']);
|
$commande->fetch($_GET['id']);
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
$result = $commande->valid($user);
|
$result = $commande->valid($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
|
commande_supplier_pdf_create($db, $commande->id, $commande->modelpdf, $outputlangs);
|
||||||
Header("Location: fiche.php?id=".$_GET["id"]);
|
Header("Location: fiche.php?id=".$_GET["id"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user