const insert = require('./insertTicketWW'); const filter = require('./utilities/filter'); const select = require('./db/selectDB'); const maxWagon = require('./db/maxWagon'); var barcode = "A0A3B820690F"; //var shelving = "BCD";///introducida por el usuario O en leida de la bbdd? var collectionFk = '273449'; function ticketCollection(collectionFk){//parametro collectionFk select.select(collectionFk, function(err,data){ maxWagon.maxWagon(collectionFk,function(err,max){ console.log('Entra') //aqui iria una función para pedir el numero de shelvings correspondientes var shelving = ['ABC','DFG','HIJ'] //if(filter.isShelving(shelving)){ insert.insertTicket(data, shelving, max) //}else{ //console.log("¡MATRICULA INCORRECTA!") //} }); }); } ticketCollection(collectionFk);