Fix: on ne pouvait pas choisir le modle pdf
This commit is contained in:
parent
1e4b5426fa
commit
1fdce3b17b
@ -357,15 +357,15 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
}
|
||||
$result=supplier_order_pdf_create($db, $commande->id,$commande->modelpdf,$outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dolibarr_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
{
|
||||
dolibarr_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$commande->id.'#builddoc');
|
||||
exit;
|
||||
}
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$commande->id.'#builddoc');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Efface les fichiers
|
||||
@ -824,10 +824,10 @@ else
|
||||
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
|
||||
$filedir = $conf->fournisseur->commande->dir_output . '/' . $comfournref;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
|
||||
$genallowed=$user->rights->fournisseur->commande->creer;
|
||||
$genallowed=($commande->statut == 0 ? $user->rights->fournisseur->commande->creer : 0);
|
||||
$delallowed=$user->rights->fournisseur->commande->supprimer;
|
||||
|
||||
$somethingshown=$html->show_documents('commande_fournisseur',$comfournref,$filedir,$urlsource,$commande->statut>0?1:0,$delallowed,$commande->modelpdf);
|
||||
$somethingshown=$html->show_documents('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf);
|
||||
|
||||
|
||||
print '</td><td width="50%" valign="top">';
|
||||
|
||||
@ -72,7 +72,7 @@ class CommandeFournisseur extends Commande
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva,";
|
||||
$sql .= " ".$this->db->pdate("c.date_commande")." as date_commande, c.fk_projet, c.remise_percent, c.source, c.fk_methode_commande,";
|
||||
$sql .= " c.note, c.note_public,";
|
||||
$sql .= " c.note, c.note_public, c.model_pdf,";
|
||||
$sql .= " cm.libelle as methode_commande";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_methode_commande_fournisseur as cm ON cm.rowid = c.fk_methode_commande";
|
||||
@ -103,6 +103,7 @@ class CommandeFournisseur extends Commande
|
||||
$this->projet_id = $obj->fk_projet;
|
||||
$this->note = $obj->note;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
|
||||
$this->db->free();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user