From 933b46790ac8a76dcea062d6de3aa31c197e8515 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Mon, 24 Feb 2020 15:02:11 +0100 Subject: [PATCH] Add position to ODT mo template --- htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 398c8670a47..e276fe1f5f7 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -418,9 +418,11 @@ class doc_generic_mo_odt extends ModelePDFMo } if ($foundtagforlines) { + $linenumber = 0; foreach ($object->lines as $line) { - $tmparray = $this->get_substitutionarray_lines($line, $outputlangs); + $linenumber++; + $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);