flit-modulo-exportacoes 2.0.46 → 2.0.48
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/dist/index.js
CHANGED
|
@@ -318,8 +318,8 @@ async function calcularValoresExportacao({ contaId, dataFinal, dataInicial, elas
|
|
|
318
318
|
valoresEventos.ValorExtraIntrajornadaComReducao.Horas += valorExtraIntrajornadaComReducao;
|
|
319
319
|
valoresEventos.ValorExtraIntrajornadaComReducao.Minutos += valorExtraIntrajornadaComReducao * 60;
|
|
320
320
|
if ((jornada.regime_compensacao ?? flit_calcular_jornada_1.RegimesCompensacao.HorasExtras) === flit_calcular_jornada_1.RegimesCompensacao.HorasExtras) {
|
|
321
|
-
valoresEventos.ValorAtraso.Horas += jornada.horas_negativas ?? 0;
|
|
322
|
-
valoresEventos.ValorAtraso.Minutos += (jornada.horas_negativas ?? 0) * 60;
|
|
321
|
+
valoresEventos.ValorAtraso.Horas += Math.abs(jornada.horas_negativas ?? 0);
|
|
322
|
+
valoresEventos.ValorAtraso.Minutos += Math.abs(jornada.horas_negativas ?? 0) * 60;
|
|
323
323
|
valoresEventos.FaixaSemanal.ValorFaixa1.Horas += jornada.faixas_horas_extras?.semanal?.faixa1 ?? 0;
|
|
324
324
|
valoresEventos.FaixaSemanal.ValorFaixa1.Minutos += (jornada.faixas_horas_extras?.semanal?.faixa1 ?? 0) * 60;
|
|
325
325
|
valoresEventos.FaixaSemanal.ValorFaixa2.Horas += jornada.faixas_horas_extras?.semanal?.faixa2 ?? 0;
|
|
@@ -15,7 +15,7 @@ class UnificacaoEventosRepetidos {
|
|
|
15
15
|
agruparArray({ campo, array }) {
|
|
16
16
|
return array.reduce((acc, item) => ({
|
|
17
17
|
...acc,
|
|
18
|
-
[item[campo]]: [...(acc[item[campo]] ?? []), item]
|
|
18
|
+
[item[campo]]: [...(acc[item[campo]] ?? []), item]
|
|
19
19
|
}), {});
|
|
20
20
|
}
|
|
21
21
|
processarValoresCodigosRepetidos({ valoresEventos, eventosAgrupados }) {
|
|
@@ -23,6 +23,14 @@ class UnificacaoEventosRepetidos {
|
|
|
23
23
|
let somatorioMinutos = 0;
|
|
24
24
|
for (let index = 0; index < eventosAgrupados.length; index++) {
|
|
25
25
|
switch (eventosAgrupados[index].tipo) {
|
|
26
|
+
case models_1.TipoEventoExportacao.FALTA:
|
|
27
|
+
somatorioHoras += valoresEventos.ValorFaltas.Horas ?? 0;
|
|
28
|
+
somatorioMinutos += valoresEventos.ValorFaltas.Minutos ?? 0;
|
|
29
|
+
if (index > 0) {
|
|
30
|
+
valoresEventos.ValorAtraso.Horas = 0;
|
|
31
|
+
valoresEventos.ValorAtraso.Minutos = 0;
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
26
34
|
case models_1.TipoEventoExportacao.ATRASO:
|
|
27
35
|
somatorioHoras += valoresEventos.ValorAtraso.Horas ?? 0;
|
|
28
36
|
somatorioMinutos += valoresEventos.ValorAtraso.Minutos ?? 0;
|
|
@@ -204,6 +212,10 @@ class UnificacaoEventosRepetidos {
|
|
|
204
212
|
}
|
|
205
213
|
}
|
|
206
214
|
switch (eventosAgrupados[0].tipo) {
|
|
215
|
+
case models_1.TipoEventoExportacao.FALTA:
|
|
216
|
+
valoresEventos.ValorFaltas.Horas = somatorioHoras;
|
|
217
|
+
valoresEventos.ValorFaltas.Minutos = somatorioMinutos;
|
|
218
|
+
break;
|
|
207
219
|
case models_1.TipoEventoExportacao.ATRASO:
|
|
208
220
|
valoresEventos.ValorAtraso.Horas = somatorioHoras;
|
|
209
221
|
valoresEventos.ValorAtraso.Minutos = somatorioMinutos;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flit-modulo-exportacoes",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"moment": "^2.30.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@elastic/elasticsearch": "^8.
|
|
18
|
+
"@elastic/elasticsearch": "^8.13.0",
|
|
19
19
|
"@types/luxon": "^3.4.2",
|
|
20
20
|
"flit-calcular-jornada": "^2.1.22",
|
|
21
21
|
"prettier": "^3.2.5",
|