From 56583281eb7e9db7818c9c0e61f3d0a71764189a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Dec 2011 20:10:20 +0100 Subject: [PATCH] Fix: Generation of PDF must include changes --- htdocs/comm/propal.php | 6 ++++++ htdocs/compta/facture.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index fe017ff92c5..a0c55bed990 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -184,6 +184,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -214,6 +215,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->propale $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } else @@ -366,6 +368,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); @@ -625,6 +628,7 @@ if ($action == 'modif' && $user->rights->propale->creer) $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } @@ -779,6 +783,7 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); unset($_POST['qty']); @@ -861,6 +866,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 23580fb6429..165025a9186 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -194,6 +194,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); $result=facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); if ($result > 0) { @@ -355,6 +356,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->v $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } else @@ -412,6 +414,7 @@ if ($action == 'modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $us $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } } @@ -1064,6 +1067,7 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); unset($_POST['qty']); @@ -1162,6 +1166,7 @@ if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } + $object->fetch($id); facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref')); } }