degust-cupom-txt
Advanced tools
Comparing version
@@ -75,6 +75,6 @@ const { ClienteModel } = require('./models/cliente'); | ||
const cliente_tipo = linha_1.substr(62, 1).trim() || null; | ||
const cliente_cpf = cliente_tipo === 'J' ? null : (linha_2.substr(1, 14).trim() || null); | ||
const cliente_cpf = cliente_tipo === 'J' ? null : (linha_2.substr(1, 11).trim() || linha_1.substr(66, 11).trim() || null); | ||
const cliente_cnpj = cliente_tipo !== 'J' ? null : (linha_2.substr(1, 14).trim() || null); | ||
const cliente_email = linha_2.substr(498, 50).trim() || null; | ||
const cliente_nome = linha_2.substr(15, 100).trim() || null; | ||
const cliente_nome = linha_2.substr(15, 100).trim() || linha_1.substr(77,40).trim() || null; | ||
const cliente_telefone = linha_2.substr(548, 20).trim() || null; | ||
@@ -157,2 +157,2 @@ const cliente_sexo = linha_2.substr(970, 1).trim() || null; | ||
module.exports.VendaModel = VendaModel; | ||
module.exports.AcrescimoDescontoModel = AcrescimoDescontoModel; | ||
module.exports.AcrescimoDescontoModel = AcrescimoDescontoModel; |
{ | ||
"name": "degust-cupom-txt", | ||
"version": "0.5.7", | ||
"version": "0.6.0", | ||
"description": "Module capaz de extrair os dados dos cupons .txt que o PDV Linx Degust gera", | ||
@@ -29,4 +29,4 @@ "main": "index.js", | ||
"@fnando/cpf": "^1.0.2", | ||
"telefone": "^1.2.1" | ||
"telefone": "^1.2.4" | ||
} | ||
} |
29375
0.23%407
0.25%Updated