$nomenclature->is_default = 0;
             $nomenclature->object_type = 'product';
             $nomenclature->save($PDOdb);
         } else {
             $nomenclature->loadByObjectId($PDOdb, $last_line_id, $object->element);
             $nomenclature->fk_object = $last_line_id;
             $nomenclature->fk_nomenclature_parent = 0;
             $nomenclature->is_default = 0;
             $nomenclature->object_type = $object->element;
             $nomenclature->save($PDOdb);
         }
         if (!empty($row['fk_product'])) {
             $k = $nomenclature->addChild($PDOdb, 'TNomenclatureDet');
             $nomenclature->TNomenclatureDet[$k]->fk_product = $row['fk_product'];
             $nomenclature->TNomenclatureDet[$k]->title = $row['label'];
             $nomenclature->TNomenclatureDet[$k]->fk_nomenclature = $nomenclature->getId();
             $nomenclature->TNomenclatureDet[$k]->qty = $row['qty'];
             $nomenclature->TNomenclatureDet[$k]->price = $row['price'];
             $nomenclature->TNomenclatureDet[$k]->is_imported = $last_line_id;
         }
         if (!empty($row['fk_workstation']) && !empty($conf->workstation->enabled)) {
             //var_dump('tata');exit;
             $workstation->loadBy($PDOdb, $row['ref'], 'code');
             $k = $nomenclature->addChild($PDOdb, 'TNomenclatureWorkstation');
             $det =& $nomenclature->TNomenclatureWorkstation[$k];
             $det->fk_workstation = $row['fk_workstation'];
             $det->qty = $row['qty'];
         }
         $nomenclature->save($PDOdb);
     }
 } else {