Fix default template for contract can be empty
This commit is contained in:
parent
f0e234c874
commit
7bbb603859
@ -2137,7 +2137,7 @@ if ($action == 'create')
|
|||||||
$delallowed = $user->rights->contrat->creer;
|
$delallowed = $user->rights->contrat->creer;
|
||||||
|
|
||||||
|
|
||||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
|
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, ($object->model_pdf ? $object->model_pdf : $conf->global->CONTRACT_ADDON_PDF), 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
|
||||||
|
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
|
|||||||
@ -426,7 +426,7 @@ class FormFile
|
|||||||
|
|
||||||
if ($modulepart == 'company')
|
if ($modulepart == 'company')
|
||||||
{
|
{
|
||||||
$showempty = 1;
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
|
||||||
@ -490,6 +490,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
} elseif ($modulepart == 'contract')
|
} elseif ($modulepart == 'contract')
|
||||||
{
|
{
|
||||||
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||||
@ -553,6 +554,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
||||||
{
|
{
|
||||||
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user