@plasoft/boletos 1.0.52 → 1.0.54
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 +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +23 -3
- package/build/index.js.map +1 -1
- package/build/index.mjs +23 -3
- package/build/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -2108,11 +2108,31 @@ function gerarDadosBoleto5({ dados }) {
|
|
|
2108
2108
|
let numeroDocumento = "";
|
|
2109
2109
|
let campoLivre = "";
|
|
2110
2110
|
if (convenio.length === 6) {
|
|
2111
|
-
|
|
2112
|
-
|
|
2111
|
+
switch (parcela.tipoDocumento) {
|
|
2112
|
+
case "NFE":
|
|
2113
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}2`, 5);
|
|
2114
|
+
break;
|
|
2115
|
+
case "FAT":
|
|
2116
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}4`, 5);
|
|
2117
|
+
break;
|
|
2118
|
+
case "FIN":
|
|
2119
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}5`, 5);
|
|
2120
|
+
break;
|
|
2121
|
+
}
|
|
2122
|
+
nossoNumero = getNossoNumero3(`${convenio}${numeroDocumento}`);
|
|
2113
2123
|
campoLivre = copy(nossoNumero, 1, 11) + padLeft(bancario.agencia, 4) + padLeft(`${bancario.numero}${bancario.numero_dv}`, 8) + padLeft(bancario.carteira, 2);
|
|
2114
2124
|
} else if (convenio.length === 7) {
|
|
2115
|
-
|
|
2125
|
+
switch (parcela.tipoDocumento) {
|
|
2126
|
+
case "NFE":
|
|
2127
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}2`, 10);
|
|
2128
|
+
break;
|
|
2129
|
+
case "FAT":
|
|
2130
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}4`, 10);
|
|
2131
|
+
break;
|
|
2132
|
+
case "FIN":
|
|
2133
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}5`, 10);
|
|
2134
|
+
break;
|
|
2135
|
+
}
|
|
2116
2136
|
nossoNumero = `${convenio}${numeroDocumento}`;
|
|
2117
2137
|
campoLivre = `000000${nossoNumero}${padLeft(bancario.carteira, 2)}`;
|
|
2118
2138
|
}
|