@alexssmusica/node-pdf-nfe 1.2.11 → 1.2.12

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.
@@ -26,11 +26,12 @@ async function criaLayout({ pathLogo, nf, ajusteX, ajusteY, doc, margemEsquerda,
26
26
  margemTopo,
27
27
  larguraDoFormulario,
28
28
  protNFe: nf.protNFe,
29
- cancelada
29
+ cancelada,
30
+ folha
30
31
  });
31
32
  }
32
33
  else if (ide.tpAmb === '1' && cancelada) {
33
- (0, get_nota_cancelada_1.getNotaCancelada)({ ajusteX, ajusteY, doc, margemEsquerda, margemTopo, larguraDoFormulario });
34
+ (0, get_nota_cancelada_1.getNotaCancelada)({ ajusteX, ajusteY, doc, margemEsquerda, margemTopo, larguraDoFormulario, folha });
34
35
  }
35
36
  if (folha === 0) {
36
37
  y = (0, get_recibo_1.getRecibo)({
@@ -26,7 +26,7 @@ async function gerarItens({ nf, ajusteX, ajusteY, doc, margemEsquerda, margemTop
26
26
  for (let i = 0; i < nf.NFe.infNFe.det.length; i++) {
27
27
  const item = nf.NFe.infNFe.det[i];
28
28
  function renderizarLinha(pdf) {
29
- const y = maiorY + 2;
29
+ const y = maiorY + 3;
30
30
  (0, normal_1.normal)({
31
31
  doc,
32
32
  value: item.prod.cProd,
@@ -245,7 +245,7 @@ async function gerarItens({ nf, ajusteX, ajusteY, doc, margemEsquerda, margemTop
245
245
  margemTopo
246
246
  });
247
247
  maiorY = Math.max(maiorY, pdf.y);
248
- return Number(maiorY) + (default_1.DEFAULT_NFE.separadorDeItens !== undefined ? 2 : 0);
248
+ return Number(maiorY) + (default_1.DEFAULT_NFE.separadorDeItens !== undefined ? 3 : 0);
249
249
  }
250
250
  maiorY = renderizarLinha(doc);
251
251
  if (doc.y > (folha === 0 ? default_1.DEFAULT_NFE.finalTamanhoDet1 - 26 : 800)) {
@@ -269,7 +269,7 @@ async function gerarItens({ nf, ajusteX, ajusteY, doc, margemEsquerda, margemTop
269
269
  }
270
270
  else {
271
271
  if (default_1.DEFAULT_NFE.separadorDeItens !== undefined) {
272
- (0, linha_horizontal_tracejada_1.linhaHorizontalTracejada)({ x1: 0, x2: 0, y: maiorY - 1, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
272
+ (0, linha_horizontal_tracejada_1.linhaHorizontalTracejada)({ x1: 0, x2: 0, y: maiorY, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
273
273
  }
274
274
  }
275
275
  }
@@ -7,57 +7,79 @@ const default_1 = require("./default");
7
7
  const linha_horizontal_1 = require("./linha-horizontal");
8
8
  const linha_vertical_1 = require("./linha-vertical");
9
9
  const secao_1 = require("./secao");
10
+ const BOXES_PER_ROW = 8;
11
+ const BOX_HEIGHT = 27;
12
+ const BOX_PADDING = 4;
13
+ const BOX_GAP = 3;
14
+ const BOX_RADIUS = 2;
15
+ const BOX_LINE_HEIGHT = 7.5;
10
16
  function getFaturaDuplicata({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo, larguraDoFormulario, cobr }) {
11
17
  if (cobr !== undefined && Object.keys(cobr).length > 0) {
12
- (0, secao_1.secao)({ doc, value: 'FATURA / DUPLICATA', x: 1.5, y: y + 12, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
18
+ const baseY = y + 9;
19
+ (0, secao_1.secao)({ doc, value: 'FATURA / DUPLICATA', x: 1.5, y: y + 0.9, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
20
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: baseY, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
21
+ const availableWidth = larguraDoFormulario - BOX_PADDING * 2;
22
+ const boxWidth = (availableWidth - (BOXES_PER_ROW - 1) * BOX_GAP) / BOXES_PER_ROW;
23
+ let currentY = baseY + BOX_PADDING;
24
+ let currentX = BOX_PADDING;
25
+ let maxBottom = currentY;
13
26
  if (cobr.fat !== undefined) {
27
+ const fatX = margemEsquerda + ajusteX + BOX_PADDING;
28
+ const fatY = margemTopo + ajusteY + currentY;
14
29
  doc
15
- .font('negrito')
16
- .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
17
- .fontSize(8)
18
- .text('Número da Fatura:', 5, y + 24, {
19
- width: larguraDoFormulario - 5,
20
- align: 'justify',
21
- lineGap: -1.5,
22
- continued: true
23
- })
24
- .font('normal')
25
- .text(cobr.fat.nFat, { continued: true })
26
- .font('negrito')
27
- .text(' Valor Original:', { continued: true })
28
- .font('normal')
29
- .text(` ${(0, utils_1.formatNumber)(cobr.fat.vOrig, 2)}`, { continued: true })
30
- .font('negrito')
31
- .text(' Valor Desconto:', { continued: true })
32
- .font('normal')
33
- .text(` ${(0, utils_1.formatNumber)(cobr.fat.vDesc, 2)}`, { continued: true })
34
- .font('negrito')
35
- .text(' Valor Líquido:', { continued: true })
36
30
  .font('normal')
37
- .text(` ${(0, utils_1.formatNumber)(cobr.fat.vLiq, 2)}.`, { continued: true });
31
+ .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
32
+ .fontSize(7)
33
+ .text(`Nº Fatura: ${cobr.fat.nFat} | Orig: ${(0, utils_1.formatNumber)(cobr.fat.vOrig, 2)} | Liq: ${(0, utils_1.formatNumber)(cobr.fat.vLiq, 2)}`, fatX, fatY, {
34
+ width: larguraDoFormulario - BOX_PADDING * 2
35
+ });
36
+ currentY += 10;
37
+ maxBottom = currentY;
38
+ currentX = BOX_PADDING;
38
39
  }
39
40
  if (cobr.dup !== undefined) {
40
- cobr.dup.forEach((dup, index) => {
41
- doc.font('negrito').text(' Duplicata:', { continued: true }).font('normal').text(` ${dup.nDup}`, { continued: true });
42
- doc
43
- .font('negrito')
44
- .text(' Valor:', { continued: true })
45
- .font('normal')
46
- .text(` ${(0, utils_1.formatNumber)(dup.vDup, 2)}`, { continued: true });
41
+ cobr.dup.forEach((dup) => {
42
+ const boxRealX = margemEsquerda + ajusteX + currentX;
43
+ const boxRealY = margemTopo + ajusteY + currentY;
44
+ doc.lineWidth(0.5).strokeColor(default_1.DEFAULT_NFE.corDoLayout).roundedRect(boxRealX, boxRealY, boxWidth, BOX_HEIGHT, BOX_RADIUS).stroke();
45
+ const textX = boxRealX + BOX_PADDING;
46
+ const textWidth = boxWidth - BOX_PADDING * 2;
47
+ const labelWidth = 22;
48
+ const valueWidth = textWidth - labelWidth;
49
+ const lineY = boxRealY + BOX_PADDING;
50
+ doc.font('normal').fillColor(default_1.DEFAULT_NFE.corDoTitulo).fontSize(7).text('Num.', textX, lineY);
51
+ doc.font('negrito').text(dup.nDup, textX + textWidth - valueWidth, lineY, { width: valueWidth, align: 'right' });
52
+ doc.font('normal').text('Venc.', textX, lineY + BOX_LINE_HEIGHT);
53
+ doc.font('negrito').text((0, date_fns_1.format)((0, date_fns_1.parseISO)(dup.dVenc), 'dd/MM/yyyy'), textX + textWidth - valueWidth, lineY + BOX_LINE_HEIGHT, {
54
+ width: valueWidth,
55
+ align: 'right'
56
+ });
57
+ doc.font('normal').text('Valor', textX, lineY + BOX_LINE_HEIGHT * 2);
47
58
  doc
48
59
  .font('negrito')
49
- .text(' Vencimento:', { continued: true })
50
- .font('normal')
51
- .text(` ${(0, date_fns_1.format)((0, date_fns_1.parseISO)(dup.dVenc), 'dd/MM/yyyy')}`, { continued: true });
52
- if (index === cobr.dup.length - 1) {
53
- doc.text('');
60
+ .fontSize(6)
61
+ .text(`R$ ${(0, utils_1.formatNumber)(dup.vDup, 2)}`, textX + textWidth - valueWidth, lineY + BOX_LINE_HEIGHT * 2, {
62
+ width: valueWidth,
63
+ align: 'right',
64
+ height: BOX_LINE_HEIGHT,
65
+ ellipsis: true
66
+ });
67
+ doc.fontSize(7);
68
+ const boxBottom = currentY + BOX_HEIGHT;
69
+ if (boxBottom > maxBottom)
70
+ maxBottom = boxBottom;
71
+ currentX += boxWidth + BOX_GAP;
72
+ if (currentX + boxWidth > larguraDoFormulario - BOX_PADDING) {
73
+ currentX = BOX_PADDING;
74
+ currentY = maxBottom + BOX_GAP;
54
75
  }
55
76
  });
56
77
  }
57
- (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 20, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
58
- (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: doc.y + 6, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
59
- (0, linha_vertical_1.linhaVertical)({ y1: y + 20, y2: doc.y + 6, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
60
- (0, linha_vertical_1.linhaVertical)({ y1: y + 20, y2: doc.y + 6, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
78
+ const finalY = maxBottom + BOX_PADDING + 6;
79
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: finalY, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
80
+ (0, linha_vertical_1.linhaVertical)({ y1: baseY, y2: finalY, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
81
+ (0, linha_vertical_1.linhaVertical)({ y1: baseY, y2: finalY, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
82
+ doc.y = margemTopo + ajusteY + finalY;
61
83
  }
62
84
  return doc.y;
63
85
  }
@@ -1,2 +1,2 @@
1
1
  import type { GeneratePdf } from '../../../../types';
2
- export declare function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, protNFe, cancelada }: GeneratePdf.InputHomologacao): void;
2
+ export declare function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, protNFe, cancelada, folha }: GeneratePdf.InputHomologacao): void;
@@ -2,13 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHomologacao = getHomologacao;
4
4
  const default_1 = require("./default");
5
- function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, protNFe, cancelada }) {
5
+ const OFFSET_BASE_PRIMEIRA_PAGINA = 310;
6
+ const OFFSET_BASE_DEMAIS_PAGINAS = 145;
7
+ const ESPACAMENTO_MARCAS = 50;
8
+ function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, protNFe, cancelada, folha = 0 }) {
9
+ const baseOffset = folha === 0 ? OFFSET_BASE_PRIMEIRA_PAGINA : OFFSET_BASE_DEMAIS_PAGINAS;
10
+ const y1 = baseOffset - ESPACAMENTO_MARCAS + default_1.DEFAULT_NFE.ajusteYDaHomologacao;
11
+ const y2 = baseOffset + default_1.DEFAULT_NFE.ajusteYDaHomologacao;
12
+ const y3 = baseOffset + ESPACAMENTO_MARCAS + default_1.DEFAULT_NFE.ajusteYDaHomologacao;
6
13
  doc
7
14
  .font('normal')
8
15
  .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
9
16
  .fontSize(38)
10
17
  .fillOpacity(default_1.DEFAULT_NFE.opacidadeDaHomologacao)
11
- .text('EMITIDA EM HOMOLOGAÇÃO', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + 200 + default_1.DEFAULT_NFE.ajusteYDaHomologacao, {
18
+ .text('EMITIDA EM HOMOLOGAÇÃO', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + y1, {
12
19
  width: larguraDoFormulario,
13
20
  align: 'center'
14
21
  });
@@ -17,7 +24,7 @@ function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, lar
17
24
  .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
18
25
  .fontSize(25)
19
26
  .fillOpacity(default_1.DEFAULT_NFE.opacidadeDaHomologacao)
20
- .text(protNFe !== undefined ? 'SEM VALOR FISCAL' : 'NÃO ENVIADA PARA SEFAZ', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + 250 + default_1.DEFAULT_NFE.ajusteYDaHomologacao, {
27
+ .text(protNFe !== undefined ? 'SEM VALOR FISCAL' : 'NÃO ENVIADA PARA SEFAZ', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + y2, {
21
28
  width: larguraDoFormulario,
22
29
  align: 'center'
23
30
  });
@@ -27,7 +34,7 @@ function getHomologacao({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, lar
27
34
  .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
28
35
  .fontSize(38)
29
36
  .fillOpacity(default_1.DEFAULT_NFE.opacidadeDaHomologacao)
30
- .text('CANCELADA', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + 300 + default_1.DEFAULT_NFE.ajusteYDaHomologacao, {
37
+ .text('CANCELADA', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + y3, {
31
38
  width: larguraDoFormulario,
32
39
  align: 'center'
33
40
  });
@@ -9,23 +9,23 @@ const linha_vertical_1 = require("./linha-vertical");
9
9
  const secao_1 = require("./secao");
10
10
  const titulo_1 = require("./titulo");
11
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 });
12
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 9, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
13
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 29, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
14
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: 0, x2: 0, y: y + 49, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
15
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
16
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
17
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7 * 2 + 0.3, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
18
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7 * 3 + 0.4, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
19
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7 * 4 + 0.4, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
20
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7 * 5 + 0.6, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
21
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: 87.7 * 5 + 51.8, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
22
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: y + 49, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
23
+ (0, secao_1.secao)({ doc, value: 'CÁLCULO DO IMPOSTO', x: 1.5, y: y + 0.9, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
24
+ (0, titulo_1.titulo)({ value: 'BASE DE CÁLCULO DO ICMS', x: 1.5, y: y + 10.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
25
25
  (0, campo_1.campo)({
26
26
  value: (0, utils_1.formatNumber)(total.ICMSTot.vBC, 2),
27
27
  x: 1.5,
28
- y: y + 26.2,
28
+ y: y + 19.2,
29
29
  largura: 84,
30
30
  alinhamento: 'right',
31
31
  ajusteX,
@@ -34,11 +34,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
34
34
  margemEsquerda,
35
35
  margemTopo
36
36
  });
37
- (0, titulo_1.titulo)({ value: 'VALOR DO ICMS', x: 89, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
37
+ (0, titulo_1.titulo)({ value: 'VALOR DO ICMS', x: 89, y: y + 10.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
38
38
  (0, campo_1.campo)({
39
39
  value: (0, utils_1.formatNumber)(total.ICMSTot.vICMS, 2),
40
40
  x: 89,
41
- y: y + 26.2,
41
+ y: y + 19.2,
42
42
  largura: 84,
43
43
  alinhamento: 'right',
44
44
  ajusteX,
@@ -47,11 +47,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
47
47
  margemEsquerda,
48
48
  margemTopo
49
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 });
50
+ (0, titulo_1.titulo)({ value: 'BASE DE CÁLC. ICMS S.T.', x: 177, y: y + 10.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
51
51
  (0, campo_1.campo)({
52
52
  value: (0, utils_1.formatNumber)(total.ICMSTot.vBCST, 2),
53
53
  x: 177,
54
- y: y + 26.2,
54
+ y: y + 19.2,
55
55
  largura: 84,
56
56
  alinhamento: 'right',
57
57
  ajusteX,
@@ -60,11 +60,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
60
60
  margemEsquerda,
61
61
  margemTopo
62
62
  });
63
- (0, titulo_1.titulo)({ value: 'VALOR DO ICMS SUBST.', x: 265, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
63
+ (0, titulo_1.titulo)({ value: 'VALOR DO ICMS SUBST.', x: 265, y: y + 10.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
64
64
  (0, campo_1.campo)({
65
65
  value: (0, utils_1.formatNumber)(total.ICMSTot.vST, 2),
66
66
  x: 265,
67
- y: y + 26.2,
67
+ y: y + 19.2,
68
68
  largura: 84,
69
69
  alinhamento: 'right',
70
70
  ajusteX,
@@ -73,11 +73,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
73
73
  margemEsquerda,
74
74
  margemTopo
75
75
  });
76
- (0, titulo_1.titulo)({ value: 'VALOR IMP. IMPORTAÇÃO', x: 353, y: y + 17.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
76
+ (0, titulo_1.titulo)({ value: 'VALOR IMP. IMPORTAÇÃO', x: 353, y: y + 10.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
77
77
  (0, campo_1.campo)({
78
78
  value: (0, utils_1.formatNumber)(total.ICMSTot.vII, 2),
79
79
  x: 353,
80
- y: y + 26.2,
80
+ y: y + 19.2,
81
81
  largura: 84,
82
82
  alinhamento: 'right',
83
83
  ajusteX,
@@ -86,11 +86,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
86
86
  margemEsquerda,
87
87
  margemTopo
88
88
  });
89
- (0, titulo_1.titulo)({ value: 'VALOR DO PIS', x: 441, y: y + 17.2, largura: 47, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
89
+ (0, titulo_1.titulo)({ value: 'VALOR DO PIS', x: 441, y: y + 10.2, largura: 47, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
90
90
  (0, campo_1.campo)({
91
91
  value: (0, utils_1.formatNumber)(total.ICMSTot.vPIS, 2),
92
92
  x: 441,
93
- y: y + 26.2,
93
+ y: y + 19.2,
94
94
  largura: 47,
95
95
  alinhamento: 'right',
96
96
  ajusteX,
@@ -99,11 +99,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
99
99
  margemEsquerda,
100
100
  margemTopo
101
101
  });
102
- (0, titulo_1.titulo)({ value: 'VALOR TOTAL DOS PRODUTOS', x: 492, y: y + 17.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
102
+ (0, titulo_1.titulo)({ value: 'VALOR TOTAL DOS PRODUTOS', x: 492, y: y + 10.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
103
103
  (0, campo_1.campo)({
104
104
  value: (0, utils_1.formatNumber)(total.ICMSTot.vProd, 2),
105
105
  x: 492,
106
- y: y + 26.2,
106
+ y: y + 19.2,
107
107
  largura: 93,
108
108
  alinhamento: 'right',
109
109
  ajusteX,
@@ -112,11 +112,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
112
112
  margemEsquerda,
113
113
  margemTopo
114
114
  });
115
- (0, titulo_1.titulo)({ value: 'VALOR DO FRETE', x: 1.5, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
115
+ (0, titulo_1.titulo)({ value: 'VALOR DO FRETE', x: 1.5, y: y + 30.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
116
116
  (0, campo_1.campo)({
117
117
  value: (0, utils_1.formatNumber)(total.ICMSTot.vFrete, 2),
118
118
  x: 1.5,
119
- y: y + 46.2,
119
+ y: y + 39.2,
120
120
  largura: 84,
121
121
  alinhamento: 'right',
122
122
  ajusteX,
@@ -125,11 +125,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
125
125
  margemEsquerda,
126
126
  margemTopo
127
127
  });
128
- (0, titulo_1.titulo)({ value: 'VALOR DO SEGURO', x: 89, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
128
+ (0, titulo_1.titulo)({ value: 'VALOR DO SEGURO', x: 89, y: y + 30.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
129
129
  (0, campo_1.campo)({
130
130
  value: (0, utils_1.formatNumber)(total.ICMSTot.vSeg, 2),
131
131
  x: 89,
132
- y: y + 46.2,
132
+ y: y + 39.2,
133
133
  largura: 84,
134
134
  alinhamento: 'right',
135
135
  ajusteX,
@@ -138,11 +138,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
138
138
  margemEsquerda,
139
139
  margemTopo
140
140
  });
141
- (0, titulo_1.titulo)({ value: 'DESCONTO', x: 177, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
141
+ (0, titulo_1.titulo)({ value: 'DESCONTO', x: 177, y: y + 30.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
142
142
  (0, campo_1.campo)({
143
143
  value: (0, utils_1.formatNumber)(total.ICMSTot.vDesc, 2),
144
144
  x: 177,
145
- y: y + 46.2,
145
+ y: y + 39.2,
146
146
  largura: 84,
147
147
  alinhamento: 'right',
148
148
  ajusteX,
@@ -151,11 +151,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
151
151
  margemEsquerda,
152
152
  margemTopo
153
153
  });
154
- (0, titulo_1.titulo)({ value: 'OUTRAS DESPESAS', x: 265, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
154
+ (0, titulo_1.titulo)({ value: 'OUTRAS DESPESAS', x: 265, y: y + 30.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
155
155
  (0, campo_1.campo)({
156
156
  value: (0, utils_1.formatNumber)(total.ICMSTot.vOutro, 2),
157
157
  x: 265,
158
- y: y + 46.2,
158
+ y: y + 39.2,
159
159
  largura: 84,
160
160
  alinhamento: 'right',
161
161
  ajusteX,
@@ -164,11 +164,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
164
164
  margemEsquerda,
165
165
  margemTopo
166
166
  });
167
- (0, titulo_1.titulo)({ value: 'VALOR TOTAL DO IPI', x: 353, y: y + 37.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
167
+ (0, titulo_1.titulo)({ value: 'VALOR TOTAL DO IPI', x: 353, y: y + 30.2, largura: 84, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
168
168
  (0, campo_1.campo)({
169
169
  value: (0, utils_1.formatNumber)(total.ICMSTot.vIPI, 2),
170
170
  x: 353,
171
- y: y + 46.2,
171
+ y: y + 39.2,
172
172
  largura: 84,
173
173
  alinhamento: 'right',
174
174
  ajusteX,
@@ -180,7 +180,7 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
180
180
  (0, titulo_1.titulo)({
181
181
  value: 'VALOR DA COFINS',
182
182
  x: 440.5,
183
- y: y + 37.2,
183
+ y: y + 30.2,
184
184
  largura: 47,
185
185
  ajusteX,
186
186
  ajusteY,
@@ -192,7 +192,7 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
192
192
  (0, campo_1.campo)({
193
193
  value: (0, utils_1.formatNumber)(total.ICMSTot.vCOFINS, 2),
194
194
  x: 440.5,
195
- y: y + 46.2,
195
+ y: y + 39.2,
196
196
  largura: 47,
197
197
  alinhamento: 'right',
198
198
  ajusteX,
@@ -201,11 +201,11 @@ function getImposto({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, m
201
201
  margemEsquerda,
202
202
  margemTopo
203
203
  });
204
- (0, titulo_1.titulo)({ value: 'VALOR TOTAL DA NOTA', x: 492, y: y + 37.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
204
+ (0, titulo_1.titulo)({ value: 'VALOR TOTAL DA NOTA', x: 492, y: y + 30.2, largura: 93, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
205
205
  (0, campo_1.campo)({
206
206
  value: (0, utils_1.formatNumber)(total.ICMSTot.vNF, 2),
207
207
  x: 492,
208
- y: y + 46.2,
208
+ y: y + 39.2,
209
209
  largura: 93,
210
210
  alinhamento: 'right',
211
211
  ajusteX,
@@ -7,29 +7,29 @@ const linha_vertical_1 = require("./linha-vertical");
7
7
  const secao_1 = require("./secao");
8
8
  const titulo_1 = require("./titulo");
9
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 });
10
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: -0.5, x2: 0.5, y: y + 9, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
11
+ (0, linha_horizontal_1.linhaHorizontal)({ x1: -0.5, x2: 0.5, y: y + 24, doc, ajusteX, ajusteY, margemDireita, margemEsquerda, margemTopo });
12
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 });
13
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 0, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
14
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 53, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
15
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 236.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
16
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 267, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
17
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 293.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
18
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 315, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
19
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 333, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
20
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 373, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
21
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 407.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
22
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 441.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
23
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 475, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
24
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 508, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
25
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 533.5, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
26
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, y2: finalEspacoDet, x: 557, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
27
+ (0, linha_vertical_1.linhaVertical)({ y1: y + 9, 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 + 0.9, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
29
29
  (0, titulo_1.titulo)({
30
30
  value: 'CÓDIGO',
31
31
  x: 1.5,
32
- y: y + 21,
32
+ y: y + 10.2,
33
33
  largura: 50.5,
34
34
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
35
35
  ajusteX,
@@ -41,7 +41,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
41
41
  (0, titulo_1.titulo)({
42
42
  value: 'DESCRIÇÃO DO PRODUTO / SERVIÇO',
43
43
  x: 55,
44
- y: y + 21,
44
+ y: y + 10.2,
45
45
  largura: 179,
46
46
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
47
47
  ajusteX,
@@ -53,7 +53,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
53
53
  (0, titulo_1.titulo)({
54
54
  value: 'NCM/SH',
55
55
  x: 236.5,
56
- y: y + 21,
56
+ y: y + 10.2,
57
57
  largura: 31.5,
58
58
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
59
59
  ajusteX,
@@ -65,7 +65,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
65
65
  (0, titulo_1.titulo)({
66
66
  value: 'O/CST',
67
67
  x: 270,
68
- y: y + 21,
68
+ y: y + 10.2,
69
69
  largura: 20,
70
70
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
71
71
  ajusteX,
@@ -77,7 +77,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
77
77
  (0, titulo_1.titulo)({
78
78
  value: 'CFOP',
79
79
  x: 294.5,
80
- y: y + 21,
80
+ y: y + 10.2,
81
81
  largura: 19.5,
82
82
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
83
83
  ajusteX,
@@ -89,7 +89,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
89
89
  (0, titulo_1.titulo)({
90
90
  value: 'UN.',
91
91
  x: 317,
92
- y: y + 21,
92
+ y: y + 10.2,
93
93
  largura: 14.5,
94
94
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
95
95
  ajusteX,
@@ -101,7 +101,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
101
101
  (0, titulo_1.titulo)({
102
102
  value: 'QUANT.',
103
103
  x: 335,
104
- y: y + 21,
104
+ y: y + 10.2,
105
105
  largura: 37,
106
106
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
107
107
  ajusteX,
@@ -113,7 +113,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
113
113
  (0, titulo_1.titulo)({
114
114
  value: 'VALOR UNIT.',
115
115
  x: 375,
116
- y: y + 21 - 3,
116
+ y: y + 10.2,
117
117
  largura: 31.5,
118
118
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
119
119
  ajusteX,
@@ -125,7 +125,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
125
125
  (0, titulo_1.titulo)({
126
126
  value: 'VALOR TOTAL.',
127
127
  x: 409.5,
128
- y: y + 21 - 3,
128
+ y: y + 10.2,
129
129
  largura: 31.5,
130
130
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
131
131
  ajusteX,
@@ -137,7 +137,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
137
137
  (0, titulo_1.titulo)({
138
138
  value: 'B. CÁLC. ICMS',
139
139
  x: 443,
140
- y: y + 21 - 3,
140
+ y: y + 10.2,
141
141
  largura: 31.5,
142
142
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
143
143
  ajusteX,
@@ -149,7 +149,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
149
149
  (0, titulo_1.titulo)({
150
150
  value: 'VALOR ICMS',
151
151
  x: 476,
152
- y: y + 21 - 3,
152
+ y: y + 10.2,
153
153
  largura: 31.5,
154
154
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
155
155
  ajusteX,
@@ -161,7 +161,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
161
161
  (0, titulo_1.titulo)({
162
162
  value: 'VALOR IPI',
163
163
  x: 507.5,
164
- y: y + 21 - 3,
164
+ y: y + 10.2,
165
165
  largura: 28,
166
166
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
167
167
  ajusteX,
@@ -173,7 +173,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
173
173
  (0, titulo_1.titulo)({
174
174
  value: 'ALÍQ. ICMS',
175
175
  x: 532,
176
- y: y + 21 - 3,
176
+ y: y + 10.2,
177
177
  largura: 28,
178
178
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
179
179
  ajusteX,
@@ -185,7 +185,7 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
185
185
  (0, titulo_1.titulo)({
186
186
  value: 'ALÍQ. IPI',
187
187
  x: 557.75,
188
- y: y + 21,
188
+ y: y + 10.2,
189
189
  largura: 28,
190
190
  alinhamento: default_1.DEFAULT_NFE.alinhamentoDoTituloDaTabela,
191
191
  ajusteX,
@@ -194,5 +194,6 @@ function getMenuItens({ y, doc, ajusteX, ajusteY, margemEsquerda, margemTopo, ma
194
194
  margemEsquerda,
195
195
  margemTopo
196
196
  });
197
+ doc.y = y + 24;
197
198
  return doc.y;
198
199
  }
@@ -1,2 +1,2 @@
1
1
  import type { GeneratePdf } from '../../../../types';
2
- export declare function getNotaCancelada({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario }: GeneratePdf.InputNotaCancelada): void;
2
+ export declare function getNotaCancelada({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, folha }: GeneratePdf.InputNotaCancelada): void;
@@ -2,13 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNotaCancelada = getNotaCancelada;
4
4
  const default_1 = require("./default");
5
- function getNotaCancelada({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario }) {
5
+ const OFFSET_Y_PRIMEIRA_PAGINA = 310;
6
+ const OFFSET_Y_DEMAIS_PAGINAS = 145;
7
+ function getNotaCancelada({ doc, ajusteX, ajusteY, margemEsquerda, margemTopo, larguraDoFormulario, folha = 0 }) {
8
+ const offsetY = folha === 0 ? OFFSET_Y_PRIMEIRA_PAGINA : OFFSET_Y_DEMAIS_PAGINAS;
6
9
  doc
7
10
  .font('normal')
8
11
  .fillColor(default_1.DEFAULT_NFE.corDoTitulo)
9
12
  .fontSize(60)
10
13
  .fillOpacity(default_1.DEFAULT_NFE.opacidadeDaHomologacao)
11
- .text('CANCELADA', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + 200 + default_1.DEFAULT_NFE.ajusteYDaHomologacao, {
14
+ .text('CANCELADA', margemEsquerda + ajusteX + 0, margemTopo + ajusteY + offsetY + default_1.DEFAULT_NFE.ajusteYDaHomologacao, {
12
15
  width: larguraDoFormulario,
13
16
  align: 'center'
14
17
  });