FIX #20828
This commit is contained in:
parent
180d94b43c
commit
c08c86a9d8
@ -166,7 +166,7 @@ if ($action == 'add') {
|
||||
|
||||
// on récupère les enregistrements
|
||||
$object->fetch($id);
|
||||
|
||||
$res = $object->fetch_lines();
|
||||
// on transfert les données de l'un vers l'autre
|
||||
if ($object->socid > 0) {
|
||||
$newinter->socid = $object->socid;
|
||||
@ -178,6 +178,7 @@ if ($action == 'add') {
|
||||
|
||||
$newinter->entity = $object->entity;
|
||||
$newinter->duree = $object->duree;
|
||||
$newinter->datei = $object->date;
|
||||
|
||||
$newinter->description = $object->description;
|
||||
$newinter->note_private = $object->note_private;
|
||||
@ -194,7 +195,7 @@ if ($action == 'add') {
|
||||
if ($newfichinterid > 0) {
|
||||
// Now we add line of details
|
||||
foreach ($object->lines as $line) {
|
||||
$newinter->addline($user, $newfichinterid, $line->desc, '', $line->duree, '');
|
||||
$newinter->addline($user, $newfichinterid, $line->desc, $line->datei, $line->duree, '');
|
||||
}
|
||||
|
||||
// on update le nombre d'inter crée à partir du modèle
|
||||
@ -743,7 +744,7 @@ if ($action == 'create') {
|
||||
print '<div class="inline-block divButAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=createfrommodel&token='.newToken().'';
|
||||
print '&socid='.$object->thirdparty->id.'&id='.$object->id.'">';
|
||||
print $langs->trans("CreateFichInter").'</a></div>';
|
||||
print $langs->trans("AddIntervention").'</a></div>';
|
||||
}
|
||||
|
||||
if ($user->rights->ficheinter->supprimer) {
|
||||
|
||||
@ -1347,7 +1347,6 @@ class Fichinter extends CommonObject
|
||||
$line->fetch_optionals();
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -349,7 +349,7 @@ class FichinterRec extends Fichinter
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, ';
|
||||
$sql .= ' l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.duree, ';
|
||||
$sql .= ' l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.duree, l.date, ';
|
||||
$sql .= ' l.total_ht, l.total_tva, l.total_ttc,';
|
||||
$sql .= ' l.rang, l.special_code,';
|
||||
$sql .= ' l.fk_unit, p.ref as product_ref, p.fk_product_type as fk_product_type,';
|
||||
@ -366,7 +366,6 @@ class FichinterRec extends Fichinter
|
||||
while ($i < $num) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$line = new FichinterLigne($this->db);
|
||||
|
||||
$line->id = $objp->rowid;
|
||||
$line->label = $objp->custom_label; // Label line
|
||||
$line->desc = $objp->description; // Description line
|
||||
@ -386,8 +385,6 @@ class FichinterRec extends Fichinter
|
||||
$line->fk_product = $objp->fk_product;
|
||||
$line->date_start = $objp->date_start;
|
||||
$line->date_end = $objp->date_end;
|
||||
$line->date_start = $objp->date_start;
|
||||
$line->date_end = $objp->date_end;
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$line->total_ht = $objp->total_ht;
|
||||
$line->total_tva = $objp->total_tva;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user