24 lines
871 B
JavaScript
24 lines
871 B
JavaScript
const insert = require('./methods/insertTicket');
|
|
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){
|
|
//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); |