@plasoft/boletos 1.0.71 → 1.0.73
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 copy.hbs +493 -0
- package/build/ailos-boleto-hibrido.hbs +531 -0
- package/build/index.d.mts +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +12 -3
- package/build/index.js.map +1 -1
- package/build/index.mjs +12 -3
- package/build/index.mjs.map +1 -1
- package/package.json +1 -1
- package/build/exemplo.png +0 -0
- package/build/qrcode-example.svg +0 -191
- package/build/view.html +0 -325
package/build/index.mjs
CHANGED
|
@@ -101,7 +101,7 @@ function numberToReal(numero) {
|
|
|
101
101
|
}
|
|
102
102
|
function codigoBarra(codigo) {
|
|
103
103
|
const formatter = new StringMask("00000.00000 00000.000000 00000.000000 0 000000000000000");
|
|
104
|
-
return formatter.apply(codigo);
|
|
104
|
+
return formatter.apply(codigo.replace(/\D/g, ""));
|
|
105
105
|
}
|
|
106
106
|
var maskFormat_default = {
|
|
107
107
|
numberToReal,
|
|
@@ -656,7 +656,11 @@ function retornaMes(data) {
|
|
|
656
656
|
import { format as format2 } from "date-fns";
|
|
657
657
|
function agruparRetorno(documentos) {
|
|
658
658
|
return documentos.reduce((acc, documento) => {
|
|
659
|
-
const
|
|
659
|
+
const dateObj = new Date(documento.data);
|
|
660
|
+
if (isNaN(dateObj.getTime())) {
|
|
661
|
+
return acc;
|
|
662
|
+
}
|
|
663
|
+
const dataKey = format2(dateObj, "yyyy-MM-dd");
|
|
660
664
|
if (!acc[dataKey]) {
|
|
661
665
|
acc[dataKey] = [];
|
|
662
666
|
}
|
|
@@ -1004,6 +1008,7 @@ function getDigito2(texto) {
|
|
|
1004
1008
|
import BwipJs3 from "bwip-js";
|
|
1005
1009
|
function gerarPDF2(_0) {
|
|
1006
1010
|
return __async(this, arguments, function* ({ dados }) {
|
|
1011
|
+
var _a;
|
|
1007
1012
|
try {
|
|
1008
1013
|
const { generatePDF, dadosPDF } = dados;
|
|
1009
1014
|
if (!dadosPDF.pagador.cpfcnpj) {
|
|
@@ -1067,7 +1072,10 @@ function gerarPDF2(_0) {
|
|
|
1067
1072
|
}
|
|
1068
1073
|
dadosPDF.boleto.valor = maskFormat_default.numberToReal(dadosPDF.boleto.valor);
|
|
1069
1074
|
dadosPDF.pagador.isCnpj = dadosPDF.pagador.cpfcnpj.length > 14;
|
|
1070
|
-
|
|
1075
|
+
let content = compileHbs(getPathTemplates("ailos-boleto.hbs"), dadosPDF);
|
|
1076
|
+
if ((_a = dadosPDF.boleto) == null ? void 0 : _a.pix) {
|
|
1077
|
+
content = compileHbs(getPathTemplates("ailos-boleto-hibrido.hbs"), dadosPDF);
|
|
1078
|
+
}
|
|
1071
1079
|
const config = {
|
|
1072
1080
|
displayHeaderFooter: false,
|
|
1073
1081
|
path: "./boleto.pdf",
|
|
@@ -3657,3 +3665,4 @@ export {
|
|
|
3657
3665
|
src_default as default,
|
|
3658
3666
|
defineConfig
|
|
3659
3667
|
};
|
|
3668
|
+
//# sourceMappingURL=index.mjs.map
|