@plasoft/boletos 1.0.32 → 1.0.33
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/ailos-boleto.hbs +6 -6
- package/build/index.d.mts +10 -9
- package/build/index.d.ts +10 -9
- package/build/index.js +23 -23
- package/build/index.mjs +23 -23
- package/build/sicredi-boleto.hbs +704 -701
- package/package.json +1 -1
package/build/ailos-boleto.hbs
CHANGED
|
@@ -97,9 +97,7 @@
|
|
|
97
97
|
width: 400px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.header {
|
|
101
|
-
|
|
102
|
-
}
|
|
100
|
+
.header {}
|
|
103
101
|
|
|
104
102
|
.header-title {
|
|
105
103
|
width: 100%;
|
|
@@ -149,7 +147,8 @@
|
|
|
149
147
|
|
|
150
148
|
<div class="header-beneficiario">
|
|
151
149
|
<span>{{beneficiario.nome}} (CNPJ: {{beneficiario.cnpj}})</span>
|
|
152
|
-
<span>{{beneficiario.endereco.logradouro}}, {{beneficiario.endereco.numero}},
|
|
150
|
+
<span>{{beneficiario.endereco.logradouro}}, {{beneficiario.endereco.numero}},
|
|
151
|
+
{{beneficiario.endereco.bairro}}</span>
|
|
153
152
|
<span>{{beneficiario.endereco.municipio}}/{{beneficiario.endereco.uf}} — {{beneficiario.endereco.cep}}</span>
|
|
154
153
|
</div>
|
|
155
154
|
|
|
@@ -401,8 +400,9 @@
|
|
|
401
400
|
<span>{{boleto.instrucao3}}</span>
|
|
402
401
|
<span>{{boleto.instrucao4}}</span>
|
|
403
402
|
<br>
|
|
404
|
-
|
|
405
|
-
<
|
|
403
|
+
{{#each boleto.observacoes as |observacao|}}
|
|
404
|
+
<span>{{observacao}}</span>
|
|
405
|
+
{{/each}}
|
|
406
406
|
<span>{{boleto.nfs}}</span>
|
|
407
407
|
</div>
|
|
408
408
|
</td>
|
package/build/index.d.mts
CHANGED
|
@@ -51,10 +51,10 @@ interface IDadosPDF$4 {
|
|
|
51
51
|
agenciaDigito: string;
|
|
52
52
|
conta: string;
|
|
53
53
|
contaDigito: string;
|
|
54
|
-
juros
|
|
55
|
-
multa
|
|
56
|
-
desconto
|
|
57
|
-
protesto
|
|
54
|
+
juros: number;
|
|
55
|
+
multa: number;
|
|
56
|
+
desconto: number;
|
|
57
|
+
protesto: number;
|
|
58
58
|
};
|
|
59
59
|
endereco: {
|
|
60
60
|
logradouro: string;
|
|
@@ -91,7 +91,7 @@ interface IDadosPDF$4 {
|
|
|
91
91
|
instrucao2?: string;
|
|
92
92
|
instrucao3?: string;
|
|
93
93
|
instrucao4?: string;
|
|
94
|
-
observacoes?: string;
|
|
94
|
+
observacoes?: string[];
|
|
95
95
|
nfs: string;
|
|
96
96
|
};
|
|
97
97
|
}
|
|
@@ -367,10 +367,10 @@ interface IDadosPDF$2 {
|
|
|
367
367
|
agencia: string;
|
|
368
368
|
numero: string;
|
|
369
369
|
posto: string;
|
|
370
|
-
juros
|
|
371
|
-
multa
|
|
372
|
-
desconto
|
|
373
|
-
protesto
|
|
370
|
+
juros: number;
|
|
371
|
+
multa: number;
|
|
372
|
+
desconto: number;
|
|
373
|
+
protesto: number;
|
|
374
374
|
};
|
|
375
375
|
endereco: {
|
|
376
376
|
logradouro: string;
|
|
@@ -407,6 +407,7 @@ interface IDadosPDF$2 {
|
|
|
407
407
|
instrucao2?: string;
|
|
408
408
|
instrucao3?: string;
|
|
409
409
|
instrucao4?: string;
|
|
410
|
+
observacoes?: string[];
|
|
410
411
|
nfs: string;
|
|
411
412
|
};
|
|
412
413
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -51,10 +51,10 @@ interface IDadosPDF$4 {
|
|
|
51
51
|
agenciaDigito: string;
|
|
52
52
|
conta: string;
|
|
53
53
|
contaDigito: string;
|
|
54
|
-
juros
|
|
55
|
-
multa
|
|
56
|
-
desconto
|
|
57
|
-
protesto
|
|
54
|
+
juros: number;
|
|
55
|
+
multa: number;
|
|
56
|
+
desconto: number;
|
|
57
|
+
protesto: number;
|
|
58
58
|
};
|
|
59
59
|
endereco: {
|
|
60
60
|
logradouro: string;
|
|
@@ -91,7 +91,7 @@ interface IDadosPDF$4 {
|
|
|
91
91
|
instrucao2?: string;
|
|
92
92
|
instrucao3?: string;
|
|
93
93
|
instrucao4?: string;
|
|
94
|
-
observacoes?: string;
|
|
94
|
+
observacoes?: string[];
|
|
95
95
|
nfs: string;
|
|
96
96
|
};
|
|
97
97
|
}
|
|
@@ -367,10 +367,10 @@ interface IDadosPDF$2 {
|
|
|
367
367
|
agencia: string;
|
|
368
368
|
numero: string;
|
|
369
369
|
posto: string;
|
|
370
|
-
juros
|
|
371
|
-
multa
|
|
372
|
-
desconto
|
|
373
|
-
protesto
|
|
370
|
+
juros: number;
|
|
371
|
+
multa: number;
|
|
372
|
+
desconto: number;
|
|
373
|
+
protesto: number;
|
|
374
374
|
};
|
|
375
375
|
endereco: {
|
|
376
376
|
logradouro: string;
|
|
@@ -407,6 +407,7 @@ interface IDadosPDF$2 {
|
|
|
407
407
|
instrucao2?: string;
|
|
408
408
|
instrucao3?: string;
|
|
409
409
|
instrucao4?: string;
|
|
410
|
+
observacoes?: string[];
|
|
410
411
|
nfs: string;
|
|
411
412
|
};
|
|
412
413
|
}
|
package/build/index.js
CHANGED
|
@@ -256,7 +256,6 @@ function decompress(input) {
|
|
|
256
256
|
// src/banks/ailos/gerarPDF.ts
|
|
257
257
|
function gerarPDF(_0) {
|
|
258
258
|
return __async(this, arguments, function* ({ dados }) {
|
|
259
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
260
259
|
try {
|
|
261
260
|
const { generatePDF, dadosPDF } = dados;
|
|
262
261
|
const codigoBarra2 = yield import_bwip_js.default.toBuffer({
|
|
@@ -287,6 +286,7 @@ function gerarPDF(_0) {
|
|
|
287
286
|
dadosPDF.boleto.valorDescontoAbatimento = maskFormat_default.numberToReal(
|
|
288
287
|
dadosPDF.boleto.valorDescontoAbatimento
|
|
289
288
|
);
|
|
289
|
+
const valorDocumento = Number(dadosPDF.boleto.valorDocumento);
|
|
290
290
|
dadosPDF.boleto.valorDocumento = maskFormat_default.numberToReal(
|
|
291
291
|
dadosPDF.boleto.valorDocumento
|
|
292
292
|
);
|
|
@@ -297,21 +297,21 @@ function gerarPDF(_0) {
|
|
|
297
297
|
if (dadosPDF.boleto.quantidade) {
|
|
298
298
|
dadosPDF.boleto.quantidade = maskFormat_default.numberToReal(dadosPDF.boleto.quantidade);
|
|
299
299
|
}
|
|
300
|
-
const jurosMes =
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
303
|
-
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE
|
|
300
|
+
const jurosMes = dadosPDF.beneficiario.dadosBancario.juros;
|
|
301
|
+
const jurosDia = jurosMes / 100 / 30 * valorDocumento;
|
|
302
|
+
if (jurosDia > 0) {
|
|
303
|
+
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE R$${maskFormat_default.numberToReal(jurosDia)} AO DIA, AP\xD3S O VENCIMENTO`;
|
|
304
304
|
}
|
|
305
|
-
const descontoVencimento =
|
|
306
|
-
if (
|
|
305
|
+
const descontoVencimento = dadosPDF.beneficiario.dadosBancario.desconto || 0;
|
|
306
|
+
if (descontoVencimento > 0) {
|
|
307
307
|
dadosPDF.boleto.instrucao2 = `AT\xC9 O VENCIMENTO, CONCEDER DESCONTO DE ${descontoVencimento}%`;
|
|
308
308
|
}
|
|
309
|
-
const multaAtraso =
|
|
310
|
-
if (
|
|
311
|
-
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}
|
|
309
|
+
const multaAtraso = dadosPDF.beneficiario.dadosBancario.multa || 0;
|
|
310
|
+
if (multaAtraso > 0) {
|
|
311
|
+
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}%`;
|
|
312
312
|
}
|
|
313
|
-
const protestoDias =
|
|
314
|
-
if (
|
|
313
|
+
const protestoDias = dadosPDF.beneficiario.dadosBancario.protesto || 0;
|
|
314
|
+
if (protestoDias > 0) {
|
|
315
315
|
dadosPDF.boleto.instrucao4 = `PROTESTAR AP\xD3S ${protestoDias} DIAS CORRIDOS DO VENCIMENTO`;
|
|
316
316
|
}
|
|
317
317
|
dadosPDF.boleto.valor = maskFormat_default.numberToReal(dadosPDF.boleto.valor);
|
|
@@ -1259,7 +1259,6 @@ function getDigito3(texto) {
|
|
|
1259
1259
|
var import_bwip_js3 = __toESM(require("bwip-js"));
|
|
1260
1260
|
function gerarPDF3(_0) {
|
|
1261
1261
|
return __async(this, arguments, function* ({ dados }) {
|
|
1262
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1263
1262
|
try {
|
|
1264
1263
|
const { generatePDF, dadosPDF } = dados;
|
|
1265
1264
|
const codigoBarra2 = yield import_bwip_js3.default.toBuffer({
|
|
@@ -1289,6 +1288,7 @@ function gerarPDF3(_0) {
|
|
|
1289
1288
|
dadosPDF.boleto.valorDescontoAbatimento = maskFormat_default.numberToReal(
|
|
1290
1289
|
dadosPDF.boleto.valorDescontoAbatimento
|
|
1291
1290
|
);
|
|
1291
|
+
const valorDocumento = Number(dadosPDF.boleto.valorDocumento);
|
|
1292
1292
|
dadosPDF.boleto.valorDocumento = maskFormat_default.numberToReal(
|
|
1293
1293
|
dadosPDF.boleto.valorDocumento
|
|
1294
1294
|
);
|
|
@@ -1299,20 +1299,20 @@ function gerarPDF3(_0) {
|
|
|
1299
1299
|
if (dadosPDF.boleto.quantidade) {
|
|
1300
1300
|
dadosPDF.boleto.quantidade = maskFormat_default.numberToReal(dadosPDF.boleto.quantidade);
|
|
1301
1301
|
}
|
|
1302
|
-
const jurosMes =
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1305
|
-
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE
|
|
1302
|
+
const jurosMes = dadosPDF.beneficiario.dadosBancario.juros;
|
|
1303
|
+
const jurosDia = jurosMes / 100 / 30 * valorDocumento;
|
|
1304
|
+
if (jurosDia > 0) {
|
|
1305
|
+
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE R$${maskFormat_default.numberToReal(jurosDia)} AO DIA, AP\xD3S O VENCIMENTO`;
|
|
1306
1306
|
}
|
|
1307
|
-
const descontoVencimento =
|
|
1308
|
-
if (
|
|
1307
|
+
const descontoVencimento = dadosPDF.beneficiario.dadosBancario.desconto || 0;
|
|
1308
|
+
if (descontoVencimento > 0) {
|
|
1309
1309
|
dadosPDF.boleto.instrucao2 = `AT\xC9 O VENCIMENTO, CONCEDER DESCONTO DE ${descontoVencimento}%`;
|
|
1310
1310
|
}
|
|
1311
|
-
const multaAtraso =
|
|
1312
|
-
if (
|
|
1313
|
-
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}
|
|
1311
|
+
const multaAtraso = dadosPDF.beneficiario.dadosBancario.multa || 0;
|
|
1312
|
+
if (multaAtraso > 0) {
|
|
1313
|
+
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}%`;
|
|
1314
1314
|
}
|
|
1315
|
-
const protestoDias =
|
|
1315
|
+
const protestoDias = dadosPDF.beneficiario.dadosBancario.protesto || 0;
|
|
1316
1316
|
if (protestoDias > 0) {
|
|
1317
1317
|
dadosPDF.boleto.instrucao4 = `PROTESTAR AP\xD3S ${protestoDias} DIAS CORRIDOS DO VENCIMENTO`;
|
|
1318
1318
|
}
|
package/build/index.mjs
CHANGED
|
@@ -219,7 +219,6 @@ function decompress(input) {
|
|
|
219
219
|
// src/banks/ailos/gerarPDF.ts
|
|
220
220
|
function gerarPDF(_0) {
|
|
221
221
|
return __async(this, arguments, function* ({ dados }) {
|
|
222
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
223
222
|
try {
|
|
224
223
|
const { generatePDF, dadosPDF } = dados;
|
|
225
224
|
const codigoBarra2 = yield BwipJs.toBuffer({
|
|
@@ -250,6 +249,7 @@ function gerarPDF(_0) {
|
|
|
250
249
|
dadosPDF.boleto.valorDescontoAbatimento = maskFormat_default.numberToReal(
|
|
251
250
|
dadosPDF.boleto.valorDescontoAbatimento
|
|
252
251
|
);
|
|
252
|
+
const valorDocumento = Number(dadosPDF.boleto.valorDocumento);
|
|
253
253
|
dadosPDF.boleto.valorDocumento = maskFormat_default.numberToReal(
|
|
254
254
|
dadosPDF.boleto.valorDocumento
|
|
255
255
|
);
|
|
@@ -260,21 +260,21 @@ function gerarPDF(_0) {
|
|
|
260
260
|
if (dadosPDF.boleto.quantidade) {
|
|
261
261
|
dadosPDF.boleto.quantidade = maskFormat_default.numberToReal(dadosPDF.boleto.quantidade);
|
|
262
262
|
}
|
|
263
|
-
const jurosMes =
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
266
|
-
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE
|
|
263
|
+
const jurosMes = dadosPDF.beneficiario.dadosBancario.juros;
|
|
264
|
+
const jurosDia = jurosMes / 100 / 30 * valorDocumento;
|
|
265
|
+
if (jurosDia > 0) {
|
|
266
|
+
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE R$${maskFormat_default.numberToReal(jurosDia)} AO DIA, AP\xD3S O VENCIMENTO`;
|
|
267
267
|
}
|
|
268
|
-
const descontoVencimento =
|
|
269
|
-
if (
|
|
268
|
+
const descontoVencimento = dadosPDF.beneficiario.dadosBancario.desconto || 0;
|
|
269
|
+
if (descontoVencimento > 0) {
|
|
270
270
|
dadosPDF.boleto.instrucao2 = `AT\xC9 O VENCIMENTO, CONCEDER DESCONTO DE ${descontoVencimento}%`;
|
|
271
271
|
}
|
|
272
|
-
const multaAtraso =
|
|
273
|
-
if (
|
|
274
|
-
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}
|
|
272
|
+
const multaAtraso = dadosPDF.beneficiario.dadosBancario.multa || 0;
|
|
273
|
+
if (multaAtraso > 0) {
|
|
274
|
+
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}%`;
|
|
275
275
|
}
|
|
276
|
-
const protestoDias =
|
|
277
|
-
if (
|
|
276
|
+
const protestoDias = dadosPDF.beneficiario.dadosBancario.protesto || 0;
|
|
277
|
+
if (protestoDias > 0) {
|
|
278
278
|
dadosPDF.boleto.instrucao4 = `PROTESTAR AP\xD3S ${protestoDias} DIAS CORRIDOS DO VENCIMENTO`;
|
|
279
279
|
}
|
|
280
280
|
dadosPDF.boleto.valor = maskFormat_default.numberToReal(dadosPDF.boleto.valor);
|
|
@@ -1222,7 +1222,6 @@ function getDigito3(texto) {
|
|
|
1222
1222
|
import BwipJs3 from "bwip-js";
|
|
1223
1223
|
function gerarPDF3(_0) {
|
|
1224
1224
|
return __async(this, arguments, function* ({ dados }) {
|
|
1225
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1226
1225
|
try {
|
|
1227
1226
|
const { generatePDF, dadosPDF } = dados;
|
|
1228
1227
|
const codigoBarra2 = yield BwipJs3.toBuffer({
|
|
@@ -1252,6 +1251,7 @@ function gerarPDF3(_0) {
|
|
|
1252
1251
|
dadosPDF.boleto.valorDescontoAbatimento = maskFormat_default.numberToReal(
|
|
1253
1252
|
dadosPDF.boleto.valorDescontoAbatimento
|
|
1254
1253
|
);
|
|
1254
|
+
const valorDocumento = Number(dadosPDF.boleto.valorDocumento);
|
|
1255
1255
|
dadosPDF.boleto.valorDocumento = maskFormat_default.numberToReal(
|
|
1256
1256
|
dadosPDF.boleto.valorDocumento
|
|
1257
1257
|
);
|
|
@@ -1262,20 +1262,20 @@ function gerarPDF3(_0) {
|
|
|
1262
1262
|
if (dadosPDF.boleto.quantidade) {
|
|
1263
1263
|
dadosPDF.boleto.quantidade = maskFormat_default.numberToReal(dadosPDF.boleto.quantidade);
|
|
1264
1264
|
}
|
|
1265
|
-
const jurosMes =
|
|
1266
|
-
const
|
|
1267
|
-
if (
|
|
1268
|
-
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE
|
|
1265
|
+
const jurosMes = dadosPDF.beneficiario.dadosBancario.juros;
|
|
1266
|
+
const jurosDia = jurosMes / 100 / 30 * valorDocumento;
|
|
1267
|
+
if (jurosDia > 0) {
|
|
1268
|
+
dadosPDF.boleto.instrucao1 = `COBRAR JUROS DE R$${maskFormat_default.numberToReal(jurosDia)} AO DIA, AP\xD3S O VENCIMENTO`;
|
|
1269
1269
|
}
|
|
1270
|
-
const descontoVencimento =
|
|
1271
|
-
if (
|
|
1270
|
+
const descontoVencimento = dadosPDF.beneficiario.dadosBancario.desconto || 0;
|
|
1271
|
+
if (descontoVencimento > 0) {
|
|
1272
1272
|
dadosPDF.boleto.instrucao2 = `AT\xC9 O VENCIMENTO, CONCEDER DESCONTO DE ${descontoVencimento}%`;
|
|
1273
1273
|
}
|
|
1274
|
-
const multaAtraso =
|
|
1275
|
-
if (
|
|
1276
|
-
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}
|
|
1274
|
+
const multaAtraso = dadosPDF.beneficiario.dadosBancario.multa || 0;
|
|
1275
|
+
if (multaAtraso > 0) {
|
|
1276
|
+
dadosPDF.boleto.instrucao3 = `MULTA DE ${multaAtraso}%`;
|
|
1277
1277
|
}
|
|
1278
|
-
const protestoDias =
|
|
1278
|
+
const protestoDias = dadosPDF.beneficiario.dadosBancario.protesto || 0;
|
|
1279
1279
|
if (protestoDias > 0) {
|
|
1280
1280
|
dadosPDF.boleto.instrucao4 = `PROTESTAR AP\xD3S ${protestoDias} DIAS CORRIDOS DO VENCIMENTO`;
|
|
1281
1281
|
}
|