diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6896113399d5a..a7cd3d0253bbe 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -20,7 +20,7 @@ * Copyright (C) 2022 Anthony Berton * Copyright (C) 2022 Ferran Marcet * Copyright (C) 2022 Charlene Benke - * Copyright (C) 2023 Joachim Kueter + * Copyright (C) 2023-2024 Joachim Kueter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -8307,15 +8307,15 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); $substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null); $substitutionarray['__NOTE_PRIVATE__'] = (isset($object->note_private) ? $object->note_private : null); - $substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : ''); - $substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%d") : ''); - $substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%A") : ''); - $substitutionarray['__DATE_DELIVERY_MON__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%m") : ''); - $substitutionarray['__DATE_DELIVERY_MON_TEXT__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%b") : ''); - $substitutionarray['__DATE_DELIVERY_YEAR__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%Y") : ''); - $substitutionarray['__DATE_DELIVERY_HH__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%H") : ''); - $substitutionarray['__DATE_DELIVERY_MM__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%M") : ''); - $substitutionarray['__DATE_DELIVERY_SS__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%S") : ''); + $substitutionarray['__DATE_DELIVERY__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', 0, $outputlangs) : ''); + $substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%d") : ''); + $substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%A") : ''); + $substitutionarray['__DATE_DELIVERY_MON__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%m") : ''); + $substitutionarray['__DATE_DELIVERY_MON_TEXT__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%b") : ''); + $substitutionarray['__DATE_DELIVERY_YEAR__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%Y") : ''); + $substitutionarray['__DATE_DELIVERY_HH__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%H") : ''); + $substitutionarray['__DATE_DELIVERY_MM__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%M") : ''); + $substitutionarray['__DATE_DELIVERY_SS__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, "%S") : ''); // For backward compatibility (deprecated) $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));