Fix var not defined

This commit is contained in:
Laurent Destailleur 2018-10-15 13:30:07 +02:00
parent cca87f3d5a
commit df4b3b09d2

View File

@ -4116,18 +4116,18 @@ class Facture extends CommonInvoice
$langs->load("bills"); $langs->load("bills");
if (! dol_strlen($modele)) { if (! dol_strlen($modele))
{
$modele = 'crabe';
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$this->type;
$modele = 'crabe'; if ($this->modelpdf) {
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$type; $modele = $this->modelpdf;
} elseif (! empty($conf->global->$thisTypeConfName)) {
if ($this->modelpdf) { $modele = $conf->global->$thisTypeConfName;
$modele = $this->modelpdf; } elseif (! empty($conf->global->FACTURE_ADDON_PDF)) {
}elseif (! empty($conf->global->{'FACTURE_ADDON_PDF_'.$this->type})){ $modele = $conf->global->FACTURE_ADDON_PDF;
$modele = $conf->global->{'FACTURE_ADDON_PDF_'.$this->type} ; }
}elseif (! empty($conf->global->FACTURE_ADDON_PDF)) {
$modele = $conf->global->FACTURE_ADDON_PDF;
}
} }
$modelpath = "core/modules/facture/doc/"; $modelpath = "core/modules/facture/doc/";