update insert

This commit is contained in:
llopis15 2021-03-12 16:57:49 +01:00
parent edc9ae4915
commit 3ff70efa99
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
function insertTicket(sql, shelving){
function insertTicket(consultaSql, shelving){
const config = require('./config');
const got = require('got');
(async() => {
@ -6,7 +6,7 @@ function insertTicket(sql, shelving){
let key = info.data.token
let currentUser = info.data.currentUser;
(async() => {
for(var i=0;i<sql.length;i++){
for(var i=0;i<consultaSql.length;i++){
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', {
json: {
agencyId: currentUser.agencyId,
@ -17,11 +17,11 @@ function insertTicket(sql, shelving){
{
attrCategory: "verdnatura",
attrName: "conTicket",
barCode: shelving + sql[i].level,//Matricula + nivel
barCode: shelving + consultaSql[i].level,//Matricula + nivel
itemTitle: "Etiqueta Con ticket",
productCode: sql[i].ticketFk, //Ticket
custFeature1: sql[i].nickname, //Client
custFeature2: sql[i].agencyModeFk //Agencia de transporte
productCode: consultaSql[i].ticketFk, //Ticket
custFeature1: consultaSql[i].nickname, //Client
custFeature2: consultaSql[i].agencyModeFk //Agencia de transporte
}
]
},