if (!empty($conf->global->IMPORTDEVIS_UPDATE_PRODUCT)) {
         $product->update($product->id, $user);
     }
 }
 //var_dump($product->id);
 $last_line_product = $product->id;
 if ($product->id > 0 && !empty($conf->global->CREATE_PRODUCT_FROM_IMPORT)) {
     $nomenclature = new TNomenclature();
     $nomenclature->loadByObjectId($PDOdb, $product->id, 'product');
     $nomenclature->deleteChildrenNotImported($PDOdb);
 }
 if ($row['fk_propaldet'] > 0) {
     $last_line_id = $row['fk_propaldet'];
     $nomenclature = new TNomenclature();
     $nomenclature->loadByObjectId($PDOdb, $last_line_id, $object->element);
     $nomenclature->deleteChildrenNotImported($PDOdb);
 } else {
     //		var_dump($product->id);
     if ($doliversion >= 3.8) {
         if ($row['fk_unit'] == 'none') {
             $row['fk_unit'] = null;
         }
         if ($object->element == 'facture') {
             $last_line_id = $object->addline($row['label'], $row['price'], $row['qty'], $default_tva, 0, 0, $product->id, 0, '', '', 0, 0, '', 'HT', 0, Facture::TYPE_STANDARD, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $row['fk_unit']);
         } else {
             if ($object->element == 'propal') {
                 $last_line_id = $object->addline($row['label'], $row['price'], $row['qty'], $default_tva, 0, 0, $product->id, 0, 'HT', 0, 0, 0, -1, 0, 0, 0, 0, '', '', '', 0, $row['fk_unit']);
             } else {
                 if ($object->element == 'commande') {
                     $last_line_id = $object->addline($row['label'], $row['price'], $row['qty'], $default_tva, 0, 0, $product->id, 0, 0, 0, 'HT', 0, '', '', 0, -1, 0, 0, null, 0, '', 0, $row['fk_unit']);
                 }