Merge pull request #15078 from FHenry/12.0_fix_if_no_pdf_model_no_pdf_created
FIX if no PDF default model in admin for expense report, do not create a PDF
This commit is contained in:
commit
a96c193ab0
@ -2264,7 +2264,6 @@ class ExpenseReport extends CommonObject
|
||||
$langs->load("trips");
|
||||
|
||||
if (!dol_strlen($modele)) {
|
||||
$modele = 'standard';
|
||||
|
||||
if ($this->modelpdf) {
|
||||
$modele = $this->modelpdf;
|
||||
@ -2272,10 +2271,14 @@ class ExpenseReport extends CommonObject
|
||||
$modele = $conf->global->EXPENSEREPORT_ADDON_PDF;
|
||||
}
|
||||
}
|
||||
if (!empty($modele)) {
|
||||
$modelpath = "core/modules/expensereport/doc/";
|
||||
|
||||
$modelpath = "core/modules/expensereport/doc/";
|
||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user