diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index b66452b2c5f..28c8cb656d1 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2014-2017 Marcos GarcĂ­a * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2019 Juanjo Menent + * Copyright (C) 2022 Charlene Benke * * 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 @@ -1212,11 +1213,11 @@ class Project extends CommonObject if (!empty($this->thirdparty_name)) { $label .= ($label ? '
' : '').''.$langs->trans('ThirdParty').': '.$this->thirdparty_name; // The space must be after the : to not being explode when showing the title in img_picto } - if (!empty($this->dateo)) { - $label .= ($label ? '
' : '').''.$langs->trans('DateStart').': '.dol_print_date($this->dateo, 'day'); // The space must be after the : to not being explode when showing the title in img_picto + if (!empty($this->date_start)) { + $label .= ($label ? '
' : '').''.$langs->trans('DateStart').': '.dol_print_date($this->date_start, 'day'); // The space must be after the : to not being explode when showing the title in img_picto } - if (!empty($this->datee)) { - $label .= ($label ? '
' : '').''.$langs->trans('DateEnd').': '.dol_print_date($this->datee, 'day'); // The space must be after the : to not being explode when showing the title in img_picto + if (!empty($this->date_end)) { + $label .= ($label ? '
' : '').''.$langs->trans('DateEnd').': '.dol_print_date($this->date_end, 'day'); // The space must be after the : to not being explode when showing the title in img_picto } if ($moreinpopup) { $label .= '
'.$moreinpopup; @@ -2073,7 +2074,7 @@ class Project extends CommonObject $project_static->statut = $obj->status; $project_static->opp_status = $obj->fk_opp_status; - $project_static->datee = $this->db->jdate($obj->datee); + $project_static->date_end = $this->db->jdate($obj->datee); if ($project_static->hasDelay()) { $response->nbtodolate++; @@ -2155,13 +2156,13 @@ class Project extends CommonObject if (!($this->statut == self::STATUS_VALIDATED)) { return false; } - if (!$this->datee && !$this->date_end) { + if (!$this->date_end) { return false; } $now = dol_now(); - return ($this->datee ? $this->datee : $this->date_end) < ($now - $conf->projet->warning_delay); + return ($this->date_end) < ($now - $conf->projet->warning_delay); }