Skip to content

Commit 17ca126

Browse files
authored
Merge pull request lealhugui#27 from tfiliano/master
Implementações para NFe
2 parents c8f8b0b + a832f2b commit 17ca126

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+8190
-79
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ package-lock.json
6868
yarn.lock
6969

7070
# npm deploy folder
71-
lib
71+
# lib
7272

7373
# python compiled
7474
**/**/*.pyc

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ As releases do ```node-dfe``` seguem as liberações de versao/NT da SEFAZ, no f
4343

4444
## Estado Atual e Proximos Passos
4545

46-
Atualmente a biblioteca suporta eventos de emissao de DF-es modelo 65 (NFC-e) para todos os estados, nos modelos sincrono e assincrono. As proximas versoes Fix devem contemplar ajustes necessários para emissão de DF-e modelo 55 (NF-e) e também diferentes eventos para estes modelos (inutilização e cancelamento por exemplo).
46+
Atualmente a biblioteca suporta eventos de emissao de DF-es modelo 55 e 65 (NF-e e NFC-e) para todos os estados, nos modelos sincrono e assincrono.
47+
Rotinas como: Cancelamento, Carta de Correção e Inutilização, devem ser testadas em outras UF, foram feitos testes apenas em SP.

autorizadores.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,22 @@
167167
"url_producao": "https://nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx",
168168
"url_homologacao": "https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx"
169169
},
170-
"Inutilizacao": {
170+
"inutilizacao": {
171171
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx",
172172
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"
173-
}
174-
,"consultarProtocolo": {
173+
},
174+
"consultarProtocolo": {
175175
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx",
176176
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx"
177-
}
178-
,"consultarCadastro": {
177+
},
178+
"consultarCadastro": {
179179
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx",
180180
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx"
181-
}
182-
,"recepcaoEvento": {
181+
},
182+
"recepcaoEvento": {
183183
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx",
184184
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx"
185-
}
186-
185+
}
187186
}
188187
}
189188
}

autorizadoresNFe.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx",
185185
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx"
186186
},
187-
"Inutilizacao": {
187+
"inutilizacao": {
188188
"url_producao": "https://nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx",
189189
"url_homologacao": "https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"
190190
}

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = require('./lib');

lib/factory/index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export { NFeProcessor } from './processor/nfeProcessor2';
2+
export { RetornoProcessor } from './processor/retornoProcessor';
3+
export { StatusServicoProcessor } from './processor/statusServicoProcessor';
4+
export { EventoProcessor } from './processor/eventoProcessor';
5+
export { InutilizaProcessor } from './processor/inutilizaProcessor';
6+
export * from './interface';

lib/factory/index.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"use strict";
2+
function __export(m) {
3+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4+
}
5+
Object.defineProperty(exports, "__esModule", { value: true });
6+
var nfeProcessor2_1 = require("./processor/nfeProcessor2");
7+
exports.NFeProcessor = nfeProcessor2_1.NFeProcessor;
8+
var retornoProcessor_1 = require("./processor/retornoProcessor");
9+
exports.RetornoProcessor = retornoProcessor_1.RetornoProcessor;
10+
var statusServicoProcessor_1 = require("./processor/statusServicoProcessor");
11+
exports.StatusServicoProcessor = statusServicoProcessor_1.StatusServicoProcessor;
12+
var eventoProcessor_1 = require("./processor/eventoProcessor");
13+
exports.EventoProcessor = eventoProcessor_1.EventoProcessor;
14+
var inutilizaProcessor_1 = require("./processor/inutilizaProcessor");
15+
exports.InutilizaProcessor = inutilizaProcessor_1.InutilizaProcessor;
16+
__export(require("./interface"));
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
export interface Evento {
2+
id: string;
3+
tpAmbiente: string;
4+
CNPJ: string;
5+
cOrgao: string;
6+
chNFe: string;
7+
dhEvento: string;
8+
tpEvento: string;
9+
nSeqEvento: string;
10+
versaoEvento: string;
11+
detEvento: DetalheEvento;
12+
}
13+
export interface DetalheEvento {
14+
versao: string;
15+
descEvento: string;
16+
xCorrecao: string;
17+
xCondUso: string;
18+
nProt: string;
19+
xJust: string;
20+
cOrgaoAutor: number;
21+
tpAutor: string;
22+
verAplic: string;
23+
chNFeRef: string;
24+
dhEmi: Date;
25+
tpNF: string;
26+
IE: string;
27+
dest: EventoDestinatario;
28+
vNF: number;
29+
vICMS: number;
30+
vST: number;
31+
itemPedido: EventoItemPedido;
32+
idPedidoCancelado: string;
33+
}
34+
export interface EventoItemPedido {
35+
numItem: number;
36+
qtdeItem: number;
37+
}
38+
export interface EventoDestinatario {
39+
UF: string;
40+
CNPJCPF: string;
41+
idEstrangeiro: string;
42+
IE: string;
43+
}

lib/factory/interface/evento/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

lib/factory/interface/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './evento';
2+
export * from './nfe';

lib/factory/interface/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"use strict";
2+
function __export(m) {
3+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4+
}
5+
Object.defineProperty(exports, "__esModule", { value: true });
6+
__export(require("./nfe"));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface Inutilizar {
2+
ano: number;
3+
modelo: number;
4+
serie: number;
5+
numeroInicial: number;
6+
numeroFinal: number;
7+
xJustificativa: string;
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

0 commit comments

Comments
 (0)