sefaz 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +67 -24
- data/lib/sefaz/assets/NFe_logo.png +0 -0
- data/lib/sefaz/configuration.rb +8 -0
- data/lib/sefaz/utils/prawn_helper.rb +2 -0
- data/lib/sefaz/version.rb +1 -1
- data/lib/sefaz/webservice/nfe/client.rb +46 -1
- data/lib/sefaz/webservice/nfe/dataset.rb +109 -109
- data/lib/sefaz/webservice/nfe/templates/base.rb +32 -0
- data/lib/sefaz/webservice/nfe/templates/evento_cancelamento.rb +48 -0
- data/lib/sefaz/webservice/nfe/templates/evento_carta_correcao.rb +54 -0
- data/lib/sefaz/webservice/nfe/templates/evento_inutilizacao.rb +22 -0
- data/lib/sefaz/webservice/sat/dataset/cancel.rb +1 -1
- data/lib/sefaz/webservice/sat/dataset/sale.rb +36 -36
- data/lib/sefaz.rb +6 -0
- data/sefaz.gemspec +4 -3
- metadata +31 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04c3cf85140dd666271ed23c39ef684e18f6d4669467122299dd40b46589697f
|
|
4
|
+
data.tar.gz: d5c5bb5290fae72d8703ed030d0cc27c236279fc358537643e9822e591672d94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5cb0e73dcbb8e1aa1d8fde63f6e52dcc33ecf0d6708e83f6ac749050d296724651b8e90a343e6eb9d3ab6ca11d1a57d6408eb6015220d3546817e048b2cf7f86
|
|
7
|
+
data.tar.gz: 70d0f91ff430e5be49df9243e525b4ee17ca59abc6a244a7cba455c6f6b7bd35b121bc23f5d2365de73926b440e1f91bb728b2481b5d30da1ecbf53ea26bb765
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.8
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
- enviarManifestacao service
|
|
9
9
|
- exportarManifestacao service
|
|
10
10
|
|
|
11
|
+
## [1.4.0] - 2025-09-30
|
|
12
|
+
|
|
13
|
+
- Adding export pdf file for enviarNF(DANFE), cancelarNF, enviarCCe and inutilizarNF
|
|
14
|
+
- Fixing Dataset Structs and prawn warning
|
|
15
|
+
- Changing ruby version
|
|
16
|
+
|
|
11
17
|
## [1.3.0] - 2024-02-29
|
|
12
18
|
|
|
13
19
|
- Adding SEFAZ::Utils::PrawnHelper with utils methods for Prawn
|
data/Gemfile.lock
CHANGED
|
@@ -1,61 +1,100 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sefaz (1.
|
|
5
|
-
barby (~> 0.6.
|
|
4
|
+
sefaz (1.4.0)
|
|
5
|
+
barby (~> 0.6.8)
|
|
6
|
+
br_danfe (~> 0.17.8)
|
|
6
7
|
prawn (~> 2.4.0)
|
|
7
|
-
rqrcode (~>
|
|
8
|
+
rqrcode (~> 2.1.0)
|
|
8
9
|
savon (~> 2.13.0)
|
|
9
10
|
|
|
10
11
|
GEM
|
|
11
12
|
remote: https://rubygems.org/
|
|
12
13
|
specs:
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
activemodel (7.1.5.2)
|
|
15
|
+
activesupport (= 7.1.5.2)
|
|
16
|
+
activesupport (7.1.5.2)
|
|
17
|
+
base64
|
|
18
|
+
benchmark (>= 0.3)
|
|
19
|
+
bigdecimal
|
|
20
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
21
|
+
connection_pool (>= 2.2.5)
|
|
22
|
+
drb
|
|
23
|
+
i18n (>= 1.6, < 2)
|
|
24
|
+
logger (>= 1.4.2)
|
|
25
|
+
minitest (>= 5.1)
|
|
26
|
+
mutex_m
|
|
27
|
+
securerandom (>= 0.3)
|
|
28
|
+
tzinfo (~> 2.0)
|
|
29
|
+
addressable (2.8.7)
|
|
30
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
15
31
|
akami (1.3.2)
|
|
16
32
|
gyoku (>= 0.4.0)
|
|
17
33
|
nokogiri
|
|
18
|
-
barby (0.6.
|
|
19
|
-
|
|
34
|
+
barby (0.6.8)
|
|
35
|
+
base64 (0.3.0)
|
|
36
|
+
benchmark (0.4.1)
|
|
37
|
+
bigdecimal (3.1.9)
|
|
38
|
+
br_danfe (0.17.8)
|
|
39
|
+
barby (= 0.6.8)
|
|
40
|
+
br_documents (>= 0.1.3)
|
|
41
|
+
i18n (>= 0.8.6)
|
|
42
|
+
nokogiri (>= 1.8)
|
|
43
|
+
prawn (~> 2.4.0)
|
|
44
|
+
prawn-table (= 0.2.2)
|
|
45
|
+
rqrcode (~> 2.1.0)
|
|
46
|
+
br_documents (0.2.5)
|
|
47
|
+
activemodel (>= 4.0.0)
|
|
48
|
+
i18n (>= 0.6.5)
|
|
49
|
+
builder (3.3.0)
|
|
20
50
|
chunky_png (1.4.0)
|
|
21
|
-
|
|
51
|
+
concurrent-ruby (1.3.5)
|
|
52
|
+
connection_pool (2.5.4)
|
|
53
|
+
date (3.4.1)
|
|
54
|
+
drb (2.2.3)
|
|
22
55
|
gyoku (1.4.0)
|
|
23
56
|
builder (>= 2.1.2)
|
|
24
57
|
rexml (~> 3.0)
|
|
25
58
|
httpi (3.0.1)
|
|
26
59
|
rack
|
|
60
|
+
i18n (1.14.7)
|
|
61
|
+
concurrent-ruby (~> 1.0)
|
|
62
|
+
logger (1.7.0)
|
|
27
63
|
mail (2.8.1)
|
|
28
64
|
mini_mime (>= 0.1.1)
|
|
29
65
|
net-imap
|
|
30
66
|
net-pop
|
|
31
67
|
net-smtp
|
|
32
68
|
mini_mime (1.1.5)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
net-imap (0.4.
|
|
69
|
+
minitest (5.25.5)
|
|
70
|
+
mutex_m (0.3.0)
|
|
71
|
+
net-imap (0.4.19)
|
|
36
72
|
date
|
|
37
73
|
net-protocol
|
|
38
74
|
net-pop (0.1.2)
|
|
39
75
|
net-protocol
|
|
40
76
|
net-protocol (0.2.2)
|
|
41
77
|
timeout
|
|
42
|
-
net-smtp (0.
|
|
78
|
+
net-smtp (0.5.1)
|
|
43
79
|
net-protocol
|
|
44
|
-
nokogiri (1.15.
|
|
45
|
-
mini_portile2 (~> 2.8.2)
|
|
80
|
+
nokogiri (1.15.7-x86_64-linux)
|
|
46
81
|
racc (~> 1.4)
|
|
47
82
|
nori (2.6.0)
|
|
48
83
|
pdf-core (0.9.0)
|
|
49
84
|
prawn (2.4.0)
|
|
50
85
|
pdf-core (~> 0.9.0)
|
|
51
86
|
ttfunk (~> 1.7)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
87
|
+
prawn-table (0.2.2)
|
|
88
|
+
prawn (>= 1.3.0, < 3.0.0)
|
|
89
|
+
public_suffix (5.1.1)
|
|
90
|
+
racc (1.8.1)
|
|
91
|
+
rack (3.1.12)
|
|
92
|
+
rake (13.2.1)
|
|
93
|
+
rexml (3.4.1)
|
|
94
|
+
rqrcode (2.1.2)
|
|
58
95
|
chunky_png (~> 1.0)
|
|
96
|
+
rqrcode_core (~> 1.0)
|
|
97
|
+
rqrcode_core (1.2.0)
|
|
59
98
|
savon (2.13.1)
|
|
60
99
|
akami (~> 1.2)
|
|
61
100
|
builder (>= 2.1.2)
|
|
@@ -65,15 +104,19 @@ GEM
|
|
|
65
104
|
nokogiri (>= 1.8.1)
|
|
66
105
|
nori (~> 2.4)
|
|
67
106
|
wasabi (~> 3.4)
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
securerandom (0.3.2)
|
|
108
|
+
timeout (0.4.3)
|
|
109
|
+
ttfunk (1.8.0)
|
|
110
|
+
bigdecimal (~> 3.1)
|
|
111
|
+
tzinfo (2.0.6)
|
|
112
|
+
concurrent-ruby (~> 1.0)
|
|
70
113
|
wasabi (3.8.0)
|
|
71
114
|
addressable
|
|
72
115
|
httpi (~> 3.0)
|
|
73
116
|
nokogiri (>= 1.4.2)
|
|
74
117
|
|
|
75
118
|
PLATFORMS
|
|
76
|
-
|
|
119
|
+
x86_64-linux
|
|
77
120
|
|
|
78
121
|
DEPENDENCIES
|
|
79
122
|
minitest (~> 5.0)
|
|
@@ -81,4 +124,4 @@ DEPENDENCIES
|
|
|
81
124
|
sefaz!
|
|
82
125
|
|
|
83
126
|
BUNDLED WITH
|
|
84
|
-
|
|
127
|
+
2.4.22
|
|
Binary file
|
data/lib/sefaz/configuration.rb
CHANGED
|
@@ -7,6 +7,11 @@ module SEFAZ
|
|
|
7
7
|
# Configuração da formatação de valores monetários
|
|
8
8
|
attr_accessor :currency_format
|
|
9
9
|
|
|
10
|
+
# Configuração do DANFE
|
|
11
|
+
attr_accessor :nfe_default_logotipo_enabled
|
|
12
|
+
attr_accessor :nfe_default_logotipo_path
|
|
13
|
+
attr_accessor :nfe_default_logotipo_dimensions
|
|
14
|
+
|
|
10
15
|
# CF-e (Cupom Fiscal Eletrônico)
|
|
11
16
|
attr_accessor :cfe_qr_code_aplicativo
|
|
12
17
|
attr_accessor :cfe_cMP_cod_desc
|
|
@@ -21,6 +26,9 @@ module SEFAZ
|
|
|
21
26
|
|
|
22
27
|
def initialize
|
|
23
28
|
@currency_format = { delimiter: ".", separator: ",", unit: "", precision: 2, position: "before" }
|
|
29
|
+
@nfe_default_logotipo_enabled = true
|
|
30
|
+
@nfe_default_logotipo_path = "lib/sefaz/assets/NFe_logo.png"
|
|
31
|
+
@nfe_default_logotipo_dimensions = { width: 100, height: 100 }
|
|
24
32
|
@cfe_qr_code_aplicativo = "De olho na nota"
|
|
25
33
|
@cfe_cMP_cod_desc = {
|
|
26
34
|
"01" => "Dinheiro",
|
|
@@ -5,6 +5,8 @@ module SEFAZ
|
|
|
5
5
|
# Módulo com recursos adicionais para os templates baseados na Prawn
|
|
6
6
|
module PrawnHelper
|
|
7
7
|
|
|
8
|
+
Prawn::Fonts::AFM.hide_m17n_warning = true
|
|
9
|
+
|
|
8
10
|
def dash(doc, gap:, space:, line_width:, x1:, x2:, y:)
|
|
9
11
|
doc.dash(gap, space: space)
|
|
10
12
|
doc.line_width line_width
|
data/lib/sefaz/version.rb
CHANGED
|
@@ -8,7 +8,8 @@ module SEFAZ
|
|
|
8
8
|
|
|
9
9
|
SERVICES = %i[ setaAmbiente setaRespTecnico setaPFXTss setaPFXAss statusDoServico consultarNF consultarCadastro consultarRecibo
|
|
10
10
|
assinarNF validarNF auditarNF inutilizarNF exportarInutilizarNF enviarInutilizarNF calculaChaveInutilizacao
|
|
11
|
-
enviarEvento enviarLoteDeEvento cancelarNF exportarCancelarNF enviarCCe exportarCCe enviarNF enviarLoteNF calculaChaveNF
|
|
11
|
+
enviarEvento enviarLoteDeEvento cancelarNF exportarCancelarNF enviarCCe exportarCCe enviarNF enviarLoteNF calculaChaveNF
|
|
12
|
+
gerarDANFE gerarDocCancelamento gerarDocCartaCorrecao]
|
|
12
13
|
|
|
13
14
|
# Métodos de Configuração:
|
|
14
15
|
# - setaAmbiente
|
|
@@ -45,6 +46,11 @@ module SEFAZ
|
|
|
45
46
|
# - exportarManifestacao (PENDENTE) (EVENTO)
|
|
46
47
|
# - enviarEvento
|
|
47
48
|
# - enviarLoteDeEvento
|
|
49
|
+
# - gerarDANFE
|
|
50
|
+
# - gerarDANFCE (PENDENTE)
|
|
51
|
+
# - gerarDocCancelamento
|
|
52
|
+
# - gerarDocCartaCorrecao
|
|
53
|
+
# - gerarDocInutilizacao (PENDENTE)
|
|
48
54
|
# - gerarLeiauteEvento (PRIVADO)
|
|
49
55
|
|
|
50
56
|
def initialize
|
|
@@ -381,6 +387,45 @@ module SEFAZ
|
|
|
381
387
|
resp = conn.call(:nfe_recepcao_evento, hash)
|
|
382
388
|
return [resp.body.to_xml!, resp.body]
|
|
383
389
|
end
|
|
390
|
+
|
|
391
|
+
# Gerar DANFE - Gera o Documento Auxiliar da Nota Fiscal Eletrônica (DANFE) em PDF
|
|
392
|
+
# @documento(Hash ou String) = XML ou HASH que será tratado
|
|
393
|
+
# @logo_path(String) = Caminho do arquivo de logo (opcional)
|
|
394
|
+
# @logo_dimensions(Hash) = Dimensões do logo (opcional) Exemplo: { width: 100, height: 100 }
|
|
395
|
+
def gerarDANFE(documento, logo_path = nil, logo_dimensions = nil)
|
|
396
|
+
xml = (documento.is_a?(Hash) ? documento.to_xml! : documento)
|
|
397
|
+
doc = BrDanfe::Danfe.new(xml)
|
|
398
|
+
|
|
399
|
+
if Configuration.default.nfe_default_logotipo_enabled
|
|
400
|
+
doc.options.logo = Configuration.default.nfe_default_logotipo_path
|
|
401
|
+
doc.options.logo_dimensions = Configuration.default.nfe_default_logotipo_dimensions
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
doc.options.logo = logo_path if logo_path
|
|
405
|
+
doc.options.logo_dimensions = logo_dimensions if logo_dimensions
|
|
406
|
+
return doc.render_pdf
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Gerar Documento de Cancelamento em PDF
|
|
410
|
+
# @documento(Hash ou String) = XML ou HASH que será tratado
|
|
411
|
+
def gerarDocCancelamento(documento)
|
|
412
|
+
hash = (documento.is_a?(Hash) ? documento : documento.to_hash!)
|
|
413
|
+
SEFAZ::Webservice::NFE::Templates::EventoCancelamento.new.render(hash)
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Gerar Documento de Carta de Correção Eletrônica (CCe) em PDF
|
|
417
|
+
# @documento(Hash ou String) = XML ou HASH que será tratado
|
|
418
|
+
def gerarDocCartaCorrecao(documento)
|
|
419
|
+
hash = (documento.is_a?(Hash) ? documento : documento.to_hash!)
|
|
420
|
+
SEFAZ::Webservice::NFE::Templates::EventoCartaCorrecao.new.render(hash)
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Gerar Documento de Inutilização em PDF
|
|
424
|
+
# @documento(Hash ou String) = XML ou HASH que será tratado
|
|
425
|
+
def gerarDocInutilizacao(documento)
|
|
426
|
+
hash = (documento.is_a?(Hash) ? documento : documento.to_hash!)
|
|
427
|
+
SEFAZ::Webservice::NFE::Templates::EventoInutilizacao.new.render(hash)
|
|
428
|
+
end
|
|
384
429
|
|
|
385
430
|
# Gera Informações do Responsável Técnico - Calcula o hashCSRT e cria o grupo do responsável técnico
|
|
386
431
|
# Necessário quando estiver emitindo uma NF-e/NFC-e
|
|
@@ -8,97 +8,97 @@ module SEFAZ
|
|
|
8
8
|
|
|
9
9
|
attr_accessor :ide, :NFref, :emit, :avulsa, :dest, :retirada, :entrega, :autXML, :det, :DI, :adi, :detExport, :rastro, :arma, :total, :transp, :reboque, :vol, :lacres, :cobr, :dup, :detPag, :infIntermed, :infAdic, :obscont, :obsfisco, :procref, :exporta, :compra, :cana, :forDia, :deduc, :infRespTec, :infNFeSupl
|
|
10
10
|
|
|
11
|
-
IDE = Struct.new(
|
|
12
|
-
NFREF = Struct.new(
|
|
13
|
-
EMIT = Struct.new(
|
|
14
|
-
ENDEREMIT = Struct.new(
|
|
15
|
-
AVULSA = Struct.new(
|
|
16
|
-
DEST = Struct.new(
|
|
17
|
-
ENDERDEST = Struct.new(
|
|
18
|
-
RETIRADA = Struct.new(
|
|
19
|
-
ENTREGA = Struct.new(
|
|
20
|
-
AUTXML = Struct.new(
|
|
21
|
-
DET = Struct.new(
|
|
22
|
-
PROD = Struct.new(
|
|
23
|
-
DI = Struct.new(
|
|
24
|
-
ADI = Struct.new(
|
|
25
|
-
DETEXPORT = Struct.new(
|
|
26
|
-
EXPORTIND = Struct.new(
|
|
27
|
-
RASTRO = Struct.new(
|
|
28
|
-
VEICPROD = Struct.new(
|
|
29
|
-
MED = Struct.new(
|
|
30
|
-
ARMA = Struct.new(
|
|
31
|
-
COMB = Struct.new(
|
|
32
|
-
CIDE = Struct.new(
|
|
33
|
-
ENCERRANTE = Struct.new(
|
|
34
|
-
IMPOSTO = Struct.new(
|
|
35
|
-
ICMS = Struct.new(
|
|
36
|
-
ICMS00 = Struct.new(
|
|
37
|
-
ICMS10 = Struct.new(
|
|
38
|
-
ICMS20 = Struct.new(
|
|
39
|
-
ICMS30 = Struct.new(
|
|
40
|
-
ICMS40 = Struct.new(
|
|
41
|
-
ICMS51 = Struct.new(
|
|
42
|
-
ICMS60 = Struct.new(
|
|
43
|
-
ICMS70 = Struct.new(
|
|
44
|
-
ICMS90 = Struct.new(
|
|
45
|
-
ICMSPart = Struct.new(
|
|
46
|
-
ICMSST = Struct.new(
|
|
47
|
-
ICMSSN101 = Struct.new(
|
|
48
|
-
ICMSSN102 = Struct.new(
|
|
49
|
-
ICMSSN201 = Struct.new(
|
|
50
|
-
ICMSSN202 = Struct.new(
|
|
51
|
-
ICMSSN500 = Struct.new(
|
|
52
|
-
ICMSSN900 = Struct.new(
|
|
53
|
-
ICMSUFDest = Struct.new(
|
|
54
|
-
IPI = Struct.new(
|
|
55
|
-
IPITrib = Struct.new(
|
|
56
|
-
IPINT = Struct.new(
|
|
57
|
-
II = Struct.new(
|
|
58
|
-
PIS = Struct.new(
|
|
59
|
-
PISAliq = Struct.new(
|
|
60
|
-
PISQtde = Struct.new(
|
|
61
|
-
PISNT = Struct.new(
|
|
62
|
-
PISOutr = Struct.new(
|
|
63
|
-
PISST = Struct.new(
|
|
64
|
-
COFINS = Struct.new(
|
|
65
|
-
COFINSAliq = Struct.new(
|
|
66
|
-
COFINSQtde = Struct.new(
|
|
67
|
-
COFINSNT = Struct.new(
|
|
68
|
-
COFINSOutr = Struct.new(
|
|
69
|
-
COFINSST = Struct.new(
|
|
70
|
-
ISSQN = Struct.new(
|
|
71
|
-
IMPOSTODEVOL = Struct.new(
|
|
72
|
-
IPIDEVOL = Struct.new(
|
|
73
|
-
TOTAL = Struct.new(
|
|
74
|
-
ICMSTot = Struct.new(
|
|
75
|
-
ISSQNtot = Struct.new(
|
|
76
|
-
RETTrib = Struct.new(
|
|
77
|
-
TRANSP = Struct.new(
|
|
78
|
-
TRANSPORTA = Struct.new(
|
|
79
|
-
RETTRANSP = Struct.new(
|
|
80
|
-
VEICTRANSP = Struct.new(
|
|
81
|
-
REBOQUE = Struct.new(
|
|
82
|
-
VOL = Struct.new(
|
|
83
|
-
LACRES = Struct.new(
|
|
84
|
-
COBR = Struct.new(
|
|
85
|
-
FAT = Struct.new(
|
|
86
|
-
DUP = Struct.new(
|
|
87
|
-
PAG = Struct.new(
|
|
88
|
-
DETPAG = Struct.new(
|
|
89
|
-
CARD = Struct.new(
|
|
90
|
-
INFINTERMED = Struct.new(
|
|
91
|
-
INFADIC = Struct.new(
|
|
92
|
-
OBSCONT = Struct.new(
|
|
93
|
-
OBSFISCO = Struct.new(
|
|
94
|
-
PROCREF = Struct.new(
|
|
95
|
-
EXPORTA = Struct.new(
|
|
96
|
-
COMPRA = Struct.new(
|
|
97
|
-
CANA = Struct.new(
|
|
98
|
-
FORDIA = Struct.new(
|
|
99
|
-
DEDUC = Struct.new(
|
|
100
|
-
INFRESPTEC = Struct.new(
|
|
101
|
-
INFNFESUPL = Struct.new(
|
|
11
|
+
IDE = Struct.new(:cUF, :cNF, :natOp, :mod, :serie, :nNF, :dhEmi, :dhSaiEnt, :tpNF, :idDest, :cMunFG, :tpImp, :tpEmis, :cDV, :tpAmb, :finNFe, :indFinal, :indPres, :indIntermed, :procEmi, :verProc, :dhCont, :xJust, :NFref)
|
|
12
|
+
NFREF = Struct.new(:refNFe, :cUF, :AAMM, :CNPJ, :CPF, :IE, :mod, :serie, :nNF, :refCTe, :nECF, :nCOO)
|
|
13
|
+
EMIT = Struct.new(:CNPJ, :CPF, :xNome, :xFant, :enderEmit, :IE, :IEST, :IM, :CNAE, :CRT)
|
|
14
|
+
ENDEREMIT = Struct.new(:xLgr, :nro, :xCpl, :xBairro, :cMun, :xMun, :UF, :CEP, :cPais, :xPais, :fone)
|
|
15
|
+
AVULSA = Struct.new(:CNPJ, :xOrgao, :matr, :xAgente, :fone, :UF, :nDAR, :dEmi, :vDAR, :repEmi, :dPag)
|
|
16
|
+
DEST = Struct.new(:CNPJ, :CPF, :idEstrangeiro, :xNome, :enderDest, :indIEDest, :IE, :ISUF, :IM, :email)
|
|
17
|
+
ENDERDEST = Struct.new(:xLgr, :nro, :xCpl, :xBairro, :cMun, :xMun, :UF, :CEP, :cPais, :xPais, :fone)
|
|
18
|
+
RETIRADA = Struct.new(:CNPJ, :CPF, :xNome, :xLgr, :nro, :xCpl, :xBairro, :cMun, :xMun, :UF, :CEP, :cPais, :xPais, :fone, :email, :IE)
|
|
19
|
+
ENTREGA = Struct.new(:CNPJ, :CPF, :xNome, :xLgr, :nro, :xCpl, :xBairro, :cMun, :xMun, :UF, :CEP, :cPais, :xPais, :fone, :email, :IE)
|
|
20
|
+
AUTXML = Struct.new(:CNPJ, :CPF)
|
|
21
|
+
DET = Struct.new(:@nItem, :prod, :imposto, :impostoDevol, :infAdProd)
|
|
22
|
+
PROD = Struct.new(:cProd, :cEAN, :xProd, :NCM, :NVE, :CEST, :indEscala, :CNPJFab, :cBenef, :EXTIPI, :CFOP, :uCom, :qCom, :vUnCom, :vProd, :cEANTrib, :uTrib, :qTrib, :vUnTrib, :vFrete, :vSeg, :vDesc, :vOutro, :indTot, :DI, :detExport, :xPed, :nItemPed, :nFCI, :rastro, :veicProd, :med, :arma, :comb, :nRECOPI)
|
|
23
|
+
DI = Struct.new(:nDI, :dDI, :xLocDesemb, :UFDesemb, :dDesemb, :tpViaTransp, :vAFRMM, :tpIntermedio, :CNPJ, :UFTerceiro, :cExportador, :adi)
|
|
24
|
+
ADI = Struct.new(:nAdicao, :nSeqAdic, :cFabricante, :vDescDI, :nDraw)
|
|
25
|
+
DETEXPORT = Struct.new(:nDraw, :exportInd)
|
|
26
|
+
EXPORTIND = Struct.new(:nRE, :chNFe, :qExport)
|
|
27
|
+
RASTRO = Struct.new(:nLote, :qLote, :dFab, :dVal, :cAgreg)
|
|
28
|
+
VEICPROD = Struct.new(:tpOp, :chassi, :cCor, :xCor, :pot, :cilin, :pesoL, :pesoB, :nSerie, :tpComb, :nMotor, :CMT, :dist, :anoMod, :anoFab, :tpPint, :tpVeic, :espVeic, :VIN, :condVeic, :cMod, :cCorDENATRAN, :lota, :tpRest)
|
|
29
|
+
MED = Struct.new(:cProdANVISA, :xMotivoIsencao, :vPMC)
|
|
30
|
+
ARMA = Struct.new(:tpArma, :nSerie, :nCano, :descr)
|
|
31
|
+
COMB = Struct.new(:cProdANP, :descANP, :pGLP, :pGNn, :pGNi, :vPart, :CODIF, :qTemp, :UFCons, :CIDE, :encerrante)
|
|
32
|
+
CIDE = Struct.new(:qBCProd, :vAliqProd, :vCIDE)
|
|
33
|
+
ENCERRANTE = Struct.new(:nBico, :nBomba, :nTanque, :vEncIni, :vEncFin)
|
|
34
|
+
IMPOSTO = Struct.new(:vTotTrib, :ICMS, :ICMSUFDest, :IPI, :II, :PIS, :PISST, :COFINS, :COFINSST, :ISSQN)
|
|
35
|
+
ICMS = Struct.new(:ICMS00, :ICMS10, :ICMS20, :ICMS30, :ICMS40, :ICMS51, :ICMS60, :ICMS70, :ICMS90, :ICMSPart, :ICMSST, :ICMSSN101, :ICMSSN102, :ICMSSN201, :ICMSSN202, :ICMSSN500, :ICMSSN900)
|
|
36
|
+
ICMS00 = Struct.new(:orig, :CST, :modBC, :vBC, :pICMS, :vICMS, :pFCP, :vFCP)
|
|
37
|
+
ICMS10 = Struct.new(:orig, :CST, :modBC, :vBC, :pICMS, :vICMS, :vBCFCP, :pFCP, :vFCP, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST)
|
|
38
|
+
ICMS20 = Struct.new(:orig, :CST, :modBC, :pRedBC, :vBC, :pICMS, :vICMS, :vBCFCP, :pFCP, :vFCP, :vICMSDeson, :motDesICMS)
|
|
39
|
+
ICMS30 = Struct.new(:orig, :CST, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST, :vICMSDeson, :motDesICMS)
|
|
40
|
+
ICMS40 = Struct.new(:orig, :CST, :vICMSDeson, :motDesICMS)
|
|
41
|
+
ICMS51 = Struct.new(:orig, :CST, :modBC, :pRedBC, :vBC, :pICMS, :vICMSOp, :pDif, :vICMSDif, :vICMS, :vBCFCP, :pFCP, :vFCP)
|
|
42
|
+
ICMS60 = Struct.new(:orig, :CST, :vBCSTRet, :pST, :vICMSSubstituto, :vICMSSTRet, :vBCFCPSTRet, :pFCPSTRet, :vFCPSTRet, :pRedBCEfet, :vBCEfet, :pICMSEfet, :vICMSEfet)
|
|
43
|
+
ICMS70 = Struct.new(:orig, :CST, :modBC, :pRedBC, :vBC, :pICMS, :vICMS, :vBCFCP, :pFCP, :vFCP, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST, :vICMSDeson, :motDesICMS)
|
|
44
|
+
ICMS90 = Struct.new(:orig, :CST, :modBC, :vBC, :pRedBC, :pICMS, :vICMS, :vBCFCP, :pFCP, :vFCP, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST, :vICMSDeson, :motDesICMS)
|
|
45
|
+
ICMSPart = Struct.new(:orig, :CST, :modBC, :vBC, :pRedBC, :pICMS, :vICMS, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :pBCOp, :UFST)
|
|
46
|
+
ICMSST = Struct.new(:orig, :CST, :vBCSTRet, :pST, :vICMSSubstituto, :vICMSSTRet, :vBCFCPSTRet, :pFCPSTRet, :vFCPSTRet, :vBCSTDest, :vICMSSTDest, :pRedBCEfet, :vBCEfet, :pICMSEfet, :vICMSEfet)
|
|
47
|
+
ICMSSN101 = Struct.new(:orig, :CSOSN, :pCredSN, :vCredICMSSN)
|
|
48
|
+
ICMSSN102 = Struct.new(:orig, :CSOSN)
|
|
49
|
+
ICMSSN201 = Struct.new(:orig, :CSOSN, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST, :pCredSN, :vCredICMSSN)
|
|
50
|
+
ICMSSN202 = Struct.new(:orig, :CSOSN, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST)
|
|
51
|
+
ICMSSN500 = Struct.new(:orig, :CSOSN, :vBCSTRet, :pST, :vICMSSubstituto, :vICMSSTRet, :vBCFCPSTRet, :pFCPSTRet, :vFCPSTRet, :pRedBCEfet, :vBCEfet, :pICMSEfet, :vICMSEfet)
|
|
52
|
+
ICMSSN900 = Struct.new(:orig, :CSOSN, :modBC, :vBC, :pRedBC, :pICMS, :vICMS, :modBCST, :pMVAST, :pRedBCST, :vBCST, :pICMSST, :vICMSST, :vBCFCPST, :pFCPST, :vFCPST, :pCredSN, :vCredICMSSN)
|
|
53
|
+
ICMSUFDest = Struct.new(:vBCUFDest, :vBCFCPUFDest, :pFCPUFDest, :pICMSUFDest, :pICMSInter, :pICMSInterPart, :vFCPUFDest, :vICMSUFDest, :vICMSUFRemet)
|
|
54
|
+
IPI = Struct.new(:CNPJProd, :cSelo, :qSelo, :cEnq, :IPITrib, :IPINT)
|
|
55
|
+
IPITrib = Struct.new(:CST, :vBC, :qUnid, :vUnid, :vIPI)
|
|
56
|
+
IPINT = Struct.new(:CST)
|
|
57
|
+
II = Struct.new(:vBC, :vDespAdu, :vII, :vIOF)
|
|
58
|
+
PIS = Struct.new(:PISAliq, :PISQtde, :PISNT, :PISOutr)
|
|
59
|
+
PISAliq = Struct.new(:CST, :vBC, :pPIS, :vPIS)
|
|
60
|
+
PISQtde = Struct.new(:CST, :qBCProd, :vAliqProd, :vPIS)
|
|
61
|
+
PISNT = Struct.new(:CST)
|
|
62
|
+
PISOutr = Struct.new(:CST, :vBC, :pPIS, :qBCProd, :vAliqProd, :vPIS)
|
|
63
|
+
PISST = Struct.new(:vBC, :pPIS, :qBCProd, :vAliqProd, :vPIS)
|
|
64
|
+
COFINS = Struct.new(:COFINSAliq, :COFINSQtde, :COFINSNT, :COFINSOutr)
|
|
65
|
+
COFINSAliq = Struct.new(:CST, :vBC, :pCOFINS, :vCOFINS)
|
|
66
|
+
COFINSQtde = Struct.new(:CST, :qBCProd, :vAliqProd, :vCOFINS)
|
|
67
|
+
COFINSNT = Struct.new(:CST)
|
|
68
|
+
COFINSOutr = Struct.new(:CST, :vBC, :pCOFINS, :qBCProd, :vAliqProd, :vCOFINS)
|
|
69
|
+
COFINSST = Struct.new(:vBC, :pCOFINS, :qBCProd, :vAliqProd, :vCOFINS)
|
|
70
|
+
ISSQN = Struct.new(:vBC, :vAliq, :vISSQN, :cMunFG, :cListServ, :vDeducao, :vOutro, :vDescIncond, :vDescCond, :vISSRet, :indISS, :cServico, :cMun, :cPais, :nProcesso, :indIncentivo)
|
|
71
|
+
IMPOSTODEVOL = Struct.new(:pDevol, :IPI)
|
|
72
|
+
IPIDEVOL = Struct.new(:vIPIDevol)
|
|
73
|
+
TOTAL = Struct.new(:ICMSTot, :ISSQNtot, :retTrib)
|
|
74
|
+
ICMSTot = Struct.new(:vBC, :vICMS, :vICMSDeson, :vFCPUFDest, :vICMSUFDest, :vICMSUFRemet, :vFCP, :vBCST, :vST, :vFCPST, :vFCPSTRet, :vProd, :vFrete, :vSeg, :vDesc, :vII, :vIPI, :vIPIDevol, :vPIS, :vCOFINS, :vOutro, :vNF, :vTotTrib)
|
|
75
|
+
ISSQNtot = Struct.new(:vServ, :vBC, :vISS, :vPIS, :vCOFINS, :dCompet, :vDeducao, :vOutro, :vDescIncond, :vDescCond, :vISSRet, :cRegTrib)
|
|
76
|
+
RETTrib = Struct.new(:vRetPIS, :vRetCOFINS, :vRetCSLL, :vBCIRRF, :vIRRF, :vBCRetPrev, :vRetPrev)
|
|
77
|
+
TRANSP = Struct.new(:modFrete, :transporta, :retTransp, :veicTransp, :reboque, :vagao, :balsa, :vol)
|
|
78
|
+
TRANSPORTA = Struct.new(:CNPJ, :CPF, :xNome, :IE, :xEnder, :xMun, :UF)
|
|
79
|
+
RETTRANSP = Struct.new(:vServ, :vBCRet, :pICMSRet, :vICMSRet, :CFOP, :cMunFG)
|
|
80
|
+
VEICTRANSP = Struct.new(:placa, :UF, :RNTC)
|
|
81
|
+
REBOQUE = Struct.new(:placa, :UF, :RNTC)
|
|
82
|
+
VOL = Struct.new(:qVol, :esp, :marca, :nVol, :pesoL, :pesoB, :lacres)
|
|
83
|
+
LACRES = Struct.new(:nLacre)
|
|
84
|
+
COBR = Struct.new(:fat, :dup)
|
|
85
|
+
FAT = Struct.new(:nFat, :vOrig, :vDesc, :vLiq)
|
|
86
|
+
DUP = Struct.new(:nDup, :dVenc, :vDup)
|
|
87
|
+
PAG = Struct.new(:detPag)
|
|
88
|
+
DETPAG = Struct.new(:indPag, :tPag, :vPag, :card, :vTroco)
|
|
89
|
+
CARD = Struct.new(:tpIntegra, :CNPJ, :tBand, :cAut)
|
|
90
|
+
INFINTERMED = Struct.new(:CNPJ, :idCadIntTran)
|
|
91
|
+
INFADIC = Struct.new(:infAdFisco, :infCpl, :obsCont, :obsFisco, :procRef)
|
|
92
|
+
OBSCONT = Struct.new(:xCampo, :xTexto)
|
|
93
|
+
OBSFISCO = Struct.new(:xCampo, :xTexto)
|
|
94
|
+
PROCREF = Struct.new(:nProc, :indProc)
|
|
95
|
+
EXPORTA = Struct.new(:UFSaidaPais, :xLocExporta, :xLocDespacho)
|
|
96
|
+
COMPRA = Struct.new(:xNEmp, :xPed, :xCont)
|
|
97
|
+
CANA = Struct.new(:safra, :ref, :forDia, :qTotMes, :qTotAnt, :qTotGer, :deduc, :vFor, :vTotDed, :vLiqFor)
|
|
98
|
+
FORDIA = Struct.new(:dia, :qtde)
|
|
99
|
+
DEDUC = Struct.new(:xDed, :vDed)
|
|
100
|
+
INFRESPTEC = Struct.new(:CNPJ, :xContato, :email, :fone, :idCSRT, :hashCSRT)
|
|
101
|
+
INFNFESUPL = Struct.new(:qrCode, :urlChave)
|
|
102
102
|
|
|
103
103
|
def initialize(chaveNF)
|
|
104
104
|
@versao = "4.00"
|
|
@@ -309,7 +309,7 @@ module SEFAZ
|
|
|
309
309
|
def save(part_name)
|
|
310
310
|
case part_name
|
|
311
311
|
when "NFREF"
|
|
312
|
-
if @ide.is_a?(
|
|
312
|
+
if @ide.is_a?(IDE) && @NFref.is_a?(NFREF)
|
|
313
313
|
case @NFref.mod
|
|
314
314
|
when "01", "02"
|
|
315
315
|
@ide.NFref.push({ refNF: { cUF: @NFref.cUF, AAMM: @NFref.AAMM, CNPJ: @NFref.CNPJ, mod: @NFref.mod, serie: @NFref.serie, nNF: @NFref.nNF } })
|
|
@@ -322,11 +322,11 @@ module SEFAZ
|
|
|
322
322
|
end
|
|
323
323
|
end
|
|
324
324
|
when "AUTXML"
|
|
325
|
-
if @autXML.is_a?(
|
|
325
|
+
if @autXML.is_a?(AUTXML)
|
|
326
326
|
@listas[:autXML].push(@autXML.to_h)
|
|
327
327
|
end
|
|
328
328
|
when "DET"
|
|
329
|
-
if @det.is_a?(
|
|
329
|
+
if @det.is_a?(DET)
|
|
330
330
|
item = @det
|
|
331
331
|
item.prod.veicProd = item.prod.veicProd.to_h
|
|
332
332
|
item.prod.med = item.prod.med.to_h
|
|
@@ -377,67 +377,67 @@ module SEFAZ
|
|
|
377
377
|
@listas[:det].push(item.to_h)
|
|
378
378
|
end
|
|
379
379
|
when "DI"
|
|
380
|
-
if @det.is_a?(
|
|
380
|
+
if @det.is_a?(DET) && @DI.is_a?(DI)
|
|
381
381
|
@det.prod.DI.push(@DI.to_h)
|
|
382
382
|
end
|
|
383
383
|
when "ADI"
|
|
384
|
-
if @DI.is_a?(
|
|
384
|
+
if @DI.is_a?(DI) && @adi.is_a?(ADI)
|
|
385
385
|
@DI.adi.push(@adi.to_h)
|
|
386
386
|
end
|
|
387
387
|
when "DETEXPORT"
|
|
388
|
-
if @det.is_a?(
|
|
388
|
+
if @det.is_a?(DET) && @detExport.is_a?(DETEXPORT)
|
|
389
389
|
item = @detExport
|
|
390
390
|
item.exportInd = item.exportInd.to_h
|
|
391
391
|
@det.prod.detExport.push(item.to_h)
|
|
392
392
|
end
|
|
393
393
|
when "RASTRO"
|
|
394
|
-
if @det.is_a?(
|
|
394
|
+
if @det.is_a?(DET) && @rastro.is_a?(RASTRO)
|
|
395
395
|
@det.prod.rastro.push(@rastro.to_h)
|
|
396
396
|
end
|
|
397
397
|
when "ARMA"
|
|
398
|
-
if @det.is_a?(
|
|
398
|
+
if @det.is_a?(DET) && @arma.is_a?(ARMA)
|
|
399
399
|
@det.prod.arma.push(@arma.to_h)
|
|
400
400
|
end
|
|
401
401
|
when "REBOQUE"
|
|
402
|
-
if @transp.is_a?(
|
|
402
|
+
if @transp.is_a?(TRANSP) && @reboque.is_a?(REBOQUE)
|
|
403
403
|
@transp.reboque.push(@reboque.to_h)
|
|
404
404
|
end
|
|
405
405
|
when "VOL"
|
|
406
|
-
if @transp.is_a?(
|
|
406
|
+
if @transp.is_a?(TRANSP) && @vol.is_a?(VOL)
|
|
407
407
|
@transp.vol.push(@vol.to_h)
|
|
408
408
|
end
|
|
409
409
|
when "LACRES"
|
|
410
|
-
if @vol.is_a?(
|
|
410
|
+
if @vol.is_a?(VOL) && @lacres.is_a?(LACRES)
|
|
411
411
|
@vol.lacres.push(@lacres.to_h)
|
|
412
412
|
end
|
|
413
413
|
when "DUP"
|
|
414
|
-
if @cobr.is_a?(
|
|
414
|
+
if @cobr.is_a?(COBR) && @dup.is_a?(DUP)
|
|
415
415
|
@cobr.dup.push(@dup.to_h)
|
|
416
416
|
end
|
|
417
417
|
when "DETPAG"
|
|
418
|
-
if @pag.is_a?(
|
|
418
|
+
if @pag.is_a?(PAG) && @detPag.is_a?(DETPAG)
|
|
419
419
|
item = @detPag
|
|
420
420
|
item.card = item.card.to_h
|
|
421
421
|
@pag.detPag.push(item.to_h)
|
|
422
422
|
end
|
|
423
423
|
when "OBSCONT"
|
|
424
|
-
if @infAdic.is_a?(
|
|
424
|
+
if @infAdic.is_a?(INFADIC) && @obscont.is_a?(OBSCONT)
|
|
425
425
|
@infAdic.obsCont.push(@obscont.to_h)
|
|
426
426
|
end
|
|
427
427
|
when "OBSFISCO"
|
|
428
|
-
if @infAdic.is_a?(
|
|
428
|
+
if @infAdic.is_a?(INFADIC) && @obsfisco.is_a?(OBSFISCO)
|
|
429
429
|
@infAdic.obsFisco.push(@obsfisco.to_h)
|
|
430
430
|
end
|
|
431
431
|
when "PROCREF"
|
|
432
|
-
if @infAdic.is_a?(
|
|
432
|
+
if @infAdic.is_a?(INFADIC) && @procref.is_a?(PROCREF)
|
|
433
433
|
@infAdic.procRef.push(@procref.to_h)
|
|
434
434
|
end
|
|
435
435
|
when "FORDIA"
|
|
436
|
-
if @cana.is_a?(
|
|
436
|
+
if @cana.is_a?(CANA) && @forDia.is_a?(FORDIA)
|
|
437
437
|
@cana.forDia.push(@forDia.to_h)
|
|
438
438
|
end
|
|
439
439
|
when "DEDUC"
|
|
440
|
-
if @cana.is_a?(
|
|
440
|
+
if @cana.is_a?(CANA) && @deduc.is_a?(DEDUC)
|
|
441
441
|
@cana.deduc.push(@deduc.to_h)
|
|
442
442
|
end
|
|
443
443
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SEFAZ
|
|
4
|
+
module Webservice
|
|
5
|
+
module NFE
|
|
6
|
+
module Templates
|
|
7
|
+
# Classe base dos templates para NFe
|
|
8
|
+
class Base
|
|
9
|
+
|
|
10
|
+
include SEFAZ::Utils::PrawnHelper
|
|
11
|
+
|
|
12
|
+
def initialize
|
|
13
|
+
@margin = 7.mm
|
|
14
|
+
@page_size = 'A4'
|
|
15
|
+
@page_layout = :portrait
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def build(doc, hash)
|
|
19
|
+
raise SEFAZ::NotImplemented, "Você deve implementar o método 'build' em uma subclasse."
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def render(hash)
|
|
23
|
+
Prawn::Document.new(page_size: @page_size, margin: @margin, page_layout: @page_layout) do |doc|
|
|
24
|
+
build(doc, hash)
|
|
25
|
+
end.render
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SEFAZ
|
|
4
|
+
module Webservice
|
|
5
|
+
module NFE
|
|
6
|
+
module Templates
|
|
7
|
+
# Template para Evento de Cancelamento em PDF
|
|
8
|
+
class EventoCancelamento < SEFAZ::Webservice::NFE::Templates::Base
|
|
9
|
+
|
|
10
|
+
def build(doc, hash)
|
|
11
|
+
doc.font_size 10
|
|
12
|
+
|
|
13
|
+
chNFe = hash[:procEventoNFe][:evento][:infEvento][:chNFe]
|
|
14
|
+
id = hash[:procEventoNFe][:evento][:infEvento][:@Id].delete('^0-9')
|
|
15
|
+
nProt = hash[:procEventoNFe][:evento][:infEvento][:detEvento][:nProt]
|
|
16
|
+
nProtCancelamento = hash[:procEventoNFe][:retEvento][:infEvento][:nProt]
|
|
17
|
+
dhEvento = hash[:procEventoNFe][:evento][:infEvento][:dhEvento].to_time.strftime("%d/%m/%Y %H:%M:%S")
|
|
18
|
+
dhRegEvento = hash[:procEventoNFe][:retEvento][:infEvento][:dhRegEvento].to_time.strftime("%d/%m/%Y %H:%M:%S")
|
|
19
|
+
xJust = hash[:procEventoNFe][:evento][:infEvento][:detEvento][:xJust]
|
|
20
|
+
xMotivo = hash[:procEventoNFe][:retEvento][:infEvento][:xMotivo]
|
|
21
|
+
nSeqEvento = hash[:procEventoNFe][:evento][:infEvento][:nSeqEvento]
|
|
22
|
+
cOrgao = hash[:procEventoNFe][:retEvento][:infEvento][:cOrgao]
|
|
23
|
+
chNFeBlob = Barby::PngOutputter.new(Barby::Code128C.new(chNFe)).to_png(xdim: 1, height: 40, margin: 3)
|
|
24
|
+
idBlob = Barby::PngOutputter.new(Barby::Code128C.new(id)).to_png(xdim: 1, height: 40, margin: 3)
|
|
25
|
+
|
|
26
|
+
header = [[{ content: "Cancelamento de NF-e", align: :center, font_style: :bold, size: 18, padding: [15, 0] }]]
|
|
27
|
+
body = [
|
|
28
|
+
[{ content: "Chave de Acesso - NF-e", align: :center, size: 12, borders: [:top, :left, :right], padding: [5, 0, 0, 0], width: doc.bounds.width / 2 }, { content: "Chave de Acesso Cancelamento - NF-e", align: :center, size: 12, borders: [:top, :left, :right], padding: [5, 0, 0, 0], width: doc.bounds.width / 2 }],
|
|
29
|
+
[{ content: chNFe, align: :center, borders: [:bottom, :left, :right], padding: [0, 0, 5, 0] }, { content: id, align: :center, borders: [:bottom, :left, :right], padding: [0, 0, 5, 0], size: 9 }],
|
|
30
|
+
[{ image: StringIO.new(chNFeBlob), scale: 0.7, position: :center, vposition: :center, width: doc.bounds.width / 2 }, { image: StringIO.new(idBlob), scale: 0.7, position: :center, vposition: :center, width: doc.bounds.width / 2 }],
|
|
31
|
+
[{ content: "Protocolo de Autorização NF-e\n#{nProt}", align: :center }, { content: "Protocolo de Cancelamento\n#{nProtCancelamento}", align: :center }],
|
|
32
|
+
[{ content: "Data e Hora do Pedido de Cancelamento\n#{dhEvento}", align: :center }, { content: "Data e Hora do Registro de Cancelamento\n#{dhRegEvento}", align: :center }],
|
|
33
|
+
[{ content: "Justificativa", colspan: 2, align: :center, borders: [:top, :left, :right], padding: [5, 0] }],
|
|
34
|
+
[{ content: xJust, colspan: 2, align: :left, borders: [:bottom, :left, :right], padding: [5, 5], height: 100 }]
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
footer = [
|
|
38
|
+
[{ content: "Motivo", align: :center, borders: [:top, :left, :right], padding: [5, 0] }, { content: "Sequência", align: :center, borders: [:top, :left, :right], padding: [5, 0] }, { content: "Orgão", align: :center, borders: [:top, :left, :right], padding: [5, 0] }],
|
|
39
|
+
[{ content: xMotivo, align: :center, borders: [:bottom, :left, :right], padding: [5, 0] }, { content: nSeqEvento, align: :center, borders: [:bottom, :left, :right], padding: [5, 0] }, { content: cOrgao, align: :center, borders: [:bottom, :left, :right], padding: [5, 0] }]
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[header, body, footer].each { |section| doc.table(section, width: doc.bounds.width) }
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SEFAZ
|
|
4
|
+
module Webservice
|
|
5
|
+
module NFE
|
|
6
|
+
module Templates
|
|
7
|
+
# Template para Evento de Carta de Correção em PDF
|
|
8
|
+
class EventoCartaCorrecao < SEFAZ::Webservice::NFE::Templates::Base
|
|
9
|
+
|
|
10
|
+
def build(doc, hash)
|
|
11
|
+
doc.font_size 9
|
|
12
|
+
|
|
13
|
+
cnpj = hash[:procEventoNFe][:evento][:infEvento][:CNPJ].mask!("##.###.###/####-##")
|
|
14
|
+
chNFe = hash[:procEventoNFe][:evento][:infEvento][:chNFe]
|
|
15
|
+
nrNFe = chNFe[25..33].to_i
|
|
16
|
+
serie = chNFe[22..24]
|
|
17
|
+
modelo = chNFe[20..21]
|
|
18
|
+
anomes = hash[:procEventoNFe][:evento][:infEvento][:dhEvento].to_date.strftime("%m/%y")
|
|
19
|
+
nProt = hash[:procEventoNFe][:retEvento][:infEvento][:nProt]
|
|
20
|
+
dhRegEvento = hash[:procEventoNFe][:retEvento][:infEvento][:dhRegEvento].to_time.strftime("%d/%m/%Y %H:%M:%S")
|
|
21
|
+
nSeqEvento = hash[:procEventoNFe][:retEvento][:infEvento][:nSeqEvento]
|
|
22
|
+
cOrgao = hash[:procEventoNFe][:retEvento][:infEvento][:cOrgao]
|
|
23
|
+
xCorrecao = hash[:procEventoNFe][:evento][:infEvento][:detEvento][:xCorrecao]
|
|
24
|
+
xCondUso = hash[:procEventoNFe][:evento][:infEvento][:detEvento][:xCondUso]
|
|
25
|
+
chNFeBlob = Barby::PngOutputter.new(Barby::Code128C.new(chNFe)).to_png(xdim: 1, height: 40, margin: 3)
|
|
26
|
+
|
|
27
|
+
header = [
|
|
28
|
+
[{ content: "CNPJ: #{cnpj}", size: 10, align: :center, valign: :center, width: doc.bounds.width / 2 }, { content: "CCe", align: :center, font_style: :bold, size: 18, borders: [:top, :left, :right], padding: [15, 0, 0, 0], width: doc.bounds.width / 2 }],
|
|
29
|
+
[{ content: nil, borders: [:top, :left] }, { content: "CARTA DE CORREÇÃO ELETRÔNICA", size: 10, align: :center, borders: [:bottom, :left, :right], padding: [0, 0, 15, 0] }],
|
|
30
|
+
[{ content: nil, borders: [:left] }, { content: "Chave de Acesso da NFe", borders: [:top, :left, :right], padding: [5, 0, 0, 5] }],
|
|
31
|
+
[{ content: nil, borders: [:left] }, { content: chNFe, size: 10, borders: [:bottom, :left, :right], padding: [0, 0, 5, 5] }],
|
|
32
|
+
[{ content: nil, borders: [:bottom, :left] }, { image: StringIO.new(chNFeBlob), scale: 0.7, position: :center, vposition: :center }],
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
body = [
|
|
36
|
+
[{ content: "Número da Nota Fiscal", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Série", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Modelo", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Mês / Ano Emissão", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }],
|
|
37
|
+
[{ content: nrNFe.to_s, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: serie, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: modelo, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: anomes, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }],
|
|
38
|
+
[{ content: "Protocolo de Autorização - CCe", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Data de Autorização", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Sequência", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }, { content: "Orgão", padding: [5, 0, 0, 0], align: :center, borders: [:top, :left, :right] }],
|
|
39
|
+
[{ content: nProt, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: dhRegEvento, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: nSeqEvento, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }, { content: cOrgao, padding: [0, 0, 5, 0], align: :center, borders: [:bottom, :left, :right] }],
|
|
40
|
+
[{ content: "Correção:\n#{xCorrecao}", colspan: 4, padding: 5, height: 350 }],
|
|
41
|
+
[{ content: xCondUso, colspan: 4, padding: 5, size: 8, align: :justify }],
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[header, body].each do |section|
|
|
45
|
+
doc.table(section, width: doc.bounds.width)
|
|
46
|
+
doc.move_down 5
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SEFAZ
|
|
4
|
+
module Webservice
|
|
5
|
+
module NFE
|
|
6
|
+
module Templates
|
|
7
|
+
# Template para Evento de Inutilização em PDF
|
|
8
|
+
class EventoInutilizacao < SEFAZ::Webservice::NFE::Templates::Base
|
|
9
|
+
|
|
10
|
+
def build(doc, hash)
|
|
11
|
+
doc.font "Courier", style: :normal
|
|
12
|
+
doc.font_size 12
|
|
13
|
+
|
|
14
|
+
doc.text "Documento emitido por meio do software livre ruby-sefaz"
|
|
15
|
+
doc.text hash.inspect
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -9,39 +9,39 @@ module SEFAZ
|
|
|
9
9
|
|
|
10
10
|
attr_accessor :ide, :emit, :dest, :entrega, :det, :obsfiscodet, :total, :pgto, :mp, :infAdic
|
|
11
11
|
|
|
12
|
-
IDE = Struct.new(
|
|
13
|
-
EMIT = Struct.new(
|
|
14
|
-
DEST = Struct.new(
|
|
15
|
-
ENTREGA = Struct.new(
|
|
16
|
-
DET = Struct.new(
|
|
17
|
-
PROD = Struct.new(
|
|
18
|
-
OBSFISCODET = Struct.new(
|
|
19
|
-
IMPOSTO = Struct.new(
|
|
20
|
-
ICMS = Struct.new(
|
|
21
|
-
ICMS00 = Struct.new(
|
|
22
|
-
ICMS40 = Struct.new(
|
|
23
|
-
ICMSSN102 = Struct.new(
|
|
24
|
-
ICMSSN900 = Struct.new(
|
|
25
|
-
PIS = Struct.new(
|
|
26
|
-
PISAliq = Struct.new(
|
|
27
|
-
PISQtde = Struct.new(
|
|
28
|
-
PISNT = Struct.new(
|
|
29
|
-
PISSN = Struct.new(
|
|
30
|
-
PISOutr = Struct.new(
|
|
31
|
-
PISST = Struct.new(
|
|
32
|
-
COFINS = Struct.new(
|
|
33
|
-
COFINSAliq = Struct.new(
|
|
34
|
-
COFINSQtde = Struct.new(
|
|
35
|
-
COFINSNT = Struct.new(
|
|
36
|
-
COFINSSN = Struct.new(
|
|
37
|
-
COFINSOutr = Struct.new(
|
|
38
|
-
COFINSST = Struct.new(
|
|
39
|
-
ISSQN = Struct.new(
|
|
40
|
-
TOTAL = Struct.new(
|
|
41
|
-
DescAcrEntr = Struct.new(
|
|
42
|
-
PGTO = Struct.new(
|
|
43
|
-
MP = Struct.new(
|
|
44
|
-
INFADIC = Struct.new(
|
|
12
|
+
IDE = Struct.new(:CNPJ, :signAC, :numeroCaixa)
|
|
13
|
+
EMIT = Struct.new(:CNPJ, :IE, :IM, :cRegTribISSQN, :indRatISSQN)
|
|
14
|
+
DEST = Struct.new(:CNPJ, :CPF, :xNome)
|
|
15
|
+
ENTREGA = Struct.new(:xLgr, :nro, :xCpl, :xBairro, :xMun, :UF)
|
|
16
|
+
DET = Struct.new(:@nItem, :prod, :imposto, :infAdProd)
|
|
17
|
+
PROD = Struct.new(:cProd, :cEAN, :xProd, :NCM, :CEST, :CFOP, :uCom, :qCom, :vUnCom, :indRegra, :vDesc, :vOutro, :obsFiscoDet, :cANP)
|
|
18
|
+
OBSFISCODET = Struct.new(:xCampoDet, :xTextoDet)
|
|
19
|
+
IMPOSTO = Struct.new(:vItem12741, :ICMS, :PIS, :PISST, :COFINS, :COFINSST, :ISSQN)
|
|
20
|
+
ICMS = Struct.new(:ICMS00, :ICMS40, :ICMSSN102, :ICMSSN900)
|
|
21
|
+
ICMS00 = Struct.new(:Orig, :CST, :pICMS)
|
|
22
|
+
ICMS40 = Struct.new(:Orig, :CST)
|
|
23
|
+
ICMSSN102 = Struct.new(:Orig, :CSOSN)
|
|
24
|
+
ICMSSN900 = Struct.new(:Orig, :CSOSN, :pICMS)
|
|
25
|
+
PIS = Struct.new(:PISAliq, :PISQtde, :PISNT, :PISSN, :PISOutr)
|
|
26
|
+
PISAliq = Struct.new(:CST, :vBC, :pPIS)
|
|
27
|
+
PISQtde = Struct.new(:CST, :qBCProd, :vAliqProd)
|
|
28
|
+
PISNT = Struct.new(:CST)
|
|
29
|
+
PISSN = Struct.new(:CST)
|
|
30
|
+
PISOutr = Struct.new(:CST, :vBC, :pPIS, :qBCProd, :vAliqProd)
|
|
31
|
+
PISST = Struct.new(:vBC, :pPIS, :qBCProd, :vAliqProd)
|
|
32
|
+
COFINS = Struct.new(:COFINSAliq, :COFINSQtde, :COFINSNT, :COFINSSN, :COFINSOutr)
|
|
33
|
+
COFINSAliq = Struct.new(:CST, :vBC, :pCOFINS)
|
|
34
|
+
COFINSQtde = Struct.new(:CST, :qBCProd, :vAliqProd)
|
|
35
|
+
COFINSNT = Struct.new(:CST)
|
|
36
|
+
COFINSSN = Struct.new(:CST)
|
|
37
|
+
COFINSOutr = Struct.new(:CST, :vBC, :pCOFINS, :qBCProd, :vAliqProd)
|
|
38
|
+
COFINSST = Struct.new(:vBC, :pCOFINS, :qBCProd, :vAliqProd)
|
|
39
|
+
ISSQN = Struct.new(:vDeducISSQN, :vAliq, :cMunFG, :cListServ, :cServTribMun, :cNatOp, :indIncFisc)
|
|
40
|
+
TOTAL = Struct.new(:DescAcrEntr, :vCFeLei12741)
|
|
41
|
+
DescAcrEntr = Struct.new(:vDescSubtot, :vAcresSubtot)
|
|
42
|
+
PGTO = Struct.new(:MP)
|
|
43
|
+
MP = Struct.new(:cMP, :vMP, :cAdmC, :cAut)
|
|
44
|
+
INFADIC = Struct.new(:infCpl)
|
|
45
45
|
|
|
46
46
|
def initialize
|
|
47
47
|
@versaoDadosEnt = "0.08"
|
|
@@ -129,7 +129,7 @@ module SEFAZ
|
|
|
129
129
|
def save(part_name)
|
|
130
130
|
case part_name
|
|
131
131
|
when "DET"
|
|
132
|
-
if @det.is_a?(
|
|
132
|
+
if @det.is_a?(DET)
|
|
133
133
|
item = @det
|
|
134
134
|
item.prod = item.prod.to_h
|
|
135
135
|
item.imposto.ICMS.ICMS00 = item.imposto.ICMS.ICMS00.to_h
|
|
@@ -157,11 +157,11 @@ module SEFAZ
|
|
|
157
157
|
@listas[:det].push(item.to_h)
|
|
158
158
|
end
|
|
159
159
|
when "OBSFISCODET"
|
|
160
|
-
if @det.is_a?(
|
|
160
|
+
if @det.is_a?(DET) && @obsfiscodet.is_a?(OBSFISCODET)
|
|
161
161
|
@det.prod.obsFiscoDet.push(@obsfiscodet.to_h)
|
|
162
162
|
end
|
|
163
163
|
when "MP"
|
|
164
|
-
if @pgto.is_a?(
|
|
164
|
+
if @pgto.is_a?(PGTO) && @mp.is_a?(MP)
|
|
165
165
|
@pgto.MP.push(@mp.to_h)
|
|
166
166
|
end
|
|
167
167
|
end
|
data/lib/sefaz.rb
CHANGED
|
@@ -9,6 +9,8 @@ require 'barby'
|
|
|
9
9
|
require 'barby/barcode/code_128'
|
|
10
10
|
require 'barby/barcode/qr_code'
|
|
11
11
|
require 'barby/outputter/prawn_outputter'
|
|
12
|
+
require 'barby/outputter/png_outputter'
|
|
13
|
+
require 'br_danfe'
|
|
12
14
|
|
|
13
15
|
require 'sefaz/base'
|
|
14
16
|
require 'sefaz/configuration'
|
|
@@ -22,6 +24,10 @@ require 'sefaz/utils/signer'
|
|
|
22
24
|
require 'sefaz/webservice/base'
|
|
23
25
|
|
|
24
26
|
require 'sefaz/webservice/nfe/client'
|
|
27
|
+
require 'sefaz/webservice/nfe/templates/base'
|
|
28
|
+
require 'sefaz/webservice/nfe/templates/evento_cancelamento'
|
|
29
|
+
require 'sefaz/webservice/nfe/templates/evento_carta_correcao'
|
|
30
|
+
require 'sefaz/webservice/nfe/templates/evento_inutilizacao'
|
|
25
31
|
require 'sefaz/webservice/nfe/auditor'
|
|
26
32
|
require 'sefaz/webservice/nfe/connection'
|
|
27
33
|
require 'sefaz/webservice/nfe/dataset'
|
data/sefaz.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = "Integração com a Secretaria da Fazenda (SEFAZ)."
|
|
12
12
|
spec.homepage = "https://github.com/henriqueshiraishi/ruby-sefaz"
|
|
13
13
|
spec.license = "MIT"
|
|
14
|
-
spec.required_ruby_version = ">= 2.
|
|
14
|
+
spec.required_ruby_version = ">= 2.7.8"
|
|
15
15
|
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
17
|
spec.metadata["source_code_uri"] = "https://github.com/henriqueshiraishi/ruby-sefaz"
|
|
@@ -31,8 +31,9 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
# Uncomment to register a new dependency of your gem
|
|
32
32
|
spec.add_dependency "savon", "~> 2.13.0"
|
|
33
33
|
spec.add_dependency "prawn", "~> 2.4.0"
|
|
34
|
-
spec.add_dependency "barby", "~> 0.6.
|
|
35
|
-
spec.add_dependency "rqrcode", "~>
|
|
34
|
+
spec.add_dependency "barby", "~> 0.6.8"
|
|
35
|
+
spec.add_dependency "rqrcode", "~> 2.1.0"
|
|
36
|
+
spec.add_dependency "br_danfe", "~> 0.17.8"
|
|
36
37
|
|
|
37
38
|
# For more information and examples about making a new gem, check out our
|
|
38
39
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sefaz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henrique Shiraishi
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: savon
|
|
@@ -44,35 +44,50 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.6.
|
|
47
|
+
version: 0.6.8
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.6.
|
|
54
|
+
version: 0.6.8
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rqrcode
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 2.1.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
69
|
-
|
|
68
|
+
version: 2.1.0
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: br_danfe
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.17.8
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.17.8
|
|
83
|
+
description:
|
|
70
84
|
email:
|
|
71
85
|
- henriqueashiraishi@gmail.com
|
|
72
86
|
executables: []
|
|
73
87
|
extensions: []
|
|
74
88
|
extra_rdoc_files: []
|
|
75
89
|
files:
|
|
90
|
+
- ".ruby-version"
|
|
76
91
|
- CHANGELOG.md
|
|
77
92
|
- Gemfile
|
|
78
93
|
- Gemfile.lock
|
|
@@ -92,6 +107,7 @@ files:
|
|
|
92
107
|
- docs/NFe-NFCe/Manual de Orientação ao Contribuinte - MOC - versão 7.0 - NF-e e NFC-e.pdf
|
|
93
108
|
- docs/NFe-NFCe/_dataset.md
|
|
94
109
|
- lib/sefaz.rb
|
|
110
|
+
- lib/sefaz/assets/NFe_logo.png
|
|
95
111
|
- lib/sefaz/base.rb
|
|
96
112
|
- lib/sefaz/configuration.rb
|
|
97
113
|
- lib/sefaz/exception.rb
|
|
@@ -105,6 +121,10 @@ files:
|
|
|
105
121
|
- lib/sefaz/webservice/nfe/client.rb
|
|
106
122
|
- lib/sefaz/webservice/nfe/connection.rb
|
|
107
123
|
- lib/sefaz/webservice/nfe/dataset.rb
|
|
124
|
+
- lib/sefaz/webservice/nfe/templates/base.rb
|
|
125
|
+
- lib/sefaz/webservice/nfe/templates/evento_cancelamento.rb
|
|
126
|
+
- lib/sefaz/webservice/nfe/templates/evento_carta_correcao.rb
|
|
127
|
+
- lib/sefaz/webservice/nfe/templates/evento_inutilizacao.rb
|
|
108
128
|
- lib/sefaz/webservice/nfe/validator.rb
|
|
109
129
|
- lib/sefaz/webservice/nfe/wsdl.rb
|
|
110
130
|
- lib/sefaz/webservice/sat/client.rb
|
|
@@ -122,7 +142,7 @@ metadata:
|
|
|
122
142
|
homepage_uri: https://github.com/henriqueshiraishi/ruby-sefaz
|
|
123
143
|
source_code_uri: https://github.com/henriqueshiraishi/ruby-sefaz
|
|
124
144
|
changelog_uri: https://github.com/henriqueshiraishi/ruby-sefaz/blob/main/CHANGELOG.md
|
|
125
|
-
post_install_message:
|
|
145
|
+
post_install_message:
|
|
126
146
|
rdoc_options: []
|
|
127
147
|
require_paths:
|
|
128
148
|
- lib
|
|
@@ -130,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
130
150
|
requirements:
|
|
131
151
|
- - ">="
|
|
132
152
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 2.
|
|
153
|
+
version: 2.7.8
|
|
134
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
155
|
requirements:
|
|
136
156
|
- - ">="
|
|
@@ -138,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
138
158
|
version: '0'
|
|
139
159
|
requirements: []
|
|
140
160
|
rubygems_version: 3.1.6
|
|
141
|
-
signing_key:
|
|
161
|
+
signing_key:
|
|
142
162
|
specification_version: 4
|
|
143
163
|
summary: Integração com a Secretaria da Fazenda (SEFAZ).
|
|
144
164
|
test_files: []
|