object must be reloaded before creating pdf on confirmation and ordering
This commit is contained in:
parent
12d15cce9f
commit
619bcb44df
@ -523,7 +523,8 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou
|
||||
if ($result > 0)
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
$ret=$object->fetch($object->id); // Reload to get new records
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id);
|
||||
exit;
|
||||
@ -555,7 +556,8 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo
|
||||
if ($result > 0)
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
$ret=$object->fetch($object->id); // Reload to get new records
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id);
|
||||
exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user