+
+ int id_1 = -1 , id_2 = -1;
+ std::list<CItem *>::iterator i = listaItems.begin();
+ while ( i != listaItems.end() ){
+ if ( (*i)->get_id() >= id_1 )
+ id_1 = (*i)->get_id();
+ i++;
+ }
+ id_1++;
+
+ i = lista_logic_Items.begin();
+ while ( i != lista_logic_Items.end() ){
+ if ( (*i)->get_id() >= id_2 )
+ id_2 = (*i)->get_id();
+ i++;
+ }
+ id_2++;
+ if ( id_1 < id_2 ) id = id_2;
+ else id = id_1;