@plasoft/boletos 1.0.61 → 1.0.63
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/build/index.d.mts +2 -2
- package/build/index.d.ts +2 -2
- package/build/index.js +6 -8
- package/build/index.js.map +1 -1
- package/build/index.mjs +6 -8
- package/build/index.mjs.map +1 -1
- package/build/itau-boleto.hbs +4 -4
- package/package.json +1 -1
package/build/index.d.mts
CHANGED
|
@@ -790,7 +790,7 @@ interface IGerarPDFItau {
|
|
|
790
790
|
interface IDadosPDF {
|
|
791
791
|
pagador: {
|
|
792
792
|
nome: string;
|
|
793
|
-
|
|
793
|
+
cnpjCpf: string;
|
|
794
794
|
endereco: {
|
|
795
795
|
logradouro: string;
|
|
796
796
|
numero: string;
|
|
@@ -802,7 +802,7 @@ interface IDadosPDF {
|
|
|
802
802
|
};
|
|
803
803
|
beneficiario: {
|
|
804
804
|
nome: string;
|
|
805
|
-
|
|
805
|
+
cnpjCpf: string;
|
|
806
806
|
dadosBancario: {
|
|
807
807
|
agencia: string;
|
|
808
808
|
conta: string;
|
package/build/index.d.ts
CHANGED
|
@@ -790,7 +790,7 @@ interface IGerarPDFItau {
|
|
|
790
790
|
interface IDadosPDF {
|
|
791
791
|
pagador: {
|
|
792
792
|
nome: string;
|
|
793
|
-
|
|
793
|
+
cnpjCpf: string;
|
|
794
794
|
endereco: {
|
|
795
795
|
logradouro: string;
|
|
796
796
|
numero: string;
|
|
@@ -802,7 +802,7 @@ interface IDadosPDF {
|
|
|
802
802
|
};
|
|
803
803
|
beneficiario: {
|
|
804
804
|
nome: string;
|
|
805
|
-
|
|
805
|
+
cnpjCpf: string;
|
|
806
806
|
dadosBancario: {
|
|
807
807
|
agencia: string;
|
|
808
808
|
conta: string;
|
package/build/index.js
CHANGED
|
@@ -1864,9 +1864,7 @@ function gerarRemessa4({ dados }) {
|
|
|
1864
1864
|
arquivo.add(" ".padEnd(5, " "));
|
|
1865
1865
|
arquivo.add(dadosBancario.carteira);
|
|
1866
1866
|
arquivo.add("0 22");
|
|
1867
|
-
|
|
1868
|
-
const documento = `${boleto.numeroDocumento}/${Number(boleto.parcela)}`.padEnd(14, " ");
|
|
1869
|
-
arquivo.add(documento.substring(0, 15));
|
|
1867
|
+
arquivo.add(`${boleto.numeroDocumento}/${Number(boleto.parcela)}`.padEnd(15, " "));
|
|
1870
1868
|
arquivo.add(vencimento);
|
|
1871
1869
|
arquivo.add(Number(boleto.valor).toFixed(2).replace(".", "").padStart(15, "0"));
|
|
1872
1870
|
arquivo.add("00000");
|
|
@@ -2595,7 +2593,7 @@ function gerarRemessa5({ dados }) {
|
|
|
2595
2593
|
arquivo.add("00000000");
|
|
2596
2594
|
arquivo.add(valorJurosDia.toFixed(2).replace(".", "").padStart(15, "0"));
|
|
2597
2595
|
arquivo.add(codigoDesconto);
|
|
2598
|
-
arquivo.add(vencimento);
|
|
2596
|
+
arquivo.add(codigoDesconto == "0" ? vencimento : "00000000");
|
|
2599
2597
|
arquivo.add(desconto.replace(".", "").padStart(15, "0"));
|
|
2600
2598
|
arquivo.add("000000000000000");
|
|
2601
2599
|
arquivo.add("000000000000000");
|
|
@@ -2799,7 +2797,7 @@ function gerarPDF6(_0) {
|
|
|
2799
2797
|
return __async(this, arguments, function* ({ dados }) {
|
|
2800
2798
|
try {
|
|
2801
2799
|
const { dadosPDF } = dados;
|
|
2802
|
-
if (!dadosPDF.pagador.
|
|
2800
|
+
if (!dadosPDF.pagador.cnpjCpf) {
|
|
2803
2801
|
throw new Error("CPF/CNPJ do pagador na\u0303o informado!");
|
|
2804
2802
|
}
|
|
2805
2803
|
const codigoBarra2 = yield import_bwip_js6.default.toBuffer({
|
|
@@ -2809,8 +2807,8 @@ function gerarPDF6(_0) {
|
|
|
2809
2807
|
});
|
|
2810
2808
|
dadosPDF.beneficiario.dadosBancario.agencia = dadosPDF.beneficiario.dadosBancario.agencia.padStart(4, "0");
|
|
2811
2809
|
dadosPDF.boleto.linhaDigitavel = maskFormat_default.codigoBarra(dadosPDF.boleto.linhaDigitavel);
|
|
2812
|
-
dadosPDF.beneficiario.
|
|
2813
|
-
dadosPDF.beneficiario.
|
|
2810
|
+
dadosPDF.beneficiario.cnpjCpf = maskFormat_default.retornaCpfCnpjFormatado(
|
|
2811
|
+
dadosPDF.beneficiario.cnpjCpf
|
|
2814
2812
|
);
|
|
2815
2813
|
dadosPDF.beneficiario.endereco.cep = maskFormat_default.retornaCEPFormatado(
|
|
2816
2814
|
dadosPDF.beneficiario.endereco.cep
|
|
@@ -2818,7 +2816,7 @@ function gerarPDF6(_0) {
|
|
|
2818
2816
|
dadosPDF.pagador.endereco.cep = maskFormat_default.retornaCEPFormatado(
|
|
2819
2817
|
dadosPDF.pagador.endereco.cep
|
|
2820
2818
|
);
|
|
2821
|
-
dadosPDF.pagador.
|
|
2819
|
+
dadosPDF.pagador.cnpjCpf = maskFormat_default.retornaCpfCnpjFormatado(dadosPDF.pagador.cnpjCpf);
|
|
2822
2820
|
const valorDocumento = Number(dadosPDF.boleto.valorDocumento);
|
|
2823
2821
|
dadosPDF.boleto.valorDocumento = maskFormat_default.numberToReal(
|
|
2824
2822
|
dadosPDF.boleto.valorDocumento
|