retrieve duration of lines
This commit is contained in:
parent
9607bb145c
commit
723b88f618
@ -185,8 +185,8 @@ if ($action == 'add') {
|
||||
|
||||
if ($newfichinterid > 0) {
|
||||
// Now we add line of details
|
||||
foreach ($object->lines as $ficheinterligne) {
|
||||
$newinter->addline($user, $newfichinterid, $ficheinterligne->desc, '', $ficheinterligne->duree, '');
|
||||
foreach ($object->lines as $line) {
|
||||
$newinter->addline($user, $newfichinterid, $line->desc, '', $line->duree, '');
|
||||
}
|
||||
|
||||
// on update le nombre d'inter crée à partir du modèle
|
||||
|
||||
@ -1648,8 +1648,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
// create intervention model
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >=2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) {
|
||||
print '<div class="inline-block divButAction">';
|
||||
// This feature is not yet implemented
|
||||
print '<a class="butAction" title="'.$langs->trans("not yet implemented").'" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ class FichinterRec extends Fichinter
|
||||
//var_dump($fichintsrc->lines[$i]);
|
||||
$result_insert = $this->addline(
|
||||
$fichintsrc->lines[$i]->desc,
|
||||
$fichintsrc->lines[$i]->duree,
|
||||
$fichintsrc->lines[$i]->duration,
|
||||
$fichintsrc->lines[$i]->datei,
|
||||
$fichintsrc->lines[$i]->rang,
|
||||
$fichintsrc->lines[$i]->subprice,
|
||||
@ -352,6 +352,7 @@ class FichinterRec extends Fichinter
|
||||
$line->fk_product_type = $objp->fk_product_type; // Type of product
|
||||
$line->qty = $objp->qty;
|
||||
$line->duree = $objp->duree;
|
||||
$line->duration = $objp->duree;
|
||||
$line->datei = $objp->date;
|
||||
$line->subprice = $objp->subprice;
|
||||
$line->tva_tx = $objp->tva_tx;
|
||||
@ -500,7 +501,7 @@ class FichinterRec extends Fichinter
|
||||
$sql.= ", label";
|
||||
$sql.= ", description";
|
||||
$sql.= ", date";
|
||||
//$sql.= ", duree";
|
||||
$sql.= ", duree";
|
||||
//$sql.= ", price";
|
||||
//$sql.= ", qty";
|
||||
//$sql.= ", tva_tx";
|
||||
@ -520,7 +521,7 @@ class FichinterRec extends Fichinter
|
||||
$sql.= ", ".(! empty($label)?"'".$this->db->escape($label)."'":"null");
|
||||
$sql.= ", ".(! empty($desc)?"'".$this->db->escape($desc)."'":"null");
|
||||
$sql.= ", ".(! empty($datei)?"'".$this->db->idate($datei)."'":"null");
|
||||
//$sql.= ", ".$duration;
|
||||
$sql.= ", ".$duration;
|
||||
//$sql.= ", ".price2num($pu_ht);
|
||||
//$sql.= ", ".(!empty($qty)? $qty :(!empty($duration)? $duration :"null"));
|
||||
//$sql.= ", ".price2num($txtva);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user