From b99d2764d4db4a5b238f6071caffc72bf4b04114 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Jan 2010 22:10:22 +0000 Subject: [PATCH] New: Project module support status of project and end date --- htdocs/project.class.php | 4 +++- htdocs/projet/fiche.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/project.class.php b/htdocs/project.class.php index faa2a1562fc..7421749e84e 100644 --- a/htdocs/project.class.php +++ b/htdocs/project.class.php @@ -124,7 +124,7 @@ class Project extends CommonObject $sql.= ", fk_soc = ".($this->socid > 0?$this->socid:"null"); $sql.= ", fk_user_resp = ".$this->user_resp_id; $sql.= ", fk_statut = ".$this->statut; - $sql.= ", datec=".($this->datec!=''?$this->db->idate($this->datec):'null'); + $sql.= ", datec=".($this->date_c!=''?$this->db->idate($this->date_c):'null'); $sql.= ", dateo=".($this->date_start!=''?$this->db->idate($this->date_start):'null'); $sql.= ", datee=".($this->date_end!=''?$this->db->idate($this->date_end):'null'); $sql.= " WHERE rowid = ".$this->id; @@ -179,7 +179,9 @@ class Project extends CommonObject $this->title = $obj->title; $this->titre = $obj->title; $this->date_c = $this->db->jdate($obj->datec); + $this->datec = $this->db->jdate($obj->datec); // deprecated $this->date_m = $this->db->jdate($obj->tms); + $this->datem = $this->db->jdate($obj->tms); // deprecated $this->date_start = $this->db->jdate($obj->dateo); $this->date_end = $this->db->jdate($obj->datee); $this->note = $obj->note; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 4a97e421d29..6c67cd4f637 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -83,8 +83,9 @@ if ($_POST["action"] == 'add' && $user->rights->projet->creer) $project->title = $_POST["title"]; $project->socid = $_POST["socid"]; $project->user_resp_id = $_POST["officer_project"]; - $project->dateo=dol_mktime(12,0,0,$_POST['projectmonth'],$_POST['projectday'],$_POST['projectyear']); $project->datec=dol_now('tzserver'); + $project->dateo=dol_mktime(12,0,0,$_POST['projectmonth'],$_POST['projectday'],$_POST['projectyear']); + $project->datee=dol_mktime(12,0,0,$_POST['projectendmonth'],$_POST['projectendday'],$_POST['projectendyear']); $result = $project->create($user); if ($result > 0)