@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.d.mts
CHANGED
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -2143,11 +2143,31 @@ function gerarDadosBoleto5({ dados }) {
|
|
|
2143
2143
|
let numeroDocumento = "";
|
|
2144
2144
|
let campoLivre = "";
|
|
2145
2145
|
if (convenio.length === 6) {
|
|
2146
|
-
|
|
2147
|
-
|
|
2146
|
+
switch (parcela.tipoDocumento) {
|
|
2147
|
+
case "NFE":
|
|
2148
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}2`, 5);
|
|
2149
|
+
break;
|
|
2150
|
+
case "FAT":
|
|
2151
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}4`, 5);
|
|
2152
|
+
break;
|
|
2153
|
+
case "FIN":
|
|
2154
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}5`, 5);
|
|
2155
|
+
break;
|
|
2156
|
+
}
|
|
2157
|
+
nossoNumero = getNossoNumero3(`${convenio}${numeroDocumento}`);
|
|
2148
2158
|
campoLivre = copy(nossoNumero, 1, 11) + padLeft(bancario.agencia, 4) + padLeft(`${bancario.numero}${bancario.numero_dv}`, 8) + padLeft(bancario.carteira, 2);
|
|
2149
2159
|
} else if (convenio.length === 7) {
|
|
2150
|
-
|
|
2160
|
+
switch (parcela.tipoDocumento) {
|
|
2161
|
+
case "NFE":
|
|
2162
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}2`, 10);
|
|
2163
|
+
break;
|
|
2164
|
+
case "FAT":
|
|
2165
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}4`, 10);
|
|
2166
|
+
break;
|
|
2167
|
+
case "FIN":
|
|
2168
|
+
numeroDocumento = padLeft(`${parcela.id_boleto}5`, 10);
|
|
2169
|
+
break;
|
|
2170
|
+
}
|
|
2151
2171
|
nossoNumero = `${convenio}${numeroDocumento}`;
|
|
2152
2172
|
campoLivre = `000000${nossoNumero}${padLeft(bancario.carteira, 2)}`;
|
|
2153
2173
|
}
|