FIX - Fiw default options ($hidedetails, $hidedesc, $hideref) with globales when generate PDF in mass actions
This commit is contained in:
parent
ad8e0a3be5
commit
11d4e85a39
@ -1246,9 +1246,9 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) {
|
|||||||
$model = $objecttmp->model_pdf;
|
$model = $objecttmp->model_pdf;
|
||||||
$ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records
|
$ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records
|
||||||
// To be sure vars is defined
|
// To be sure vars is defined
|
||||||
$hidedetails = !empty($hidedetails) ? $hidedetails : 0;
|
$hidedetails = !empty($hidedetails) ? $hidedetails : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||||
$hidedesc = !empty($hidedesc) ? $hidedesc : 0;
|
$hidedesc = !empty($hidedesc) ? $hidedesc : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||||
$hideref = !empty($hideref) ? $hideref : 0;
|
$hideref = !empty($hideref) ? $hideref : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||||
$moreparams = !empty($moreparams) ? $moreparams : null;
|
$moreparams = !empty($moreparams) ? $moreparams : null;
|
||||||
|
|
||||||
$result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
@ -1378,13 +1378,13 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
|||||||
|
|
||||||
// To be sure vars is defined
|
// To be sure vars is defined
|
||||||
if (empty($hidedetails)) {
|
if (empty($hidedetails)) {
|
||||||
$hidedetails = 0;
|
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||||
}
|
}
|
||||||
if (empty($hidedesc)) {
|
if (empty($hidedesc)) {
|
||||||
$hidedesc = 0;
|
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||||
}
|
}
|
||||||
if (empty($hideref)) {
|
if (empty($hideref)) {
|
||||||
$hideref = 0;
|
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||||
}
|
}
|
||||||
if (empty($moreparams)) {
|
if (empty($moreparams)) {
|
||||||
$moreparams = null;
|
$moreparams = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user