@alexssmusica/node-pdf-nfe 1.1.0 → 1.1.1
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/lib/application/helpers/generate-pdf/nfe/campo.js +15 -1
- package/lib/application/helpers/generate-pdf/nfe/cria-layout.js +143 -1
- package/lib/application/helpers/generate-pdf/nfe/default.js +26 -1
- package/lib/application/helpers/generate-pdf/nfe/gerar-itens.js +275 -1
- package/lib/application/helpers/generate-pdf/nfe/get-dados-adicionais.js +53 -1
- package/lib/application/helpers/generate-pdf/nfe/get-dados-emitente.js +309 -1
- package/lib/application/helpers/generate-pdf/nfe/get-destinatario-remetente.js +123 -1
- package/lib/application/helpers/generate-pdf/nfe/get-fatura-duplicata.js +64 -1
- package/lib/application/helpers/generate-pdf/nfe/get-homologacao.js +26 -1
- package/lib/application/helpers/generate-pdf/nfe/get-imposto.js +219 -1
- package/lib/application/helpers/generate-pdf/nfe/get-iss.js +63 -1
- package/lib/application/helpers/generate-pdf/nfe/get-menu-itens.js +199 -1
- package/lib/application/helpers/generate-pdf/nfe/get-recibo.js +102 -1
- package/lib/application/helpers/generate-pdf/nfe/get-transporte.js +143 -1
- package/lib/application/helpers/generate-pdf/nfe/italico.js +16 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal-tracejada.js +8 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-horizontal.js +16 -1
- package/lib/application/helpers/generate-pdf/nfe/linha-vertical.js +10 -1
- package/lib/application/helpers/generate-pdf/nfe/load-fontes.js +31 -1
- package/lib/application/helpers/generate-pdf/nfe/negrito.js +16 -1
- package/lib/application/helpers/generate-pdf/nfe/normal.js +16 -1
- package/lib/application/helpers/generate-pdf/nfe/options-doc.js +14 -1
- package/lib/application/helpers/generate-pdf/nfe/secao.js +17 -1
- package/lib/application/helpers/generate-pdf/nfe/titulo.js +17 -1
- package/lib/application/helpers/xml/deserialize.js +25 -1
- package/lib/application/helpers/xml/index.js +17 -1
- package/lib/domain/use-cases/pdf/index.js +26 -1
- package/lib/domain/use-cases/pdf/pdf-NFCe.js +688 -1
- package/lib/domain/use-cases/pdf/pdf-NFe.js +43 -1
- package/lib/domain/use-cases/utils/data-atual.js +12 -1
- package/lib/domain/use-cases/utils/index.js +18 -1
- package/lib/domain/use-cases/utils/intl-number-format.js +7 -1
- package/lib/index.js +5 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/generate-pdf.js +2 -1
- package/lib/types/index.js +19 -1
- package/lib/types/nfe-proc.js +2 -1
- package/lib/types/schema.js +2 -1
- package/package.json +3 -9
|
@@ -1 +1,219 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImposto = void 0;
|
|
4
|
+
const utils_1 = require("../../../../domain/use-cases/utils");
|
|
5
|
+
const campo_1 = require("./campo");
|
|
6
|
+
const default_1 = require("./default");
|
|
7
|
+
const linha_horizontal_1 = require("./linha-horizontal");
|
|
8
|
+
const linha_vertical_1 = require("./linha-vertical");
|
|
9
|
+
const secao_1 = require("./secao");
|
|
10
|
+
const titulo_1 = require("./titulo");
|
|
11
|
+
function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo, larguraDoFormulario, total }) {
|
|
12
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 16.2, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
13
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 36.2, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
14
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 56.2, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
15
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
16
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
17
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7 * 2 + 0.3, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
18
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7 * 3 + 0.4, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
19
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7 * 4 + 0.4, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
20
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7 * 5 + 0.6, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
21
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: 87.7 * 5 + 51.8, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
22
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 16.2, y2: y + 56.2, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
23
|
+
(0, secao_1.secao)({ doc, value: 'CÁLCULO DO IMPOSTO', x: 1.5, y: y + 8.7, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
24
|
+
(0, titulo_1.titulo)({ value: 'BASE DE CÁLCULO DO ICMS', x: 1.5, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
25
|
+
(0, campo_1.campo)({
|
|
26
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vBC, 2),
|
|
27
|
+
x: 1.5,
|
|
28
|
+
y: y + 26.2,
|
|
29
|
+
largura: 84,
|
|
30
|
+
alinhamento: 'right',
|
|
31
|
+
ajusteX,
|
|
32
|
+
ajusteY,
|
|
33
|
+
doc,
|
|
34
|
+
margemEsquerda,
|
|
35
|
+
margemTopo
|
|
36
|
+
});
|
|
37
|
+
(0, titulo_1.titulo)({ value: 'VALOR DO ICMS', x: 89, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
38
|
+
(0, campo_1.campo)({
|
|
39
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vICMS, 2),
|
|
40
|
+
x: 89,
|
|
41
|
+
y: y + 26.2,
|
|
42
|
+
largura: 84,
|
|
43
|
+
alinhamento: 'right',
|
|
44
|
+
ajusteX,
|
|
45
|
+
ajusteY,
|
|
46
|
+
doc,
|
|
47
|
+
margemEsquerda,
|
|
48
|
+
margemTopo
|
|
49
|
+
});
|
|
50
|
+
(0, titulo_1.titulo)({ value: 'BASE DE CÁLC. ICMS S.T.', x: 177, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
51
|
+
(0, campo_1.campo)({
|
|
52
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vBCST, 2),
|
|
53
|
+
x: 177,
|
|
54
|
+
y: y + 26.2,
|
|
55
|
+
largura: 84,
|
|
56
|
+
alinhamento: 'right',
|
|
57
|
+
ajusteX,
|
|
58
|
+
ajusteY,
|
|
59
|
+
doc,
|
|
60
|
+
margemEsquerda,
|
|
61
|
+
margemTopo
|
|
62
|
+
});
|
|
63
|
+
(0, titulo_1.titulo)({ value: 'VALOR DO ICMS SUBST.', x: 265, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
64
|
+
(0, campo_1.campo)({
|
|
65
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vST, 2),
|
|
66
|
+
x: 265,
|
|
67
|
+
y: y + 26.2,
|
|
68
|
+
largura: 84,
|
|
69
|
+
alinhamento: 'right',
|
|
70
|
+
ajusteX,
|
|
71
|
+
ajusteY,
|
|
72
|
+
doc,
|
|
73
|
+
margemEsquerda,
|
|
74
|
+
margemTopo
|
|
75
|
+
});
|
|
76
|
+
(0, titulo_1.titulo)({ value: 'VALOR IMP. IMPORTAÇÃO', x: 353, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
77
|
+
(0, campo_1.campo)({
|
|
78
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vIPI, 2),
|
|
79
|
+
x: 353,
|
|
80
|
+
y: y + 26.2,
|
|
81
|
+
largura: 84,
|
|
82
|
+
alinhamento: 'right',
|
|
83
|
+
ajusteX,
|
|
84
|
+
ajusteY,
|
|
85
|
+
doc,
|
|
86
|
+
margemEsquerda,
|
|
87
|
+
margemTopo
|
|
88
|
+
});
|
|
89
|
+
(0, titulo_1.titulo)({ value: 'VALOR DO PIS', x: 441, y: y + 17.2, largura: 47, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
90
|
+
(0, campo_1.campo)({
|
|
91
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vPIS, 2),
|
|
92
|
+
x: 441,
|
|
93
|
+
y: y + 26.2,
|
|
94
|
+
largura: 47,
|
|
95
|
+
alinhamento: 'right',
|
|
96
|
+
ajusteX,
|
|
97
|
+
ajusteY,
|
|
98
|
+
doc,
|
|
99
|
+
margemEsquerda,
|
|
100
|
+
margemTopo
|
|
101
|
+
});
|
|
102
|
+
(0, titulo_1.titulo)({ value: 'VALOR TOTAL DOS PRODUTOS', x: 492, y: y + 17.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
103
|
+
(0, campo_1.campo)({
|
|
104
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vProd, 2),
|
|
105
|
+
x: 492,
|
|
106
|
+
y: y + 26.2,
|
|
107
|
+
largura: 93,
|
|
108
|
+
alinhamento: 'right',
|
|
109
|
+
ajusteX,
|
|
110
|
+
ajusteY,
|
|
111
|
+
doc,
|
|
112
|
+
margemEsquerda,
|
|
113
|
+
margemTopo
|
|
114
|
+
});
|
|
115
|
+
(0, titulo_1.titulo)({ value: 'VALOR DO FRETE', x: 1.5, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
116
|
+
(0, campo_1.campo)({
|
|
117
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vFrete, 2),
|
|
118
|
+
x: 1.5,
|
|
119
|
+
y: y + 46.2,
|
|
120
|
+
largura: 84,
|
|
121
|
+
alinhamento: 'right',
|
|
122
|
+
ajusteX,
|
|
123
|
+
ajusteY,
|
|
124
|
+
doc,
|
|
125
|
+
margemEsquerda,
|
|
126
|
+
margemTopo
|
|
127
|
+
});
|
|
128
|
+
(0, titulo_1.titulo)({ value: 'VALOR DO SEGURO', x: 89, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
129
|
+
(0, campo_1.campo)({
|
|
130
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vSeg, 2),
|
|
131
|
+
x: 89,
|
|
132
|
+
y: y + 46.2,
|
|
133
|
+
largura: 84,
|
|
134
|
+
alinhamento: 'right',
|
|
135
|
+
ajusteX,
|
|
136
|
+
ajusteY,
|
|
137
|
+
doc,
|
|
138
|
+
margemEsquerda,
|
|
139
|
+
margemTopo
|
|
140
|
+
});
|
|
141
|
+
(0, titulo_1.titulo)({ value: 'DESCONTO', x: 177, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
142
|
+
(0, campo_1.campo)({
|
|
143
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vDesc, 2),
|
|
144
|
+
x: 177,
|
|
145
|
+
y: y + 46.2,
|
|
146
|
+
largura: 84,
|
|
147
|
+
alinhamento: 'right',
|
|
148
|
+
ajusteX,
|
|
149
|
+
ajusteY,
|
|
150
|
+
doc,
|
|
151
|
+
margemEsquerda,
|
|
152
|
+
margemTopo
|
|
153
|
+
});
|
|
154
|
+
(0, titulo_1.titulo)({ value: 'OUTRAS DESPESAS', x: 265, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
155
|
+
(0, campo_1.campo)({
|
|
156
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vOutro, 2),
|
|
157
|
+
x: 265,
|
|
158
|
+
y: y + 46.2,
|
|
159
|
+
largura: 84,
|
|
160
|
+
alinhamento: 'right',
|
|
161
|
+
ajusteX,
|
|
162
|
+
ajusteY,
|
|
163
|
+
doc,
|
|
164
|
+
margemEsquerda,
|
|
165
|
+
margemTopo
|
|
166
|
+
});
|
|
167
|
+
(0, titulo_1.titulo)({ value: 'VALOR TOTAL DO IPI', x: 353, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
168
|
+
(0, campo_1.campo)({
|
|
169
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vIPI, 2),
|
|
170
|
+
x: 353,
|
|
171
|
+
y: y + 46.2,
|
|
172
|
+
largura: 84,
|
|
173
|
+
alinhamento: 'right',
|
|
174
|
+
ajusteX,
|
|
175
|
+
ajusteY,
|
|
176
|
+
doc,
|
|
177
|
+
margemEsquerda,
|
|
178
|
+
margemTopo
|
|
179
|
+
});
|
|
180
|
+
(0, titulo_1.titulo)({
|
|
181
|
+
value: 'VALOR DA COFINS',
|
|
182
|
+
x: 440.5,
|
|
183
|
+
y: y + 37.2,
|
|
184
|
+
largura: 47,
|
|
185
|
+
ajusteX,
|
|
186
|
+
ajusteY,
|
|
187
|
+
doc,
|
|
188
|
+
margemEsquerda,
|
|
189
|
+
margemTopo,
|
|
190
|
+
tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDoTitulo - 1
|
|
191
|
+
});
|
|
192
|
+
(0, campo_1.campo)({
|
|
193
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vCOFINS, 2),
|
|
194
|
+
x: 440.5,
|
|
195
|
+
y: y + 46.2,
|
|
196
|
+
largura: 47,
|
|
197
|
+
alinhamento: 'right',
|
|
198
|
+
ajusteX,
|
|
199
|
+
ajusteY,
|
|
200
|
+
doc,
|
|
201
|
+
margemEsquerda,
|
|
202
|
+
margemTopo
|
|
203
|
+
});
|
|
204
|
+
(0, titulo_1.titulo)({ value: 'VALOR TOTAL DA NOTA', x: 492, y: y + 37.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
205
|
+
(0, campo_1.campo)({
|
|
206
|
+
value: (0, utils_1.formatMoney)(total.ICMSTot.vNF, 2),
|
|
207
|
+
x: 492,
|
|
208
|
+
y: y + 46.2,
|
|
209
|
+
largura: 93,
|
|
210
|
+
alinhamento: 'right',
|
|
211
|
+
ajusteX,
|
|
212
|
+
ajusteY,
|
|
213
|
+
doc,
|
|
214
|
+
margemEsquerda,
|
|
215
|
+
margemTopo
|
|
216
|
+
});
|
|
217
|
+
return doc.y;
|
|
218
|
+
}
|
|
219
|
+
exports.getImposto = getImposto;
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIss = void 0;
|
|
4
|
+
const campo_1 = require("./campo");
|
|
5
|
+
const linha_horizontal_1 = require("./linha-horizontal");
|
|
6
|
+
const linha_vertical_1 = require("./linha-vertical");
|
|
7
|
+
const secao_1 = require("./secao");
|
|
8
|
+
const titulo_1 = require("./titulo");
|
|
9
|
+
function getIss({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo, larguraDoFormulario, emit, total }) {
|
|
10
|
+
if (total.ISSQNtot?.vServ !== undefined || total.ISSQNtot?.vBC !== undefined || total.ISSQNtot?.vISS !== undefined) {
|
|
11
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: 762.2, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
12
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: 782.2, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
13
|
+
(0, linha_vertical_1.linhaVertical)({ y1: 762.2, y2: 782.2, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
14
|
+
(0, linha_vertical_1.linhaVertical)({ y1: 762.2, y2: 782.2, x: 136.1, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
15
|
+
(0, linha_vertical_1.linhaVertical)({ y1: 762.2, y2: 782.2, x: 136.1 * 2 - 0.1, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
16
|
+
(0, linha_vertical_1.linhaVertical)({ y1: 762.2, y2: 782.2, x: 136.1 * 3 - 0.1, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
17
|
+
(0, linha_vertical_1.linhaVertical)({ y1: 762.2, y2: 782.2, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
18
|
+
(0, secao_1.secao)({ doc, value: 'CÁLCULO DO ISSQN', x: 1.5, y: 754.5, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
19
|
+
(0, titulo_1.titulo)({ value: 'INSCRIÇÃO MUNICIPAL', x: 1.5, y: 763, largura: 132.5, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
20
|
+
(0, campo_1.campo)({ value: emit.IE, x: 1.5, y: 771, largura: 132.5, alinhamento: 'left', ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
21
|
+
(0, titulo_1.titulo)({ value: 'VALOR TOTAL DOS SERVIÇOS', x: 137.5, y: 763, largura: 132.5, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
22
|
+
(0, campo_1.campo)({
|
|
23
|
+
value: total.ISSQNtot?.vServ ?? '',
|
|
24
|
+
x: 137.5,
|
|
25
|
+
y: 771,
|
|
26
|
+
largura: 132.5,
|
|
27
|
+
alinhamento: 'right',
|
|
28
|
+
ajusteX,
|
|
29
|
+
ajusteY,
|
|
30
|
+
doc,
|
|
31
|
+
margemEsquerda,
|
|
32
|
+
margemTopo
|
|
33
|
+
});
|
|
34
|
+
(0, titulo_1.titulo)({ value: 'BASE DE CÁLCULO DO ISSQN', x: 273.5, y: 763, largura: 132.5, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
35
|
+
(0, campo_1.campo)({
|
|
36
|
+
value: total.ISSQNtot?.vBC ?? '',
|
|
37
|
+
x: 273.5,
|
|
38
|
+
y: 771,
|
|
39
|
+
largura: 132.5,
|
|
40
|
+
alinhamento: 'right',
|
|
41
|
+
ajusteX,
|
|
42
|
+
ajusteY,
|
|
43
|
+
doc,
|
|
44
|
+
margemEsquerda,
|
|
45
|
+
margemTopo
|
|
46
|
+
});
|
|
47
|
+
(0, titulo_1.titulo)({ value: 'VALOR TOTAL DO ISSQN', x: 409.5, y: 763, largura: 175.5, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
48
|
+
(0, campo_1.campo)({
|
|
49
|
+
value: total.ISSQNtot?.vISS ?? '',
|
|
50
|
+
x: 409.5,
|
|
51
|
+
y: 771,
|
|
52
|
+
largura: 175.5,
|
|
53
|
+
alinhamento: 'right',
|
|
54
|
+
ajusteX,
|
|
55
|
+
ajusteY,
|
|
56
|
+
doc,
|
|
57
|
+
margemEsquerda,
|
|
58
|
+
margemTopo
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return doc.y;
|
|
62
|
+
}
|
|
63
|
+
exports.getIss = getIss;
|
|
@@ -1 +1,199 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMenuItens = void 0;
|
|
4
|
+
const default_1 = require("./default");
|
|
5
|
+
const linha_horizontal_1 = require("./linha-horizontal");
|
|
6
|
+
const linha_vertical_1 = require("./linha-vertical");
|
|
7
|
+
const secao_1 = require("./secao");
|
|
8
|
+
const titulo_1 = require("./titulo");
|
|
9
|
+
function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, margemDireita, finalEspacoDet, larguraDoFormulario }) {
|
|
10
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: -0.5, x2: 0.5, y: y + 17, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
11
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: -0.5, x2: 0.5, y: y + 32, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
12
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: -0.5, x2: 0.5, y: finalEspacoDet, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
13
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
14
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 53, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
15
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 236.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
16
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 267, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
17
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 293.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
18
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 315, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
19
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 333, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
20
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 373, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
21
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 407.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
22
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 441.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
23
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 475, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
24
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 508, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
25
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 533.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
26
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: 557, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
27
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 17, y2: finalEspacoDet, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
28
|
+
(0, secao_1.secao)({ doc, value: 'DADOS DOS PRODUTOS / SERVIÇOS', x: 1.5, y: y + 8, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
29
|
+
(0, titulo_1.titulo)({
|
|
30
|
+
value: 'CÓDIGO',
|
|
31
|
+
x: 1.5,
|
|
32
|
+
y: y + 21,
|
|
33
|
+
largura: 50.5,
|
|
34
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
35
|
+
ajusteX,
|
|
36
|
+
ajusteY,
|
|
37
|
+
doc,
|
|
38
|
+
margemEsquerda,
|
|
39
|
+
margemTopo
|
|
40
|
+
});
|
|
41
|
+
(0, titulo_1.titulo)({
|
|
42
|
+
value: 'DESCRIÇÃO DO PRODUTO / SERVIÇO',
|
|
43
|
+
x: 55,
|
|
44
|
+
y: y + 21,
|
|
45
|
+
largura: 179,
|
|
46
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
47
|
+
ajusteX,
|
|
48
|
+
ajusteY,
|
|
49
|
+
doc,
|
|
50
|
+
margemEsquerda,
|
|
51
|
+
margemTopo
|
|
52
|
+
});
|
|
53
|
+
(0, titulo_1.titulo)({
|
|
54
|
+
value: 'NCM/SH',
|
|
55
|
+
x: 236.5,
|
|
56
|
+
y: y + 21,
|
|
57
|
+
largura: 31.5,
|
|
58
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
59
|
+
ajusteX,
|
|
60
|
+
ajusteY,
|
|
61
|
+
doc,
|
|
62
|
+
margemEsquerda,
|
|
63
|
+
margemTopo
|
|
64
|
+
});
|
|
65
|
+
(0, titulo_1.titulo)({
|
|
66
|
+
value: 'O/CST',
|
|
67
|
+
x: 270,
|
|
68
|
+
y: y + 21,
|
|
69
|
+
largura: 20,
|
|
70
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
71
|
+
ajusteX,
|
|
72
|
+
ajusteY,
|
|
73
|
+
doc,
|
|
74
|
+
margemEsquerda,
|
|
75
|
+
margemTopo
|
|
76
|
+
});
|
|
77
|
+
(0, titulo_1.titulo)({
|
|
78
|
+
value: 'CFOP',
|
|
79
|
+
x: 294.5,
|
|
80
|
+
y: y + 21,
|
|
81
|
+
largura: 19.5,
|
|
82
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
83
|
+
ajusteX,
|
|
84
|
+
ajusteY,
|
|
85
|
+
doc,
|
|
86
|
+
margemEsquerda,
|
|
87
|
+
margemTopo
|
|
88
|
+
});
|
|
89
|
+
(0, titulo_1.titulo)({
|
|
90
|
+
value: 'UN.',
|
|
91
|
+
x: 317,
|
|
92
|
+
y: y + 21,
|
|
93
|
+
largura: 14.5,
|
|
94
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
95
|
+
ajusteX,
|
|
96
|
+
ajusteY,
|
|
97
|
+
doc,
|
|
98
|
+
margemEsquerda,
|
|
99
|
+
margemTopo
|
|
100
|
+
});
|
|
101
|
+
(0, titulo_1.titulo)({
|
|
102
|
+
value: 'QUANT.',
|
|
103
|
+
x: 335,
|
|
104
|
+
y: y + 21,
|
|
105
|
+
largura: 37,
|
|
106
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
107
|
+
ajusteX,
|
|
108
|
+
ajusteY,
|
|
109
|
+
doc,
|
|
110
|
+
margemEsquerda,
|
|
111
|
+
margemTopo
|
|
112
|
+
});
|
|
113
|
+
(0, titulo_1.titulo)({
|
|
114
|
+
value: 'VALOR UNIT.',
|
|
115
|
+
x: 375,
|
|
116
|
+
y: y + 21 - 3,
|
|
117
|
+
largura: 31.5,
|
|
118
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
119
|
+
ajusteX,
|
|
120
|
+
ajusteY,
|
|
121
|
+
doc,
|
|
122
|
+
margemEsquerda,
|
|
123
|
+
margemTopo
|
|
124
|
+
});
|
|
125
|
+
(0, titulo_1.titulo)({
|
|
126
|
+
value: 'VALOR TOTAL.',
|
|
127
|
+
x: 409.5,
|
|
128
|
+
y: y + 21 - 3,
|
|
129
|
+
largura: 31.5,
|
|
130
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
131
|
+
ajusteX,
|
|
132
|
+
ajusteY,
|
|
133
|
+
doc,
|
|
134
|
+
margemEsquerda,
|
|
135
|
+
margemTopo
|
|
136
|
+
});
|
|
137
|
+
(0, titulo_1.titulo)({
|
|
138
|
+
value: 'B. CÁLC. ICMS',
|
|
139
|
+
x: 443,
|
|
140
|
+
y: y + 21 - 3,
|
|
141
|
+
largura: 31.5,
|
|
142
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
143
|
+
ajusteX,
|
|
144
|
+
ajusteY,
|
|
145
|
+
doc,
|
|
146
|
+
margemEsquerda,
|
|
147
|
+
margemTopo
|
|
148
|
+
});
|
|
149
|
+
(0, titulo_1.titulo)({
|
|
150
|
+
value: 'VALOR ICMS',
|
|
151
|
+
x: 476,
|
|
152
|
+
y: y + 21 - 3,
|
|
153
|
+
largura: 31.5,
|
|
154
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
155
|
+
ajusteX,
|
|
156
|
+
ajusteY,
|
|
157
|
+
doc,
|
|
158
|
+
margemEsquerda,
|
|
159
|
+
margemTopo
|
|
160
|
+
});
|
|
161
|
+
(0, titulo_1.titulo)({
|
|
162
|
+
value: 'VALOR IPI',
|
|
163
|
+
x: 507.5,
|
|
164
|
+
y: y + 21 - 3,
|
|
165
|
+
largura: 28,
|
|
166
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
167
|
+
ajusteX,
|
|
168
|
+
ajusteY,
|
|
169
|
+
doc,
|
|
170
|
+
margemEsquerda,
|
|
171
|
+
margemTopo
|
|
172
|
+
});
|
|
173
|
+
(0, titulo_1.titulo)({
|
|
174
|
+
value: 'ALÍQ. ICMS',
|
|
175
|
+
x: 532,
|
|
176
|
+
y: y + 21 - 3,
|
|
177
|
+
largura: 28,
|
|
178
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
179
|
+
ajusteX,
|
|
180
|
+
ajusteY,
|
|
181
|
+
doc,
|
|
182
|
+
margemEsquerda,
|
|
183
|
+
margemTopo
|
|
184
|
+
});
|
|
185
|
+
(0, titulo_1.titulo)({
|
|
186
|
+
value: 'ALÍQ. IPI',
|
|
187
|
+
x: 557.75,
|
|
188
|
+
y: y + 21,
|
|
189
|
+
largura: 28,
|
|
190
|
+
alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
|
|
191
|
+
ajusteX,
|
|
192
|
+
ajusteY,
|
|
193
|
+
doc,
|
|
194
|
+
margemEsquerda,
|
|
195
|
+
margemTopo
|
|
196
|
+
});
|
|
197
|
+
return doc.y;
|
|
198
|
+
}
|
|
199
|
+
exports.getMenuItens = getMenuItens;
|
|
@@ -1 +1,102 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRecibo = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
const utils_1 = require("../../../../domain/use-cases/utils");
|
|
6
|
+
const linha_horizontal_1 = require("./linha-horizontal");
|
|
7
|
+
const linha_horizontal_tracejada_1 = require("./linha-horizontal-tracejada");
|
|
8
|
+
const linha_vertical_1 = require("./linha-vertical");
|
|
9
|
+
const normal_1 = require("./normal");
|
|
10
|
+
const titulo_1 = require("./titulo");
|
|
11
|
+
function getRecibo({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo, larguraDoFormulario, dest, emit, total, ide }) {
|
|
12
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
13
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: -110.5, y: y + 28.3, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
14
|
+
(0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 51.1, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
15
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y, y2: y + 51.1, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
16
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y + 28.3, y2: y + 51.1, x: 99.2, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
17
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y, y2: y + 51.1, x: 476, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
18
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y, y2: y + 51.1, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
19
|
+
(0, linha_vertical_1.linhaVertical)({ y1: y, y2: y + 51.1, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
|
|
20
|
+
(0, normal_1.normal)({
|
|
21
|
+
doc,
|
|
22
|
+
value: [
|
|
23
|
+
'Recebemos de',
|
|
24
|
+
emit.xNome,
|
|
25
|
+
'os produtos e/ou serviços constantes da nota',
|
|
26
|
+
'fiscal eletrônica indicada abaixo.',
|
|
27
|
+
'Emissão:',
|
|
28
|
+
(0, date_fns_1.format)((0, date_fns_1.parseISO)(ide.dhEmi), 'dd/MM/yyyy HH:mm:ss'),
|
|
29
|
+
'- Valor Total:',
|
|
30
|
+
(0, utils_1.formatMoney)(total.ICMSTot.vNF, 2),
|
|
31
|
+
'- Destinatário:',
|
|
32
|
+
dest.xNome,
|
|
33
|
+
'- Endereço:',
|
|
34
|
+
dest.enderDest?.xLgr
|
|
35
|
+
]
|
|
36
|
+
.join(' ')
|
|
37
|
+
.toUpperCase(),
|
|
38
|
+
x: 1.5,
|
|
39
|
+
y: y + 3,
|
|
40
|
+
largura: 472.5,
|
|
41
|
+
alinhamento: 'justify',
|
|
42
|
+
tamanho: 6.9,
|
|
43
|
+
ajusteX,
|
|
44
|
+
ajusteY,
|
|
45
|
+
margemEsquerda,
|
|
46
|
+
margemTopo
|
|
47
|
+
});
|
|
48
|
+
(0, titulo_1.titulo)({ value: 'DATA DE RECEBIMENTO', x: 1.5, y: y + 30, largura: 97, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
|
|
49
|
+
(0, titulo_1.titulo)({
|
|
50
|
+
value: 'IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR',
|
|
51
|
+
x: 100.5,
|
|
52
|
+
y: y + 30,
|
|
53
|
+
largura: 374,
|
|
54
|
+
ajusteX,
|
|
55
|
+
ajusteY,
|
|
56
|
+
doc,
|
|
57
|
+
margemEsquerda,
|
|
58
|
+
margemTopo
|
|
59
|
+
});
|
|
60
|
+
(0, normal_1.normal)({
|
|
61
|
+
doc,
|
|
62
|
+
value: 'NF-e',
|
|
63
|
+
x: 476.6,
|
|
64
|
+
y: y + 1.8,
|
|
65
|
+
largura: 110,
|
|
66
|
+
alinhamento: 'center',
|
|
67
|
+
tamanho: 14,
|
|
68
|
+
ajusteX,
|
|
69
|
+
ajusteY,
|
|
70
|
+
margemEsquerda,
|
|
71
|
+
margemTopo
|
|
72
|
+
});
|
|
73
|
+
(0, normal_1.normal)({
|
|
74
|
+
doc,
|
|
75
|
+
value: 'Nº. ' + ide.nNF.padStart(9, '0').replace(/(\d{3})(\d{3})(\d{3})/, '$1.$2.$3'),
|
|
76
|
+
x: 476.6,
|
|
77
|
+
y: y + 22,
|
|
78
|
+
largura: 110,
|
|
79
|
+
alinhamento: 'center',
|
|
80
|
+
tamanho: 10,
|
|
81
|
+
ajusteX,
|
|
82
|
+
ajusteY,
|
|
83
|
+
margemEsquerda,
|
|
84
|
+
margemTopo
|
|
85
|
+
});
|
|
86
|
+
(0, normal_1.normal)({
|
|
87
|
+
doc,
|
|
88
|
+
value: 'Série ' + ide.serie,
|
|
89
|
+
x: 476.6,
|
|
90
|
+
y: y + 31.5,
|
|
91
|
+
largura: 110,
|
|
92
|
+
alinhamento: 'center',
|
|
93
|
+
tamanho: 10,
|
|
94
|
+
ajusteX,
|
|
95
|
+
ajusteY,
|
|
96
|
+
margemEsquerda,
|
|
97
|
+
margemTopo
|
|
98
|
+
});
|
|
99
|
+
(0, linha_horizontal_tracejada_1.linhaHorizontalTracejada)({ x1: 0, x2: 0, y: y + 55.32, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
|
|
100
|
+
return doc.y;
|
|
101
|
+
}
|
|
102
|
+
exports.getRecibo = getRecibo;
|