Skip to content

Commit 1195777

Browse files
committed
FIX line_date_xxx into ODF was not loaded
1 parent c5a4bcf commit 1195777

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

htdocs/core/class/commondocgenerator.class.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,9 @@ public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0
925925
array('line_date_end_rfc', 'date_end', 'dayrfc', 'auto', null)
926926
);
927927
foreach ($date_specs as $date_spec) {
928-
if (property_exists($line, $date_spec[1])) {
929-
$resarray[$date_spec[0]] = dol_print_date($line->${$date_spec[1]}, $date_spec[2], $date_spec[3], $date_spec[4]);
928+
$propertyname = $date_spec[1];
929+
if (property_exists($line, $propertyname)) {
930+
$resarray[$date_spec[0]] = dol_print_date($line->$propertyname, $date_spec[2], $date_spec[3], $date_spec[4]);
930931
}
931932
}
932933

@@ -1082,9 +1083,9 @@ public function get_substitutionarray_shipment($object, $outputlangs, $array_key
10821083
* Define array with couple substitution key => substitution value
10831084
*
10841085
* @param array<string,CommonObject|float|int|string> $object Dolibarr Object
1085-
* @param Translate $outputlangs Language object for output
1086-
* @param boolean|int $recursive Want to fetch child array or child object.
1087-
* @return array<string,mixed> Array of substitution key->code
1086+
* @param Translate $outputlangs Language object for output
1087+
* @param boolean|int $recursive Want to fetch child array or child object.
1088+
* @return array<string,mixed> Array of substitution key->code
10881089
*/
10891090
public function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = 1)
10901091
{

0 commit comments

Comments
 (0)