New: task #3370 : Changement de modèle sur les factures à la génération
This commit is contained in:
parent
e283c1516c
commit
3673315c33
@ -605,7 +605,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
{
|
{
|
||||||
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
||||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||||
$result=facture_pdf_create($db, $_REQUEST['facid'], '', '', $outputlangs);
|
$result=facture_pdf_create($db, $_REQUEST['facid'], '', $_REQUEST['model'], $outputlangs);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
@ -1975,7 +1975,7 @@ else
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$html->show_documents('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed);
|
$html->show_documents('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$conf->global->FACTURE_ADDON_PDF);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Propales rattachées
|
* Propales rattachées
|
||||||
|
|||||||
@ -59,9 +59,11 @@ class ModelePDFFactures extends FPDF
|
|||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db)
|
||||||
{
|
{
|
||||||
$liste=array();
|
$type='invoice';
|
||||||
$sql ="SELECT value, value from ".MAIN_DB_PREFIX."const";
|
$liste=array();
|
||||||
$sql.=" where name='FACTURE_ADDON_PDF'";
|
$sql ="SELECT nom as id, nom as lib";
|
||||||
|
$sql.=" FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql.=" WHERE type = '".$type."'";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user