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