@alexssmusica/node-pdf-nfe 1.0.62 → 1.1.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.
- package/README.md +22 -21
- package/lib/application/helpers/generate-pdf/nfe/campo.js +1 -15
- package/lib/application/helpers/generate-pdf/nfe/cria-layout.js +1 -144
- package/lib/application/helpers/generate-pdf/nfe/default.js +1 -27
- package/lib/application/helpers/generate-pdf/nfe/gerar-itens.js +1 -276
- package/lib/application/helpers/generate-pdf/nfe/get-dados-adicionais.js +1 -54
- package/lib/application/helpers/generate-pdf/nfe/get-dados-emitente.js +1 -310
- package/lib/application/helpers/generate-pdf/nfe/get-destinatario-remetente.js +1 -124
- package/lib/application/helpers/generate-pdf/nfe/get-fatura-duplicata.js +1 -62
- package/lib/application/helpers/generate-pdf/nfe/get-homologacao.js +1 -25
- package/lib/application/helpers/generate-pdf/nfe/get-imposto.js +1 -220
- package/lib/application/helpers/generate-pdf/nfe/get-iss.js +1 -64
- package/lib/application/helpers/generate-pdf/nfe/get-menu-itens.js +1 -200
- package/lib/application/helpers/generate-pdf/nfe/get-recibo.js +1 -103
- package/lib/application/helpers/generate-pdf/nfe/get-transporte.js +1 -144
- package/lib/application/helpers/generate-pdf/nfe/italico.js +1 -16
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal-tracejada.js +1 -9
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal.js +1 -17
- package/lib/application/helpers/generate-pdf/nfe/linha-vertical.js +1 -11
- package/lib/application/helpers/generate-pdf/nfe/load-fontes.js +1 -32
- package/lib/application/helpers/generate-pdf/nfe/negrito.js +1 -16
- package/lib/application/helpers/generate-pdf/nfe/normal.js +1 -16
- package/lib/application/helpers/generate-pdf/nfe/options-doc.js +1 -15
- package/lib/application/helpers/generate-pdf/nfe/secao.js +1 -17
- package/lib/application/helpers/generate-pdf/nfe/titulo.js +1 -17
- package/lib/application/helpers/xml/deserialize.js +1 -26
- package/lib/application/helpers/xml/index.js +1 -18
- package/lib/domain/use-cases/pdf/index.js +1 -27
- package/lib/domain/use-cases/pdf/pdf-NFCe.js +1 -689
- package/lib/domain/use-cases/pdf/pdf-NFe.js +1 -44
- package/lib/domain/use-cases/utils/data-atual.js +1 -13
- package/lib/domain/use-cases/utils/index.js +1 -19
- package/lib/domain/use-cases/utils/intl-number-format.js +1 -8
- package/lib/index.js +1 -6
- package/lib/types/generate-pdf.d.ts +244 -0
- package/lib/types/generate-pdf.js +1 -0
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +1 -21
- package/lib/types/nfe-proc.d.ts +42 -0
- package/lib/types/nfe-proc.js +1 -0
- package/lib/types/schema.d.ts +875 -0
- package/lib/types/schema.js +1 -0
- package/package.json +62 -57
- package/lib/application/helpers/generate-pdf/nfe/campo.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/cria-layout.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/default.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/gerar-itens.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-dados-adicionais.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-dados-emitente.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-destinatario-remetente.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-fatura-duplicata.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-homologacao.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-imposto.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-iss.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-menu-itens.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-recibo.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/get-transporte.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/italico.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal-tracejada.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-vertical.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/load-fontes.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/negrito.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/normal.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/options-doc.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/secao.js.map +0 -1
- package/lib/application/helpers/generate-pdf/nfe/titulo.js.map +0 -1
- package/lib/application/helpers/xml/deserialize.js.map +0 -1
- package/lib/application/helpers/xml/index.js.map +0 -1
- package/lib/domain/use-cases/pdf/index.js.map +0 -1
- package/lib/domain/use-cases/pdf/pdf-NFCe.js.map +0 -1
- package/lib/domain/use-cases/pdf/pdf-NFe.js.map +0 -1
- package/lib/domain/use-cases/utils/data-atual.js.map +0 -1
- package/lib/domain/use-cases/utils/index.js.map +0 -1
- package/lib/domain/use-cases/utils/intl-number-format.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
# @alexssmusica/node-pdf-nfe
|
|
2
|
-
Biblioteca para geração Danfe NF-e/NFC-e em aplicações node.js
|
|
3
|
-
|
|
4
|
-
## Instalação
|
|
5
|
-
|
|
6
|
-
```
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
doc
|
|
21
|
-
|
|
1
|
+
# @alexssmusica/node-pdf-nfe
|
|
2
|
+
Biblioteca para geração Danfe NF-e/NFC-e em aplicações node.js
|
|
3
|
+
|
|
4
|
+
## Instalação
|
|
5
|
+
Basta instalar através dos comandos
|
|
6
|
+
```bash
|
|
7
|
+
npm install @alexssmusica/node-pdf-nfe
|
|
8
|
+
```
|
|
9
|
+
```bash
|
|
10
|
+
yarn add @alexssmusica/node-pdf-nfe
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Exemplo
|
|
14
|
+
```javascript
|
|
15
|
+
import { gerarPDF } from '@alexssmusica/node-pdf-nfe';
|
|
16
|
+
import fs from 'fs';
|
|
17
|
+
|
|
18
|
+
const xml = fs.readFileSync('/path/to/file.xml').toString();
|
|
19
|
+
const logo = '/path/to/logo';
|
|
20
|
+
const doc = await gerarPDF(xml, logo);
|
|
21
|
+
doc.pipe(fs.createWriteStream('/path/to/file.pdf'));
|
|
22
|
+
```
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.campo = void 0;
|
|
4
|
-
const default_1 = require("./default");
|
|
5
|
-
function campo({ ajusteX, ajusteY, doc, largura, margemEsquerda, margemTopo, value, x, y, alinhamento, tamanho }) {
|
|
6
|
-
doc.font('negrito')
|
|
7
|
-
.fillColor(default_1.DEFAULT_NFE.corDoCampo)
|
|
8
|
-
.fontSize(tamanho ?? default_1.DEFAULT_NFE.tamanhoDaFonteDoCampo)
|
|
9
|
-
.text(value, margemEsquerda + ajusteX + x, margemTopo + ajusteY + y, {
|
|
10
|
-
width: largura,
|
|
11
|
-
align: alinhamento ?? default_1.DEFAULT_NFE.alinhamentoDoCampo
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
exports.campo = campo;
|
|
15
|
-
//# sourceMappingURL=campo.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.campo=void 0;const default_1=require("./default");function campo({ajusteX:a,ajusteY:b,doc:c,largura:d,margemEsquerda:e,margemTopo:f,value:g,x:h,y:i,alinhamento:j,tamanho:k}){c.font("negrito").fillColor(default_1.DEFAULT_NFE.corDoCampo).fontSize(k??default_1.DEFAULT_NFE.tamanhoDaFonteDoCampo).text(g,e+a+h,f+b+i,{width:d,align:j??default_1.DEFAULT_NFE.alinhamentoDoCampo})}exports.campo=campo;
|
|
@@ -1,144 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.criaLayout = void 0;
|
|
4
|
-
const default_1 = require("./default");
|
|
5
|
-
const get_dados_adicionais_1 = require("./get-dados-adicionais");
|
|
6
|
-
const get_dados_emitente_1 = require("./get-dados-emitente");
|
|
7
|
-
const get_destinatario_remetente_1 = require("./get-destinatario-remetente");
|
|
8
|
-
const get_fatura_duplicata_1 = require("./get-fatura-duplicata");
|
|
9
|
-
const get_homologacao_1 = require("./get-homologacao");
|
|
10
|
-
const get_imposto_1 = require("./get-imposto");
|
|
11
|
-
const get_iss_1 = require("./get-iss");
|
|
12
|
-
const get_menu_itens_1 = require("./get-menu-itens");
|
|
13
|
-
const get_recibo_1 = require("./get-recibo");
|
|
14
|
-
const get_transporte_1 = require("./get-transporte");
|
|
15
|
-
async function criaLayout({ pathLogo, nf, ajusteX, ajusteY, doc, margemEsquerda, margemTopo, larguraDoFormulario, margemDireita, folha }) {
|
|
16
|
-
const { dest, emit, ide, infAdic, total, transp, cobr } = nf.NFe.infNFe;
|
|
17
|
-
let y = 0;
|
|
18
|
-
const finalEspacoDet = folha === 0 ? default_1.DEFAULT_NFE.finalTamanhoDet1 : default_1.DEFAULT_NFE.finalTamanhoDetDemais;
|
|
19
|
-
if (ide.tpAmb === '2') {
|
|
20
|
-
(0, get_homologacao_1.getHomologacao)({
|
|
21
|
-
ajusteX,
|
|
22
|
-
ajusteY,
|
|
23
|
-
doc,
|
|
24
|
-
margemEsquerda,
|
|
25
|
-
margemTopo,
|
|
26
|
-
larguraDoFormulario,
|
|
27
|
-
protNFe: nf.protNFe
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (folha === 0) {
|
|
31
|
-
y = (0, get_recibo_1.getRecibo)({
|
|
32
|
-
y,
|
|
33
|
-
ajusteX,
|
|
34
|
-
ajusteY,
|
|
35
|
-
dest,
|
|
36
|
-
doc,
|
|
37
|
-
emit,
|
|
38
|
-
larguraDoFormulario,
|
|
39
|
-
margemDireita,
|
|
40
|
-
margemEsquerda,
|
|
41
|
-
margemTopo,
|
|
42
|
-
total,
|
|
43
|
-
ide
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
await (0, get_dados_emitente_1.getDadosEmitente)({
|
|
47
|
-
ajusteX,
|
|
48
|
-
ajusteY,
|
|
49
|
-
doc,
|
|
50
|
-
emit,
|
|
51
|
-
larguraDoFormulario,
|
|
52
|
-
margemDireita,
|
|
53
|
-
margemEsquerda,
|
|
54
|
-
margemTopo,
|
|
55
|
-
protNFe: nf.protNFe,
|
|
56
|
-
y,
|
|
57
|
-
pathLogo,
|
|
58
|
-
ide,
|
|
59
|
-
folha
|
|
60
|
-
});
|
|
61
|
-
y = (0, get_destinatario_remetente_1.getDestinatarioRemetente)({
|
|
62
|
-
ajusteX,
|
|
63
|
-
ajusteY,
|
|
64
|
-
dest,
|
|
65
|
-
doc,
|
|
66
|
-
larguraDoFormulario,
|
|
67
|
-
margemDireita,
|
|
68
|
-
margemEsquerda,
|
|
69
|
-
margemTopo,
|
|
70
|
-
y: doc.y,
|
|
71
|
-
ide
|
|
72
|
-
});
|
|
73
|
-
if (folha === 0) {
|
|
74
|
-
y = (0, get_fatura_duplicata_1.getFaturaDuplicata)({
|
|
75
|
-
ajusteX,
|
|
76
|
-
ajusteY,
|
|
77
|
-
doc,
|
|
78
|
-
larguraDoFormulario,
|
|
79
|
-
margemDireita,
|
|
80
|
-
margemEsquerda,
|
|
81
|
-
margemTopo,
|
|
82
|
-
cobr,
|
|
83
|
-
y
|
|
84
|
-
});
|
|
85
|
-
y = (0, get_imposto_1.getImposto)({
|
|
86
|
-
ajusteX,
|
|
87
|
-
ajusteY,
|
|
88
|
-
doc,
|
|
89
|
-
larguraDoFormulario,
|
|
90
|
-
margemDireita,
|
|
91
|
-
margemEsquerda,
|
|
92
|
-
margemTopo,
|
|
93
|
-
total,
|
|
94
|
-
y
|
|
95
|
-
});
|
|
96
|
-
y = (0, get_transporte_1.getTransporte)({
|
|
97
|
-
ajusteX,
|
|
98
|
-
ajusteY,
|
|
99
|
-
doc,
|
|
100
|
-
larguraDoFormulario,
|
|
101
|
-
margemDireita,
|
|
102
|
-
margemEsquerda,
|
|
103
|
-
margemTopo,
|
|
104
|
-
transp,
|
|
105
|
-
y
|
|
106
|
-
});
|
|
107
|
-
y = (0, get_iss_1.getIss)({
|
|
108
|
-
ajusteX,
|
|
109
|
-
ajusteY,
|
|
110
|
-
doc,
|
|
111
|
-
emit,
|
|
112
|
-
larguraDoFormulario,
|
|
113
|
-
margemDireita,
|
|
114
|
-
margemEsquerda,
|
|
115
|
-
margemTopo,
|
|
116
|
-
total,
|
|
117
|
-
y
|
|
118
|
-
});
|
|
119
|
-
(0, get_dados_adicionais_1.getDadosAdicionais)({
|
|
120
|
-
ajusteX,
|
|
121
|
-
ajusteY,
|
|
122
|
-
doc,
|
|
123
|
-
infAdic,
|
|
124
|
-
larguraDoFormulario,
|
|
125
|
-
margemDireita,
|
|
126
|
-
margemEsquerda,
|
|
127
|
-
margemTopo,
|
|
128
|
-
finalEspacoDet
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
y = (0, get_menu_itens_1.getMenuItens)({
|
|
132
|
-
ajusteX,
|
|
133
|
-
ajusteY,
|
|
134
|
-
doc,
|
|
135
|
-
margemEsquerda,
|
|
136
|
-
margemTopo,
|
|
137
|
-
y,
|
|
138
|
-
margemDireita,
|
|
139
|
-
finalEspacoDet,
|
|
140
|
-
larguraDoFormulario
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
exports.criaLayout = criaLayout;
|
|
144
|
-
//# sourceMappingURL=cria-layout.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.criaLayout=void 0;const default_1=require("./default"),get_dados_adicionais_1=require("./get-dados-adicionais"),get_dados_emitente_1=require("./get-dados-emitente"),get_destinatario_remetente_1=require("./get-destinatario-remetente"),get_fatura_duplicata_1=require("./get-fatura-duplicata"),get_homologacao_1=require("./get-homologacao"),get_imposto_1=require("./get-imposto"),get_iss_1=require("./get-iss"),get_menu_itens_1=require("./get-menu-itens"),get_recibo_1=require("./get-recibo"),get_transporte_1=require("./get-transporte");async function criaLayout({pathLogo:a,nf:b,ajusteX:c,ajusteY:d,doc:e,margemEsquerda:f,margemTopo:g,larguraDoFormulario:h,margemDireita:i,folha:j}){const{dest:k,emit:l,ide:m,infAdic:n,total:o,transp:p,cobr:q}=b.NFe.infNFe;let r=0;const s=0===j?default_1.DEFAULT_NFE.finalTamanhoDet1:default_1.DEFAULT_NFE.finalTamanhoDetDemais;"2"===m.tpAmb&&(0,get_homologacao_1.getHomologacao)({ajusteX:c,ajusteY:d,doc:e,margemEsquerda:f,margemTopo:g,larguraDoFormulario:h,protNFe:b.protNFe}),0===j&&(r=(0,get_recibo_1.getRecibo)({y:r,ajusteX:c,ajusteY:d,dest:k,doc:e,emit:l,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,total:o,ide:m})),await(0,get_dados_emitente_1.getDadosEmitente)({ajusteX:c,ajusteY:d,doc:e,emit:l,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,protNFe:b.protNFe,y:r,pathLogo:a,ide:m,folha:j}),r=(0,get_destinatario_remetente_1.getDestinatarioRemetente)({ajusteX:c,ajusteY:d,dest:k,doc:e,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,y:e.y,ide:m}),0===j&&(r=(0,get_fatura_duplicata_1.getFaturaDuplicata)({ajusteX:c,ajusteY:d,doc:e,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,cobr:q,y:r}),r=(0,get_imposto_1.getImposto)({ajusteX:c,ajusteY:d,doc:e,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,total:o,y:r}),r=(0,get_transporte_1.getTransporte)({ajusteX:c,ajusteY:d,doc:e,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,transp:p,y:r}),r=(0,get_iss_1.getIss)({ajusteX:c,ajusteY:d,doc:e,emit:l,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,total:o,y:r}),(0,get_dados_adicionais_1.getDadosAdicionais)({ajusteX:c,ajusteY:d,doc:e,infAdic:n,larguraDoFormulario:h,margemDireita:i,margemEsquerda:f,margemTopo:g,finalEspacoDet:s})),r=(0,get_menu_itens_1.getMenuItens)({ajusteX:c,ajusteY:d,doc:e,margemEsquerda:f,margemTopo:g,y:r,margemDireita:i,finalEspacoDet:s,larguraDoFormulario:h})}exports.criaLayout=criaLayout;
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_NFE = void 0;
|
|
4
|
-
exports.DEFAULT_NFE = {
|
|
5
|
-
larguraDaPagina: 595.44,
|
|
6
|
-
alturaDaPagina: 841.68,
|
|
7
|
-
tamanhoDaFonteDoTitulo: 6,
|
|
8
|
-
corDoTitulo: 'black',
|
|
9
|
-
alinhamentoDoTitulo: 'left',
|
|
10
|
-
alinhamentoDoTituloDaTabela: 'center',
|
|
11
|
-
tamanhoDaFonteDaSecao: 7,
|
|
12
|
-
corDaSecao: 'black',
|
|
13
|
-
tamanhoDaFonteDoCampo: 9.5,
|
|
14
|
-
alinhamentoDoCampo: 'center',
|
|
15
|
-
corDoCampo: 'black',
|
|
16
|
-
tamanhoDaFonteDosItens: 7,
|
|
17
|
-
separadorDeItens: true,
|
|
18
|
-
ajusteYDoLogotipo: 0,
|
|
19
|
-
ajusteYDaIdentificacaoDoEmitente: 0,
|
|
20
|
-
opacidadeDaHomologacao: 0.4,
|
|
21
|
-
ajusteYDaHomologacao: 275,
|
|
22
|
-
tamanhoDoCodigoDeBarras: 32,
|
|
23
|
-
corDoLayout: 'black',
|
|
24
|
-
finalTamanhoDet1: 752,
|
|
25
|
-
finalTamanhoDetDemais: 822
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=default.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_NFE=void 0,exports.DEFAULT_NFE={larguraDaPagina:595.44,alturaDaPagina:841.68,tamanhoDaFonteDoTitulo:6,corDoTitulo:"black",alinhamentoDoTitulo:"left",alinhamentoDoTituloDaTabela:"center",tamanhoDaFonteDaSecao:7,corDaSecao:"black",tamanhoDaFonteDoCampo:9.5,alinhamentoDoCampo:"center",corDoCampo:"black",tamanhoDaFonteDosItens:7,separadorDeItens:!0,ajusteYDoLogotipo:0,ajusteYDaIdentificacaoDoEmitente:0,opacidadeDaHomologacao:.4,ajusteYDaHomologacao:275,tamanhoDoCodigoDeBarras:32,corDoLayout:"black",finalTamanhoDet1:752,finalTamanhoDetDemais:822};
|
|
@@ -1,276 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gerarItens = void 0;
|
|
4
|
-
const utils_1 = require("../../../../domain/use-cases/utils");
|
|
5
|
-
const cria_layout_1 = require("./cria-layout");
|
|
6
|
-
const default_1 = require("./default");
|
|
7
|
-
const linha_horizontal_tracejada_1 = require("./linha-horizontal-tracejada");
|
|
8
|
-
const normal_1 = require("./normal");
|
|
9
|
-
const options_doc_1 = require("./options-doc");
|
|
10
|
-
async function gerarItens({ nf, ajusteX, ajusteY, doc, margemEsquerda, margemTopo, margemDireita, larguraDoFormulario, pathLogo }) {
|
|
11
|
-
let folha = 0;
|
|
12
|
-
await (0, cria_layout_1.criaLayout)({
|
|
13
|
-
ajusteX,
|
|
14
|
-
ajusteY,
|
|
15
|
-
nf,
|
|
16
|
-
doc,
|
|
17
|
-
larguraDoFormulario,
|
|
18
|
-
margemDireita,
|
|
19
|
-
margemEsquerda,
|
|
20
|
-
margemTopo,
|
|
21
|
-
pathLogo,
|
|
22
|
-
folha
|
|
23
|
-
});
|
|
24
|
-
let maiorY = doc.y;
|
|
25
|
-
for (let i = 0; i < nf.NFe.infNFe.det.length; i++) {
|
|
26
|
-
const item = nf.NFe.infNFe.det[i];
|
|
27
|
-
function renderizarLinha(pdf) {
|
|
28
|
-
const y = maiorY + 2;
|
|
29
|
-
(0, normal_1.normal)({
|
|
30
|
-
doc,
|
|
31
|
-
value: item.prod.cProd,
|
|
32
|
-
x: 1.5,
|
|
33
|
-
y,
|
|
34
|
-
largura: 51,
|
|
35
|
-
alinhamento: 'center',
|
|
36
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
37
|
-
ajusteX,
|
|
38
|
-
ajusteY,
|
|
39
|
-
margemEsquerda,
|
|
40
|
-
margemTopo
|
|
41
|
-
});
|
|
42
|
-
(0, normal_1.normal)({
|
|
43
|
-
doc,
|
|
44
|
-
value: item.prod.xProd,
|
|
45
|
-
x: 55.5,
|
|
46
|
-
y,
|
|
47
|
-
largura: 178,
|
|
48
|
-
alinhamento: 'justify',
|
|
49
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
50
|
-
ajusteX,
|
|
51
|
-
ajusteY,
|
|
52
|
-
margemEsquerda,
|
|
53
|
-
margemTopo
|
|
54
|
-
});
|
|
55
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
56
|
-
(0, normal_1.normal)({
|
|
57
|
-
doc,
|
|
58
|
-
value: item.prod.NCM,
|
|
59
|
-
x: 235.5,
|
|
60
|
-
y,
|
|
61
|
-
largura: 32.5,
|
|
62
|
-
alinhamento: 'center',
|
|
63
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
64
|
-
ajusteX,
|
|
65
|
-
ajusteY,
|
|
66
|
-
margemEsquerda,
|
|
67
|
-
margemTopo
|
|
68
|
-
});
|
|
69
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
70
|
-
(0, normal_1.normal)({
|
|
71
|
-
doc,
|
|
72
|
-
value: item.prod.CFOP,
|
|
73
|
-
x: 293.5,
|
|
74
|
-
y,
|
|
75
|
-
largura: 21,
|
|
76
|
-
alinhamento: 'center',
|
|
77
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
78
|
-
ajusteX,
|
|
79
|
-
ajusteY,
|
|
80
|
-
margemEsquerda,
|
|
81
|
-
margemTopo
|
|
82
|
-
});
|
|
83
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
84
|
-
(0, normal_1.normal)({
|
|
85
|
-
doc,
|
|
86
|
-
value: item.prod.uCom,
|
|
87
|
-
x: 315.5,
|
|
88
|
-
y,
|
|
89
|
-
largura: 16.5,
|
|
90
|
-
alinhamento: 'center',
|
|
91
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
92
|
-
ajusteX,
|
|
93
|
-
ajusteY,
|
|
94
|
-
margemEsquerda,
|
|
95
|
-
margemTopo
|
|
96
|
-
});
|
|
97
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
98
|
-
(0, normal_1.normal)({
|
|
99
|
-
doc,
|
|
100
|
-
value: (0, utils_1.formatMoney)(item.prod.qCom, 4),
|
|
101
|
-
x: 335,
|
|
102
|
-
y,
|
|
103
|
-
largura: 37,
|
|
104
|
-
alinhamento: 'center',
|
|
105
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
106
|
-
ajusteX,
|
|
107
|
-
ajusteY,
|
|
108
|
-
margemEsquerda,
|
|
109
|
-
margemTopo
|
|
110
|
-
});
|
|
111
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
112
|
-
(0, normal_1.normal)({
|
|
113
|
-
doc,
|
|
114
|
-
value: (0, utils_1.formatMoney)(item.prod.vUnCom, 2),
|
|
115
|
-
x: 375,
|
|
116
|
-
y,
|
|
117
|
-
largura: 32.5,
|
|
118
|
-
alinhamento: 'center',
|
|
119
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
120
|
-
ajusteX,
|
|
121
|
-
ajusteY,
|
|
122
|
-
margemEsquerda,
|
|
123
|
-
margemTopo
|
|
124
|
-
});
|
|
125
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
126
|
-
(0, normal_1.normal)({
|
|
127
|
-
doc,
|
|
128
|
-
value: (0, utils_1.formatMoney)(item.prod.vProd, 2),
|
|
129
|
-
x: 409.5,
|
|
130
|
-
y,
|
|
131
|
-
largura: 31,
|
|
132
|
-
alinhamento: 'center',
|
|
133
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
134
|
-
ajusteX,
|
|
135
|
-
ajusteY,
|
|
136
|
-
margemEsquerda,
|
|
137
|
-
margemTopo
|
|
138
|
-
});
|
|
139
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
140
|
-
const keys = Object.keys(item.imposto);
|
|
141
|
-
for (let i = 0; i < keys.length; i++) {
|
|
142
|
-
if (keys[i].includes('ICMS') && !keys[i].includes('UFDest')) {
|
|
143
|
-
const newKeys = Object.keys(item.imposto[keys[i]]);
|
|
144
|
-
(0, normal_1.normal)({
|
|
145
|
-
doc,
|
|
146
|
-
value: item.imposto[keys[i]][newKeys[0]].CST
|
|
147
|
-
? `${item.imposto[keys[i]][newKeys[0]].orig}${item.imposto[keys[i]][newKeys[0]].CST}`
|
|
148
|
-
: '',
|
|
149
|
-
x: 270,
|
|
150
|
-
y,
|
|
151
|
-
largura: 21,
|
|
152
|
-
alinhamento: 'center',
|
|
153
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
154
|
-
ajusteX,
|
|
155
|
-
ajusteY,
|
|
156
|
-
margemEsquerda,
|
|
157
|
-
margemTopo
|
|
158
|
-
});
|
|
159
|
-
(0, normal_1.normal)({
|
|
160
|
-
doc,
|
|
161
|
-
value: item.imposto[keys[i]][newKeys[0]].CSOSN
|
|
162
|
-
? `${item.imposto[keys[i]][newKeys[0]].orig}${item.imposto[keys[i]][newKeys[0]].CSOSN}`
|
|
163
|
-
: '',
|
|
164
|
-
x: 270,
|
|
165
|
-
y,
|
|
166
|
-
largura: 21,
|
|
167
|
-
alinhamento: 'center',
|
|
168
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
169
|
-
ajusteX,
|
|
170
|
-
ajusteY,
|
|
171
|
-
margemEsquerda,
|
|
172
|
-
margemTopo
|
|
173
|
-
});
|
|
174
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
175
|
-
(0, normal_1.normal)({
|
|
176
|
-
doc,
|
|
177
|
-
value: (0, utils_1.formatMoney)(item.imposto[keys[i]][newKeys[0]].vBC ?? 0, 2),
|
|
178
|
-
x: 443,
|
|
179
|
-
y,
|
|
180
|
-
largura: 32.5,
|
|
181
|
-
alinhamento: 'center',
|
|
182
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
183
|
-
ajusteX,
|
|
184
|
-
ajusteY,
|
|
185
|
-
margemEsquerda,
|
|
186
|
-
margemTopo
|
|
187
|
-
});
|
|
188
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
189
|
-
(0, normal_1.normal)({
|
|
190
|
-
doc,
|
|
191
|
-
value: (0, utils_1.formatMoney)(item.imposto[keys[i]][newKeys[0]].vICMS ?? 0, 2),
|
|
192
|
-
x: 476,
|
|
193
|
-
y,
|
|
194
|
-
largura: 32,
|
|
195
|
-
alinhamento: 'center',
|
|
196
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
197
|
-
ajusteX,
|
|
198
|
-
ajusteY,
|
|
199
|
-
margemEsquerda,
|
|
200
|
-
margemTopo
|
|
201
|
-
});
|
|
202
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
203
|
-
(0, normal_1.normal)({
|
|
204
|
-
doc,
|
|
205
|
-
value: (0, utils_1.formatMoney)(item.imposto[keys[i]][newKeys[0]].pICMS ?? 0, 2),
|
|
206
|
-
x: 532,
|
|
207
|
-
y: y + 0.65,
|
|
208
|
-
largura: 28,
|
|
209
|
-
alinhamento: 'center',
|
|
210
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
211
|
-
ajusteX,
|
|
212
|
-
ajusteY,
|
|
213
|
-
margemEsquerda,
|
|
214
|
-
margemTopo
|
|
215
|
-
});
|
|
216
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
(0, normal_1.normal)({
|
|
220
|
-
doc,
|
|
221
|
-
value: (0, utils_1.formatMoney)(item.imposto.IPI?.IPITrib?.vIPI ?? 0, 2),
|
|
222
|
-
x: 507.5,
|
|
223
|
-
y,
|
|
224
|
-
largura: 26,
|
|
225
|
-
alinhamento: 'center',
|
|
226
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
227
|
-
ajusteX,
|
|
228
|
-
ajusteY,
|
|
229
|
-
margemEsquerda,
|
|
230
|
-
margemTopo
|
|
231
|
-
});
|
|
232
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
233
|
-
(0, normal_1.normal)({
|
|
234
|
-
doc,
|
|
235
|
-
value: (0, utils_1.formatMoney)(item.imposto.IPI?.IPITrib?.pIPI ?? 0, 2),
|
|
236
|
-
x: 557.75,
|
|
237
|
-
y,
|
|
238
|
-
largura: 29,
|
|
239
|
-
alinhamento: 'center',
|
|
240
|
-
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,
|
|
241
|
-
ajusteX,
|
|
242
|
-
ajusteY,
|
|
243
|
-
margemEsquerda,
|
|
244
|
-
margemTopo
|
|
245
|
-
});
|
|
246
|
-
maiorY = Math.max(maiorY, pdf.y);
|
|
247
|
-
return Number(maiorY) + (default_1.DEFAULT_NFE.separadorDeItens !== undefined ? 2 : 0);
|
|
248
|
-
}
|
|
249
|
-
maiorY = renderizarLinha(doc);
|
|
250
|
-
if (doc.y > (folha === 0 ? default_1.DEFAULT_NFE.finalTamanhoDet1 - 26 : 800)) {
|
|
251
|
-
doc.addPage(options_doc_1.optionsDocNFe);
|
|
252
|
-
doc.y = 0;
|
|
253
|
-
folha++;
|
|
254
|
-
await (0, cria_layout_1.criaLayout)({
|
|
255
|
-
ajusteX,
|
|
256
|
-
ajusteY,
|
|
257
|
-
nf,
|
|
258
|
-
doc,
|
|
259
|
-
larguraDoFormulario,
|
|
260
|
-
margemDireita,
|
|
261
|
-
margemEsquerda,
|
|
262
|
-
margemTopo,
|
|
263
|
-
pathLogo,
|
|
264
|
-
folha
|
|
265
|
-
});
|
|
266
|
-
maiorY = doc.y;
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
if (default_1.DEFAULT_NFE.separadorDeItens !== undefined) {
|
|
270
|
-
(0, linha_horizontal_tracejada_1.linhaHorizontalTracejada)({ x1: 0, x2: 0, y: maiorY - 1, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
exports.gerarItens = gerarItens;
|
|
276
|
-
//# sourceMappingURL=gerar-itens.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.gerarItens=void 0;const utils_1=require("../../../../domain/use-cases/utils"),cria_layout_1=require("./cria-layout"),default_1=require("./default"),linha_horizontal_tracejada_1=require("./linha-horizontal-tracejada"),normal_1=require("./normal"),options_doc_1=require("./options-doc");async function gerarItens({nf:a,ajusteX:b,ajusteY:c,doc:d,margemEsquerda:e,margemTopo:f,margemDireita:g,larguraDoFormulario:h,pathLogo:j}){let k=0;await(0,cria_layout_1.criaLayout)({ajusteX:b,ajusteY:c,nf:a,doc:d,larguraDoFormulario:h,margemDireita:g,margemEsquerda:e,margemTopo:f,pathLogo:j,folha:k});let l=d.y;for(let m=0;m<a.NFe.infNFe.det.length;m++){function i(a){var g=Math.max;const h=l+2;(0,normal_1.normal)({doc:d,value:n.prod.cProd,x:1.5,y:h,largura:51,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),(0,normal_1.normal)({doc:d,value:n.prod.xProd,x:55.5,y:h,largura:178,alinhamento:"justify",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:n.prod.NCM,x:235.5,y:h,largura:32.5,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:n.prod.CFOP,x:293.5,y:h,largura:21,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:n.prod.uCom,x:315.5,y:h,largura:16.5,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.prod.qCom,4),x:335,y:h,largura:37,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.prod.vUnCom,2),x:375,y:h,largura:32.5,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.prod.vProd,2),x:409.5,y:h,largura:31,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y);const j=Object.keys(n.imposto);for(let k=0;k<j.length;k++)if(j[k].includes("ICMS")&&!j[k].includes("UFDest")){const i=Object.keys(n.imposto[j[k]]);(0,normal_1.normal)({doc:d,value:n.imposto[j[k]][i[0]].CST?`${n.imposto[j[k]][i[0]].orig}${n.imposto[j[k]][i[0]].CST}`:"",x:270,y:h,largura:21,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),(0,normal_1.normal)({doc:d,value:n.imposto[j[k]][i[0]].CSOSN?`${n.imposto[j[k]][i[0]].orig}${n.imposto[j[k]][i[0]].CSOSN}`:"",x:270,y:h,largura:21,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.imposto[j[k]][i[0]].vBC??0,2),x:443,y:h,largura:32.5,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.imposto[j[k]][i[0]].vICMS??0,2),x:476,y:h,largura:32,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.imposto[j[k]][i[0]].pICMS??0,2),x:532,y:h+.65,largura:28,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y)}return(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.imposto.IPI?.IPITrib?.vIPI??0,2),x:507.5,y:h,largura:26,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),(0,normal_1.normal)({doc:d,value:(0,utils_1.formatMoney)(n.imposto.IPI?.IPITrib?.pIPI??0,2),x:557.75,y:h,largura:29,alinhamento:"center",tamanho:default_1.DEFAULT_NFE.tamanhoDaFonteDosItens,ajusteX:b,ajusteY:c,margemEsquerda:e,margemTopo:f}),l=g(l,a.y),+l+(void 0===default_1.DEFAULT_NFE.separadorDeItens?0:2)}const n=a.NFe.infNFe.det[m];l=i(d),d.y>(0===k?default_1.DEFAULT_NFE.finalTamanhoDet1-26:800)?(d.addPage(options_doc_1.optionsDocNFe),d.y=0,k++,await(0,cria_layout_1.criaLayout)({ajusteX:b,ajusteY:c,nf:a,doc:d,larguraDoFormulario:h,margemDireita:g,margemEsquerda:e,margemTopo:f,pathLogo:j,folha:k}),l=d.y):default_1.DEFAULT_NFE.separadorDeItens!==void 0&&(0,linha_horizontal_tracejada_1.linhaHorizontalTracejada)({x1:0,x2:0,y:l-1,doc:d,ajusteX:b,ajusteY:c,margemDireita:g,margemEsquerda:e,margemTopo:f})}}exports.gerarItens=gerarItens;
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDadosAdicionais = void 0;
|
|
4
|
-
const linha_horizontal_1 = require("./linha-horizontal");
|
|
5
|
-
const linha_vertical_1 = require("./linha-vertical");
|
|
6
|
-
const normal_1 = require("./normal");
|
|
7
|
-
const secao_1 = require("./secao");
|
|
8
|
-
const titulo_1 = require("./titulo");
|
|
9
|
-
function getDadosAdicionais({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, margemDireita, larguraDoFormulario, infAdic, finalEspacoDet }) {
|
|
10
|
-
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: finalEspacoDet + 8, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
11
|
-
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: 821.8, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
12
|
-
(0, linha_vertical_1.linhaVertical)({ y1: finalEspacoDet + 8, y2: 821.8, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
13
|
-
(0, linha_vertical_1.linhaVertical)({ y1: finalEspacoDet + 8, y2: 821.8, x: 388.25, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
14
|
-
(0, linha_vertical_1.linhaVertical)({ y1: finalEspacoDet + 8, y2: 821.8, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
15
|
-
(0, secao_1.secao)({ doc, value: 'DADOS ADICIONAIS', x: 1.5, y: finalEspacoDet, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
16
|
-
(0, titulo_1.titulo)({
|
|
17
|
-
value: 'INFORMAÇÕES COMPLEMENTARES',
|
|
18
|
-
x: 1.5,
|
|
19
|
-
y: finalEspacoDet + 10,
|
|
20
|
-
largura: 385.5,
|
|
21
|
-
ajusteX,
|
|
22
|
-
ajusteY,
|
|
23
|
-
doc,
|
|
24
|
-
margemEsquerda,
|
|
25
|
-
margemTopo
|
|
26
|
-
});
|
|
27
|
-
(0, titulo_1.titulo)({
|
|
28
|
-
value: 'RESERVADO AO FISCO',
|
|
29
|
-
x: 390,
|
|
30
|
-
y: finalEspacoDet + 10,
|
|
31
|
-
largura: 195,
|
|
32
|
-
ajusteX,
|
|
33
|
-
ajusteY,
|
|
34
|
-
doc,
|
|
35
|
-
margemEsquerda,
|
|
36
|
-
margemTopo
|
|
37
|
-
});
|
|
38
|
-
const informacoesComplementares = [infAdic.infCpl];
|
|
39
|
-
(0, normal_1.normal)({
|
|
40
|
-
doc,
|
|
41
|
-
value: informacoesComplementares.join(' - '),
|
|
42
|
-
x: 1,
|
|
43
|
-
y: finalEspacoDet + 17.5,
|
|
44
|
-
largura: 386,
|
|
45
|
-
alinhamento: 'justify',
|
|
46
|
-
tamanho: 6,
|
|
47
|
-
ajusteX,
|
|
48
|
-
ajusteY,
|
|
49
|
-
margemEsquerda,
|
|
50
|
-
margemTopo
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
exports.getDadosAdicionais = getDadosAdicionais;
|
|
54
|
-
//# sourceMappingURL=get-dados-adicionais.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDadosAdicionais=void 0;const linha_horizontal_1=require("./linha-horizontal"),linha_vertical_1=require("./linha-vertical"),normal_1=require("./normal"),secao_1=require("./secao"),titulo_1=require("./titulo");function getDadosAdicionais({doc:a,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e,margemDireita:f,larguraDoFormulario:g,infAdic:h,finalEspacoDet:i}){(0,linha_horizontal_1.linhaHorizontal)({x1:0,x2:0,y:i+8,doc:a,ajusteX:b,ajusteY:c,margemDireita:f,margemEsquerda:d,margemTopo:e}),(0,linha_horizontal_1.linhaHorizontal)({x1:0,x2:0,y:821.8,doc:a,ajusteX:b,ajusteY:c,margemDireita:f,margemEsquerda:d,margemTopo:e}),(0,linha_vertical_1.linhaVertical)({y1:i+8,y2:821.8,x:0,doc:a,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e}),(0,linha_vertical_1.linhaVertical)({y1:i+8,y2:821.8,x:388.25,doc:a,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e}),(0,linha_vertical_1.linhaVertical)({y1:i+8,y2:821.8,x:g,doc:a,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e}),(0,secao_1.secao)({doc:a,value:"DADOS ADICIONAIS",x:1.5,y:i,largura:0,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e}),(0,titulo_1.titulo)({value:"INFORMA\xC7\xD5ES COMPLEMENTARES",x:1.5,y:i+10,largura:385.5,ajusteX:b,ajusteY:c,doc:a,margemEsquerda:d,margemTopo:e}),(0,titulo_1.titulo)({value:"RESERVADO AO FISCO",x:390,y:i+10,largura:195,ajusteX:b,ajusteY:c,doc:a,margemEsquerda:d,margemTopo:e});const j=[h.infCpl];(0,normal_1.normal)({doc:a,value:j.join(" - "),x:1,y:i+17.5,largura:386,alinhamento:"justify",tamanho:6,ajusteX:b,ajusteY:c,margemEsquerda:d,margemTopo:e})}exports.getDadosAdicionais=getDadosAdicionais;
|