@alexssmusica/node-pdf-nfe 1.0.55 → 1.0.57

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.
@@ -44,9 +44,9 @@ async function gerarItens({ nf, ajusteX, ajusteY, doc, margemEsquerda, margemTop
44
44
  maiorY = Math.max(maiorY, pdf.y);
45
45
  }
46
46
  }
47
- (0, normal_1.normal)({ doc, value: item.imposto.IPI?.IPITRIB?.vIPI.toString() ?? Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(Number(0)), x: 507.5, y, largura: 26, alinhamento: 'center', tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens, ajusteX, ajusteY, margemEsquerda, margemTopo });
47
+ (0, normal_1.normal)({ doc, value: item.imposto.IPI?.IPITrib?.vIPI.toString() ?? Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(Number(0)), x: 507.5, y, largura: 26, alinhamento: 'center', tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens, ajusteX, ajusteY, margemEsquerda, margemTopo });
48
48
  maiorY = Math.max(maiorY, pdf.y);
49
- (0, normal_1.normal)({ doc, value: item.imposto.IPI?.IPITRIB?.pIPI?.toString() ?? Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(Number(0)), x: 557.75, y, largura: 29, alinhamento: 'center', tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens, ajusteX, ajusteY, margemEsquerda, margemTopo });
49
+ (0, normal_1.normal)({ doc, value: item.imposto.IPI?.IPITrib?.pIPI?.toString() ?? Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(Number(0)), x: 557.75, y, largura: 29, alinhamento: 'center', tamanho: default_1.DEFAULT_NFE.tamanhoDaFonteDosItens, ajusteX, ajusteY, margemEsquerda, margemTopo });
50
50
  maiorY = Math.max(maiorY, pdf.y);
51
51
  return Number(maiorY) + (default_1.DEFAULT_NFE.separadorDeItens !== undefined ? 2 : 0);
52
52
  }
@@ -25,7 +25,11 @@ function getTransporte({ y, doc, ajusteX, ajusteY, margemDireita, margemEsquerda
25
25
  (0, linha_vertical_1.linhaVertical)({ y1: y + 8, y2: y + 68, x: larguraDoFormulario, doc, ajusteX, ajusteY, margemEsquerda, margemTopo });
26
26
  (0, secao_1.secao)({ doc, value: 'TRANSPORTADOR / VOLUMES TRANSPORTADOS', x: 1.5, y, largura: 0, ajusteX, ajusteY, margemEsquerda, margemTopo });
27
27
  (0, titulo_1.titulo)({ value: 'NOME / RAZÃO SOCIAL', x: 1.5, y: y + 9.5, largura: 166.5, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
28
- (0, campo_1.campo)({ value: transp.transporta?.xNome ?? '', x: 1.5, y: y + 17.5, largura: 166.5, alinhamento: 'left', ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
28
+ let tamanhoFonte = 6
29
+ if(transp.transporta?.xNome && transp.transporta?.xNome.length > 40){
30
+ tamanhoFonte = 5
31
+ }
32
+ (0, campo_1.campo)({ value: transp.transporta?.xNome ?? '', x: 1.5, y: y + 17.5, largura: 166.5, alinhamento: 'left', tamanho: tamanhoFonte, ajusteX, ajusteY, doc, margemEsquerda, margemTopo });
29
33
  function ModFrete(value) {
30
34
  if (value === '0') {
31
35
  return 'Por conta do Remetente';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexssmusica/node-pdf-nfe",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "Modulo que auxilia na geração de NFe e NFCe",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",