Skip to content

Commit

Permalink
Fix clone of intervention was not cloning lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 1, 2016
1 parent 02e35f8 commit c8c51dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions htdocs/fichinter/class/fichinter.class.php
Expand Up @@ -958,8 +958,8 @@ function createFromClone($socid=0)
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 = '';
}
Expand Down Expand Up @@ -987,8 +987,7 @@ function createFromClone($socid=0)
// 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
Expand Down Expand Up @@ -1132,9 +1131,11 @@ function fetch_lines()
$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;

Expand Down

0 comments on commit c8c51dd

Please sign in to comment.