diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 53c326c22fa..3ea1c942c5a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8311,7 +8311,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $date_delivery = null; if (property_exists($object, 'date_delivery')) { $date_delivery = $object->date_delivery; - } elseif (property_exists($object, delivery_date')) { + } elseif (property_exists($object, 'delivery_date')) { $date_delivery = $object->delivery_date; } $substitutionarray['__DATE_DELIVERY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, 'day', 0, $outputlangs) : '');