Fix: on ne pouvait pas choisir le modèle pdf
This commit is contained in:
parent
1e4b5426fa
commit
1fdce3b17b
@ -824,10 +824,10 @@ else
|
|||||||
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
|
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
|
||||||
$filedir = $conf->fournisseur->commande->dir_output . '/' . $comfournref;
|
$filedir = $conf->fournisseur->commande->dir_output . '/' . $comfournref;
|
||||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
|
$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;
|
$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">';
|
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 = "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 .= " ".$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 .= " cm.libelle as methode_commande";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
$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";
|
$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->projet_id = $obj->fk_projet;
|
||||||
$this->note = $obj->note;
|
$this->note = $obj->note;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
|
$this->modelpdf = $obj->model_pdf;
|
||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user