Merge pull request #23841 from avolani/16.0-FixODTFieldReplacement
Fix odt empty placeholder replacement
This commit is contained in:
commit
a352bcec5d
@ -553,6 +553,12 @@ abstract class CommonDocGenerator
|
|||||||
$resarray[$array_key.'_project_description'] = $object->project->description;
|
$resarray[$array_key.'_project_description'] = $object->project->description;
|
||||||
$resarray[$array_key.'_project_date_start'] = dol_print_date($object->project->date_start, 'day');
|
$resarray[$array_key.'_project_date_start'] = dol_print_date($object->project->date_start, 'day');
|
||||||
$resarray[$array_key.'_project_date_end'] = dol_print_date($object->project->date_end, 'day');
|
$resarray[$array_key.'_project_date_end'] = dol_print_date($object->project->date_end, 'day');
|
||||||
|
} else { // empty replacement
|
||||||
|
$resarray[$array_key.'_project_ref'] ='';
|
||||||
|
$resarray[$array_key.'_project_title'] = '';
|
||||||
|
$resarray[$array_key.'_project_description'] = '';
|
||||||
|
$resarray[$array_key.'_project_date_start'] = '';
|
||||||
|
$resarray[$array_key.'_project_date_end'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add vat by rates
|
// Add vat by rates
|
||||||
@ -716,6 +722,14 @@ abstract class CommonDocGenerator
|
|||||||
foreach ($tmpproduct->array_options as $key => $label) {
|
foreach ($tmpproduct->array_options as $key => $label) {
|
||||||
$resarray["line_product_".$key] = $label;
|
$resarray["line_product_".$key] = $label;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Set unused placeholders as blank
|
||||||
|
$extrafields->fetch_name_optionals_label("product");
|
||||||
|
$extralabels = $extrafields->attributes["product"]['label'];
|
||||||
|
|
||||||
|
foreach ($extralabels as $key => $label) {
|
||||||
|
$resarray['line_product_options_'.$key] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resarray;
|
return $resarray;
|
||||||
|
|||||||
@ -2728,6 +2728,11 @@ class ExpenseReportLine extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
|
public $table_element = 'expensereport_det';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user