Fix: le modle pdf tait effac en base lorsqu'on cliquait sur le bouton "Gnrer
le PDF"
This commit is contained in:
parent
ca57c08aa3
commit
03d068478a
@ -65,6 +65,7 @@ class Commande extends CommonObject
|
||||
var $date_livraison; // Date livraison souhaitée
|
||||
var $remise_percent;
|
||||
var $remise_absolue;
|
||||
var $modelpdf;
|
||||
|
||||
var $lines = array();
|
||||
|
||||
|
||||
@ -414,9 +414,9 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
// Sauvegarde le dernier modèle choisi pour générer un document
|
||||
$commande = new Commande($db, 0, $_REQUEST['id']);
|
||||
$commande->fetch($_REQUEST['id']);
|
||||
if ($_REQUEST['model'])
|
||||
if ($_REQUEST['modelpdf'])
|
||||
{
|
||||
$modelpdf = $_REQUEST['model'];
|
||||
$modelpdf = $_REQUEST['modelpdf'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -429,7 +429,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
$result=commande_pdf_create($db, $_REQUEST['id'],$_REQUEST['model'],$outputlangs);
|
||||
$result=commande_pdf_create($db, $_REQUEST['id'],$modelpdf,$outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dolibarr_print_error($db,$result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user