This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
smart-tag/bindTicketShelving.js

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);