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