flit-modulo-exportacoes 2.0.89 → 2.0.90

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -11
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.processarTiposEventosExportacao = exports.retornaValorEvento = exports.calcularValoresExportacao = exports.validarDadosPayload = void 0;
4
4
  const contas_elastic_1 = require("./dao/contas-elastic");
5
5
  const unificacao_eventos_repetidos_1 = require("./unificacao-eventos-repetidos");
6
+ const jornadaUtils_1 = require("flit-calcular-jornada/dist/lib/helpers/jornadaUtils");
6
7
  const utils_1 = require("flit-calcular-jornada/dist/lib/helpers/utils");
7
8
  const jornada_model_1 = require("flit-calcular-jornada/dist/lib/models/jornada.model");
8
9
  const parametrosHorasNoturnas_model_1 = require("flit-calcular-jornada/dist/lib/models/parametrosHorasNoturnas.model");
@@ -405,19 +406,14 @@ async function calcularValoresExportacao({ contaId, elasticClient, conta, jornad
405
406
  valoresEventos.ValorNormal.Minutos += (jornada.horas_normais ?? 0) * 60;
406
407
  valoresEventos.ValorNoturno.Horas += jornada.horas_noturnas ?? 0;
407
408
  valoresEventos.ValorNoturno.Minutos += (jornada.horas_noturnas ?? 0) * 60;
408
- valoresEventos.ValorNoturnoTotal.Horas += jornada.horas_noturnas ?? 0;
409
- valoresEventos.ValorNoturnoTotal.Minutos += (jornada.horas_noturnas ?? 0) * 60;
410
- valoresEventos.ValorNoturnoTotal.Horas += jornada.horas_noturnas_extras ?? 0;
411
- valoresEventos.ValorNoturnoTotal.Minutos += (jornada.horas_noturnas_extras ?? 0) * 60;
412
- if (jornada.regime_compensacao === jornada_model_1.RegimesCompensacao.JornadaHibrida) {
413
- valoresEventos.ValorNoturnoTotal.Horas += jornada.banco_horas_noturno ?? 0;
414
- valoresEventos.ValorNoturnoTotal.Minutos += (jornada.banco_horas_noturno ?? 0) * 60;
415
- }
416
- const valorHorasTrabalhadas = (jornada.horas_normais ?? 0) + (jornada.horas_extras ?? 0) + (jornada.horas_noturnas ?? 0) + (jornada.horas_noturnas_extras ?? 0);
417
- valoresEventos.ValorHorasTrabalhadas.Horas += valorHorasTrabalhadas;
418
- valoresEventos.ValorHorasTrabalhadas.Minutos += valorHorasTrabalhadas * 60;
409
+ const valorNoturnoTotal = jornadaUtils_1.JornadaUtils.obterTotalDeHorasNoturnasDecimal(jornada);
410
+ valoresEventos.ValorNoturnoTotal.Horas += valorNoturnoTotal ?? 0;
411
+ valoresEventos.ValorNoturnoTotal.Minutos += (valorNoturnoTotal ?? 0) * 60;
419
412
  valoresEventos.ValorExtraIntrajornada.Horas += jornada.horas_extras_intrajornada ?? 0;
420
413
  valoresEventos.ValorExtraIntrajornada.Minutos += (jornada.horas_extras_intrajornada ?? 0) * 60;
414
+ const valorHorasTrabalhadas = jornadaUtils_1.JornadaUtils.obterTotalDeHorasTrabalhadasGeraisDecimal(jornada) ?? 0;
415
+ valoresEventos.ValorHorasTrabalhadas.Horas += valorHorasTrabalhadas;
416
+ valoresEventos.ValorHorasTrabalhadas.Minutos += valorHorasTrabalhadas * 60;
421
417
  const valorExtraIntrajornadaComReducao = (jornada.horas_extras_intrajornada ?? 0) * (horarioNoturno?.base_reducao_horario_noturno || 1);
422
418
  valoresEventos.ValorExtraIntrajornadaComReducao.Horas += valorExtraIntrajornadaComReducao;
423
419
  valoresEventos.ValorExtraIntrajornadaComReducao.Minutos += valorExtraIntrajornadaComReducao * 60;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "2.0.89",
3
+ "version": "2.0.90",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": {
@@ -17,7 +17,7 @@
17
17
  "devDependencies": {
18
18
  "@elastic/elasticsearch": "^8.19.1",
19
19
  "@types/luxon": "^3.7.1",
20
- "flit-calcular-jornada": "2.6.5",
20
+ "flit-calcular-jornada": "2.6.7",
21
21
  "prettier": "^3.6.2",
22
22
  "tsc-alias": "^1.8.16",
23
23
  "typescript": "^4.9.5"