From c8c51dd96dd47ff24b98029369dfb337189e6643 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jul 2016 19:15:30 +0200 Subject: [PATCH] Fix clone of intervention was not cloning lines. --- htdocs/fichinter/class/fichinter.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 4f86be24205..54d5dc05c33 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -958,8 +958,8 @@ class Fichinter extends CommonObject if ($objsoc->fetch($socid)>0) { $this->socid = $objsoc->id; - $this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - $this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + //$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + //$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); $this->fk_project = ''; $this->fk_delivery_address = ''; } @@ -987,8 +987,7 @@ class Fichinter extends CommonObject // Add lines because it is not included into create function foreach ($this->lines as $line) { - // TODO - + $this->addline($user, $this->id, $line->desc, $line->datei, $line->duration); } // Hook of thirdparty module @@ -1132,9 +1131,11 @@ class Fichinter extends CommonObject $line = new FichinterLigne($this->db); $line->id = $objp->rowid; $line->desc = $objp->description; + $line->duration = $objp->duree; //For invoicing we calculing hours $line->qty = round($objp->duree/3600,2); $line->date = $this->db->jdate($objp->date); + $line->datei = $this->db->jdate($objp->date); $line->rang = $objp->rang; $line->product_type = 1;