From 4d327dcc185f75b6eb685ef45b319489f625067e Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Wed, 8 Jun 2022 17:00:04 +0200 Subject: [PATCH 1/2] datee and dateo not filled now we user date_end and date_start --- htdocs/projet/class/project.class.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index b66452b2c5f..9937a551c1a 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_ent)) { + $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); } From b176d1a59d861be0b4965981cd7091e5e86737fe Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Thu, 9 Jun 2022 23:17:29 +0200 Subject: [PATCH 2/2] not my best day --- htdocs/projet/class/project.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 9937a551c1a..28c8cb656d1 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1216,7 +1216,7 @@ class Project extends CommonObject 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->date_ent)) { + 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) {