bdpformulas 1.0.50 → 1.0.51

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.
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PrestamoDirectoHandler = void 0;
4
- const luxon_1 = require("luxon");
5
4
  const utils_1 = require("./utils");
6
5
  class PrestamoDirectoHandler {
7
6
  data;
@@ -37,8 +36,8 @@ class PrestamoDirectoHandler {
37
36
  }
38
37
  setMesesPorcionPagada() {
39
38
  if (this.prestamo.FechaDesembolso) {
40
- const inicial = luxon_1.DateTime.fromISO(this.data.InicioProyeccion);
41
- const desembolso = luxon_1.DateTime.fromISO(this.prestamo.FechaDesembolso);
39
+ const inicial = (0, utils_1.getDateTime)(this.data.InicioProyeccion).endOf('month');
40
+ const desembolso = (0, utils_1.getDateTime)(this.prestamo.FechaDesembolso).endOf('month');
42
41
  this.prestamo.MesesPorcionPagada = Math.floor(inicial.diff(desembolso, 'months').months);
43
42
  }
44
43
  }
@@ -59,11 +58,21 @@ class PrestamoDirectoHandler {
59
58
  const porcionCorrientePagada = (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
60
59
  if (gestion == 1) {
61
60
  if ((0, utils_1.ourParseFloat)(this.prestamo.Gracia) / 12 > 0) {
62
- value = (porcionCorriente + porcionNoCorriente) * tasa * mesesPorcionPagada / 12;
61
+ value =
62
+ ((porcionCorriente + porcionNoCorriente) *
63
+ tasa *
64
+ mesesPorcionPagada) /
65
+ 12;
63
66
  }
64
67
  else {
65
68
  if (plazo == this.prestamo.PlazoRemanenteAños) {
66
- value = (porcionCorriente + porcionNoCorriente + porcionCorrientePagada) * tasa * mesesPorcionPagada / 12;
69
+ value =
70
+ ((porcionCorriente +
71
+ porcionNoCorriente +
72
+ porcionCorrientePagada) *
73
+ tasa *
74
+ mesesPorcionPagada) /
75
+ 12;
67
76
  }
68
77
  else {
69
78
  value = (porcionCorriente + porcionNoCorriente) * tasa;
@@ -81,19 +90,27 @@ class PrestamoDirectoHandler {
81
90
  setAmortizacionesInteresFija() {
82
91
  if (this.prestamo.TipoFacilidad === 'FIJA') {
83
92
  const tasa = (0, utils_1.ourParseFloat)(this.prestamo.Tasa) / 100;
84
- this.prestamo.AmortizacionesInteres[`Gestion1`] = ((0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) * tasa / 12) * (0, utils_1.ourParseFloat)(this.prestamo.MesesPorcionPagada);
93
+ this.prestamo.AmortizacionesInteres[`Gestion1`] =
94
+ (((0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) * tasa) / 12) *
95
+ (0, utils_1.ourParseFloat)(this.prestamo.MesesPorcionPagada);
85
96
  const añoProyectadoInicio = (0, utils_1.ourParseFloat)(this.prestamo.AnnoProyectadoInicio);
86
- if (this.simuladorFijo2 && añoProyectadoInicio <= 3) {
87
- let i = añoProyectadoInicio > 1 ? añoProyectadoInicio : 2;
88
- this.simuladorFijo2.pagosAnuales.forEach(resumen => {
89
- this.prestamo.AmortizacionesInteres[`Gestion${i}`] = resumen.interesAnual;
97
+ if (this.simuladorFijo2 &&
98
+ añoProyectadoInicio &&
99
+ añoProyectadoInicio <= 3) {
100
+ let i = añoProyectadoInicio + 1;
101
+ this.simuladorFijo2.pagosAnuales.forEach((resumen) => {
102
+ this.prestamo.AmortizacionesInteres[`Gestion${i}`] =
103
+ resumen.interesAnual;
90
104
  i++;
91
105
  });
92
106
  }
93
107
  }
94
108
  }
95
109
  setPorcionNoCorriente(gestion) {
96
- this.prestamo.PorcionesNoCorrientes[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoLinea?.[`Gestion${gestion}`]) + (0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoExposicion?.[`Gestion${gestion}`]) - (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]);
110
+ this.prestamo.PorcionesNoCorrientes[`Gestion${gestion}`] =
111
+ (0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoLinea?.[`Gestion${gestion}`]) +
112
+ (0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoExposicion?.[`Gestion${gestion}`]) -
113
+ (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]);
97
114
  }
98
115
  setPorcionCuotasPagadas() {
99
116
  if (this.prestamo.FechaDesembolso) {
@@ -106,11 +123,14 @@ class PrestamoDirectoHandler {
106
123
  this.prestamo.PorcionPagada = (0, utils_1.ourParseFloat)(pagado.porcionCorrientePagada);
107
124
  this.prestamo.CuotasPagadas = pagado.cuotasPagadas;
108
125
  if (this.prestamo.TipoFacilidad === 'FIJA') {
109
- const dif = (0, utils_1.ourParseFloat)(this.prestamo.Gracia) - (0, utils_1.ourParseFloat)(this.prestamo.CuotasPagadas);
126
+ const dif = (0, utils_1.ourParseFloat)(this.prestamo.Gracia) -
127
+ (0, utils_1.ourParseFloat)(this.prestamo.CuotasPagadas);
110
128
  const periodoGracia = dif > 0 ? dif : 0;
111
129
  this.simuladorFijo2 = (0, utils_1.simuladorCuotas)({
112
- monto: (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada),
113
- plazo: (0, utils_1.ourParseFloat)(this.prestamo.Plazo) * 12 - (0, utils_1.ourParseFloat)(this.prestamo.CuotasPagadas),
130
+ monto: (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
131
+ (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada),
132
+ plazo: (0, utils_1.ourParseFloat)(this.prestamo.Plazo) * 12 -
133
+ (0, utils_1.ourParseFloat)(this.prestamo.CuotasPagadas),
114
134
  frecuencia: this.prestamo.TipoPeriodicidadId ?? 'MENSUAL',
115
135
  tipoCuota: this.prestamo.TipoFacilidad ?? 'VARIABLE',
116
136
  periodoGracia,
@@ -125,7 +145,7 @@ class PrestamoDirectoHandler {
125
145
  const amortizacion = {};
126
146
  if (añoProyectadoInicio && añoProyectadoInicio <= 3) {
127
147
  let i = añoProyectadoInicio;
128
- this.simulador.pagosAnuales.forEach(resumen => {
148
+ this.simulador.pagosAnuales.forEach((resumen) => {
129
149
  amortizacion[`Gestion${i}`] = (0, utils_1.ourParseFloat)(resumen.capitalAnual);
130
150
  i++;
131
151
  });
@@ -133,7 +153,8 @@ class PrestamoDirectoHandler {
133
153
  this.prestamo.AmortizacionesCapital = amortizacion;
134
154
  }
135
155
  setPlazoRemanente() {
136
- this.prestamo.PlazoRemanenteAños = Math.floor((0, utils_1.ourParseFloat)(this.prestamo.Plazo) - (0, utils_1.ourParseFloat)(this.prestamo.Gracia) / 12);
156
+ this.prestamo.PlazoRemanenteAños = Math.floor((0, utils_1.ourParseFloat)(this.prestamo.Plazo) -
157
+ (0, utils_1.ourParseFloat)(this.prestamo.Gracia) / 12);
137
158
  }
138
159
  setPlazos() {
139
160
  this.prestamo.Plazos = (0, utils_1.generatePlazos)({
@@ -152,11 +173,13 @@ class PrestamoDirectoHandler {
152
173
  if (plazo == 1) {
153
174
  valor = -(0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
154
175
  }
155
- else if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) + 1 == plazo) {
176
+ else if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) + 1 ==
177
+ plazo) {
156
178
  valor = (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
157
179
  }
158
180
  amortizacion[`Gestion${i}`] = valor;
159
- amortizacionCuotaFinal[`Gestion${i}`] = (0, utils_1.ourParseFloat)(valor + (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapital?.[`Gestion${i}`]));
181
+ amortizacionCuotaFinal[`Gestion${i}`] = (0, utils_1.ourParseFloat)(valor +
182
+ (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapital?.[`Gestion${i}`]));
160
183
  }
161
184
  this.prestamo.AmortizacionesCapitalEfectoCorriente = amortizacion;
162
185
  this.prestamo.AmortizacionesCapitalCuotaFinal = amortizacionCuotaFinal;
@@ -164,11 +187,11 @@ class PrestamoDirectoHandler {
164
187
  setCuadroExposicion() {
165
188
  const cuadro = {};
166
189
  const plazos = this.prestamo.Plazos;
167
- if (!this.prestamo.EsBajoLinea) {
190
+ const añoProyectadoInicio = (0, utils_1.ourParseFloat)(this.prestamo.AnnoProyectadoInicio);
191
+ if (!this.prestamo.EsBajoLinea && añoProyectadoInicio >= 1) {
168
192
  let value;
169
193
  for (let i = 1; i <= this.data.CantidadProyeccion; i++) {
170
194
  const plazo = (0, utils_1.ourParseFloat)(plazos?.[`Gestion${i}`]);
171
- const añoProyectadoInicio = (0, utils_1.ourParseFloat)(this.prestamo.AnnoProyectadoInicio);
172
195
  if (this.prestamo.TipoFacilidad === 'VARIABLE') {
173
196
  if (i === 1) {
174
197
  if (plazo && this.prestamo.AnnoProyectadoInicio === 1) {
@@ -176,26 +199,34 @@ class PrestamoDirectoHandler {
176
199
  value = 0;
177
200
  }
178
201
  else {
179
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
202
+ value =
203
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
204
+ (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
180
205
  }
181
206
  }
182
207
  }
183
208
  else {
184
- if ((0, utils_1.ourParseFloat)(this.prestamo.AnnoProyectadoInicio) <= i) {
209
+ if (añoProyectadoInicio <= i) {
185
210
  if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) < (0, utils_1.ourParseFloat)(plazo)) {
186
211
  value = this.prestamo.MontoOriginal;
187
212
  }
188
213
  else {
189
214
  const sumaAmortizaciones = (0, utils_1.sumCorrelativeKeys)({
190
- data: this.prestamo.AmortizacionesCapitalCuotaFinal ?? {},
215
+ data: this.prestamo
216
+ .AmortizacionesCapitalCuotaFinal ??
217
+ {},
191
218
  baseKey: 'Gestion',
192
219
  endIndex: i - 1
193
220
  });
194
221
  if ((0, utils_1.ourParseFloat)(this.prestamo.Gracia) > 0) {
195
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - sumaAmortizaciones;
222
+ value =
223
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - sumaAmortizaciones;
196
224
  }
197
225
  else {
198
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada) - sumaAmortizaciones;
226
+ value =
227
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
228
+ (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada) -
229
+ sumaAmortizaciones;
199
230
  }
200
231
  }
201
232
  }
@@ -212,7 +243,9 @@ class PrestamoDirectoHandler {
212
243
  baseKey: 'Gestion',
213
244
  endIndex: i - 1
214
245
  });
215
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - sumaAnteriores;
246
+ value =
247
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
248
+ sumaAnteriores;
216
249
  }
217
250
  }
218
251
  }
@@ -230,30 +263,40 @@ class PrestamoDirectoHandler {
230
263
  const plazo = plazos?.[`Gestion${i}`];
231
264
  if (i === 1) {
232
265
  if (plazo && this.prestamo.AnnoProyectadoInicio === 1) {
233
- if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) < plazo) {
266
+ if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) <
267
+ plazo) {
234
268
  value = this.prestamo.MontoOriginal;
235
269
  }
236
270
  else {
237
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
271
+ value =
272
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
273
+ (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada);
238
274
  }
239
275
  }
240
276
  }
241
277
  else {
242
278
  if ((0, utils_1.ourParseFloat)(this.prestamo.AnnoProyectadoInicio) <= i) {
243
- if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) < (0, utils_1.ourParseFloat)(plazo)) {
279
+ if ((0, utils_1.ourParseFloat)(this.prestamo.PlazoRemanenteAños) <
280
+ (0, utils_1.ourParseFloat)(plazo)) {
244
281
  value = this.prestamo.MontoOriginal;
245
282
  }
246
283
  else {
247
284
  const sumaAmortizaciones = (0, utils_1.sumCorrelativeKeys)({
248
- data: this.prestamo.AmortizacionesCapitalCuotaFinal ?? {},
285
+ data: this.prestamo
286
+ .AmortizacionesCapitalCuotaFinal ?? {},
249
287
  baseKey: 'Gestion',
250
288
  endIndex: i - 1
251
289
  });
252
290
  if ((0, utils_1.ourParseFloat)(this.prestamo.Gracia) > 0) {
253
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - sumaAmortizaciones;
291
+ value =
292
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
293
+ sumaAmortizaciones;
254
294
  }
255
295
  else {
256
- value = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) - (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada) - sumaAmortizaciones;
296
+ value =
297
+ (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
298
+ (0, utils_1.ourParseFloat)(this.prestamo.PorcionPagada) -
299
+ sumaAmortizaciones;
257
300
  }
258
301
  }
259
302
  }
@@ -1,7 +1,32 @@
1
- import { AdministracionFinancieraCalcData, ProyeccionPrestamo } from "../../../models/eeff/admFinanciera";
1
+ import { AdministracionFinancieraCalcData, ProyeccionPrestamo } from '../../../models/eeff/admFinanciera';
2
2
  interface AplicacionesData {
3
3
  data: AdministracionFinancieraCalcData;
4
4
  }
5
+ declare const filas: {
6
+ 'KO - Porci\u00F3n CP - BDP SAM': number;
7
+ 'KI - Porci\u00F3n CP - BDP SAM': number;
8
+ 'L/C Mixta - Porci\u00F3n CP - BDP SAM': number;
9
+ 'Porci\u00F3n LP - BDP SAM': number;
10
+ 'KO - Porci\u00F3n CP - Otras EIFs': number;
11
+ 'KI - Porci\u00F3n CP - Otras EIFs': number;
12
+ 'Otros - Porci\u00F3n CP - Otras EIFs': number;
13
+ 'L/C Mixta - Porci\u00F3n CP - Otras EIFs': number;
14
+ 'Porci\u00F3n LP - Otras EIFs': number;
15
+ 'Intereses y Comisiones - Prestamos Directos': number;
16
+ 'Intereses y Comisiones - Linea de Credito 100% KO': number;
17
+ 'Intereses y Comisiones - Linea de Credito Mixta': number;
18
+ 'Interes - MANUAL': number;
19
+ 'Total Intereses (BDP y Otras EIFs)': number;
20
+ 'Leasing CP (Venc.Corriente + Deuda CP) - Otras EIFs': number;
21
+ 'Leasing LP - Otras EIFs': number;
22
+ 'Intereses Leasing': number;
23
+ 'Interes Leasing - MANUAL': number;
24
+ 'TOTAL PORCI\u00D3N CP (Venc.Corriente) - BDP SAM': number;
25
+ 'TOTAL PORCI\u00D3N CP (Venc.Corriente) - Otras EIFs': number;
26
+ 'TOTAL PORCI\u00D3N LP - BDP SAM': number;
27
+ 'TOTAL PORCI\u00D3N LP - Otras EIFs': number;
28
+ };
29
+ export { filas as FILAS_PROYECCION_PRESTAMOS_DIRECTOS };
5
30
  export declare class ProyeccionPrestamosDirectosHandler {
6
31
  private data;
7
32
  private proyeccion;
@@ -24,4 +49,3 @@ export declare class ProyeccionPrestamosDirectosHandler {
24
49
  private setInteresesPrestamosDirectos;
25
50
  private setInteresesLineaKO;
26
51
  }
27
- export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProyeccionPrestamosDirectosHandler = void 0;
3
+ exports.ProyeccionPrestamosDirectosHandler = exports.FILAS_PROYECCION_PRESTAMOS_DIRECTOS = void 0;
4
4
  const admFinanciera_1 = require("../../../models/eeff/admFinanciera");
5
5
  const utils_1 = require("./utils");
6
6
  const filas = {
@@ -27,13 +27,15 @@ const filas = {
27
27
  'TOTAL PORCIÓN LP - BDP SAM': 20,
28
28
  'TOTAL PORCIÓN LP - Otras EIFs': 21
29
29
  };
30
+ exports.FILAS_PROYECCION_PRESTAMOS_DIRECTOS = filas;
30
31
  class ProyeccionPrestamosDirectosHandler {
31
32
  data;
32
33
  proyeccion;
33
34
  constructor({ data }) {
34
35
  this.data = data;
35
- const filaInteresManual = this.data.ProyeccionPrestamosDirectos.find(pr => pr.RubroId === admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesManual);
36
- const filaInteresLeasingManual = this.data.ProyeccionPrestamosDirectos.find(pr => pr.RubroId === admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesLeasingManual);
36
+ const filaInteresManual = this.data.ProyeccionPrestamosDirectos.find((pr) => pr.RubroId === admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesManual);
37
+ const filaInteresLeasingManual = this.data.ProyeccionPrestamosDirectos.find((pr) => pr.RubroId ===
38
+ admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesLeasingManual);
37
39
  this.proyeccion = [
38
40
  { Descripcion: 'KO - Porción CP - BDP SAM' },
39
41
  { Descripcion: 'KI - Porción CP - BDP SAM' },
@@ -45,18 +47,38 @@ class ProyeccionPrestamosDirectosHandler {
45
47
  { Descripcion: 'L/C Mixta - Porción CP - Otras EIFs' },
46
48
  { Descripcion: 'Porción LP - Otras EIFs' },
47
49
  { Descripcion: 'Intereses y Comisiones - Prestamos Directos' },
48
- { Descripcion: 'Intereses y Comisiones - Linea de Credito 100% KO' },
50
+ {
51
+ Descripcion: 'Intereses y Comisiones - Linea de Credito 100% KO'
52
+ },
49
53
  { Descripcion: 'Intereses y Comisiones - Linea de Credito Mixta' },
50
- { ...filaInteresManual, Descripcion: 'Interes - MANUAL', Editable: true, RubroId: admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesManual },
54
+ {
55
+ ...filaInteresManual,
56
+ Descripcion: 'Interes - MANUAL',
57
+ Editable: true,
58
+ RubroId: admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesManual
59
+ },
51
60
  { Descripcion: 'Total Intereses (BDP y Otras EIFs)' },
52
- { Descripcion: 'Leasing CP (Venc.Corriente + Deuda CP) - Otras EIFs' },
61
+ {
62
+ Descripcion: 'Leasing CP (Venc.Corriente + Deuda CP) - Otras EIFs'
63
+ },
53
64
  { Descripcion: 'Leasing LP - Otras EIFs' },
54
65
  { Descripcion: 'Intereses Leasing' },
55
- { ...filaInteresLeasingManual, Descripcion: 'Interes Leasing - MANUAL', Editable: true, RubroId: admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesLeasingManual },
56
- { Descripcion: 'TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM' },
57
- { Descripcion: 'TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs' },
58
- { Descripcion: 'TOTAL PORCIÓN LP - BDP SAM' },
59
- { Descripcion: 'TOTAL PORCIÓN LP - Otras EIFs' }
66
+ {
67
+ ...filaInteresLeasingManual,
68
+ Descripcion: 'Interes Leasing - MANUAL',
69
+ Editable: true,
70
+ RubroId: admFinanciera_1.rubros.proyeccionPrestamosDirectos.interesLeasingManual
71
+ },
72
+ {
73
+ Descripcion: 'TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM',
74
+ Clasificador: 'T'
75
+ },
76
+ {
77
+ Descripcion: 'TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs',
78
+ Clasificador: 'T'
79
+ },
80
+ { Descripcion: 'TOTAL PORCIÓN LP - BDP SAM', Clasificador: 'T' },
81
+ { Descripcion: 'TOTAL PORCIÓN LP - Otras EIFs', Clasificador: 'T' }
60
82
  ];
61
83
  }
62
84
  handle() {
@@ -83,137 +105,187 @@ class ProyeccionPrestamosDirectosHandler {
83
105
  }
84
106
  }
85
107
  setKOPorcionCPBDP(gestion) {
86
- const fila = this.proyeccion[filas["KO - Porción CP - BDP SAM"]];
87
- const filaTotalesCPBDP = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM"]];
88
- const prestamosFiltrados = this.data.PrestamoDirecto.filter(pr => pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion && pr.EsNuestroBanco);
89
- const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
108
+ const fila = this.proyeccion[filas['KO - Porción CP - BDP SAM']];
109
+ const filaTotalesCPBDP = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM']];
110
+ const prestamosFiltrados = this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B' &&
111
+ pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion &&
112
+ pr.EsNuestroBanco);
113
+ const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
114
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
90
115
  fila[`Gestion${gestion}`] = sumaGestion;
91
- filaTotalesCPBDP[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
116
+ filaTotalesCPBDP[`Gestion${gestion}`] =
117
+ (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
92
118
  }
93
119
  setKIPorcionCPBDP(gestion) {
94
- const fila = this.proyeccion[filas["KI - Porción CP - BDP SAM"]];
95
- const filaTotalesCPBDP = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM"]];
96
- const prestamosFiltrados = this.data.PrestamoDirecto.filter(pr => pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion && pr.EsNuestroBanco);
97
- const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
120
+ const fila = this.proyeccion[filas['KI - Porción CP - BDP SAM']];
121
+ const filaTotalesCPBDP = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM']];
122
+ const prestamosFiltrados = this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B' &&
123
+ pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion &&
124
+ pr.EsNuestroBanco);
125
+ const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
126
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
98
127
  fila[`Gestion${gestion}`] = sumaGestion;
99
- filaTotalesCPBDP[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
128
+ filaTotalesCPBDP[`Gestion${gestion}`] =
129
+ (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
100
130
  }
101
131
  setKOPorcionCPOtras(gestion) {
102
- const fila = this.proyeccion[filas["KO - Porción CP - Otras EIFs"]];
103
- const filaTotalesCPOtras = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs"]];
104
- const prestamosFiltrados = this.data.PrestamoDirecto.filter(pr => pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion && !pr.EsNuestroBanco);
105
- const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
132
+ const fila = this.proyeccion[filas['KO - Porción CP - Otras EIFs']];
133
+ const filaTotalesCPOtras = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs']];
134
+ const prestamosFiltrados = this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B' &&
135
+ pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion &&
136
+ !pr.EsNuestroBanco);
137
+ const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
138
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
106
139
  fila[`Gestion${gestion}`] = sumaGestion;
107
- filaTotalesCPOtras[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
140
+ filaTotalesCPOtras[`Gestion${gestion}`] =
141
+ (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
108
142
  }
109
143
  setKIPorcionCPOtras(gestion) {
110
- const fila = this.proyeccion[filas["KI - Porción CP - Otras EIFs"]];
111
- const filaTotalesCPOtras = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs"]];
112
- const prestamosFiltrados = this.data.PrestamoDirecto.filter(pr => pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion && !pr.EsNuestroBanco);
113
- const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
144
+ const fila = this.proyeccion[filas['KI - Porción CP - Otras EIFs']];
145
+ const filaTotalesCPOtras = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs']];
146
+ const prestamosFiltrados = this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B' &&
147
+ pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion &&
148
+ !pr.EsNuestroBanco);
149
+ const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
150
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
114
151
  fila[`Gestion${gestion}`] = sumaGestion;
115
- filaTotalesCPOtras[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
152
+ filaTotalesCPOtras[`Gestion${gestion}`] =
153
+ (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
116
154
  }
117
155
  setOtrasPorcionCPOtras(gestion) {
118
- const fila = this.proyeccion[filas["Otros - Porción CP - Otras EIFs"]];
119
- const filaTotalesCPOtras = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs"]];
120
- const prestamosFiltrados = this.data.PrestamoDirecto.filter(pr => pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.Otros && !pr.EsNuestroBanco);
121
- const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
156
+ const fila = this.proyeccion[filas['Otros - Porción CP - Otras EIFs']];
157
+ const filaTotalesCPOtras = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs']];
158
+ const prestamosFiltrados = this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B' &&
159
+ pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.Otros &&
160
+ !pr.EsNuestroBanco);
161
+ const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
162
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesCapital?.[`Gestion${gestion}`]), 0));
122
163
  fila[`Gestion${gestion}`] = sumaGestion;
123
- filaTotalesCPOtras[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
164
+ filaTotalesCPOtras[`Gestion${gestion}`] =
165
+ (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
124
166
  }
125
167
  setLCMixtaBDP(gestion) {
126
- const totalVencimiento = this.data.LineasMixtasBDP.find(lin => lin.Clasificador === 'T' && lin.RubroId === admFinanciera_1.rubros.lineasMixtas.vencimientoCorrienteLargoPlazo);
127
- const filaTotalesCPBDP = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM"]];
168
+ const totalVencimiento = this.data.LineasMixtasBDP.find((lin) => lin.Clasificador === 'T' &&
169
+ lin.RubroId ===
170
+ admFinanciera_1.rubros.lineasMixtas.vencimientoCorrienteLargoPlazo);
171
+ const filaTotalesCPBDP = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - BDP SAM']];
128
172
  if (totalVencimiento) {
129
- const fila = this.proyeccion[filas["L/C Mixta - Porción CP - BDP SAM"]];
173
+ const fila = this.proyeccion[filas['L/C Mixta - Porción CP - BDP SAM']];
130
174
  const valor = (0, utils_1.ourParseFloat)(totalVencimiento[`Gestion${gestion}`]);
131
175
  fila[`Gestion${gestion}`] = valor;
132
- filaTotalesCPBDP[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + valor;
176
+ filaTotalesCPBDP[`Gestion${gestion}`] =
177
+ (0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + valor;
133
178
  }
134
179
  }
135
180
  setLCMixtaOtras(gestion) {
136
- const totalVencimiento = this.data.LineasMixtasOtros.find(lin => lin.Clasificador === 'T' && lin.RubroId === admFinanciera_1.rubros.lineasMixtas.vencimientoCorrienteLargoPlazo);
137
- const filaTotalesCPOtras = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs"]];
181
+ const totalVencimiento = this.data.LineasMixtasOtros.find((lin) => lin.Clasificador === 'T' &&
182
+ lin.RubroId ===
183
+ admFinanciera_1.rubros.lineasMixtas.vencimientoCorrienteLargoPlazo);
184
+ const filaTotalesCPOtras = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs']];
138
185
  if (totalVencimiento) {
139
- const fila = this.proyeccion[filas["L/C Mixta - Porción CP - Otras EIFs"]];
186
+ const fila = this.proyeccion[filas['L/C Mixta - Porción CP - Otras EIFs']];
140
187
  const valor = (0, utils_1.ourParseFloat)(totalVencimiento[`Gestion${gestion}`]);
141
188
  fila[`Gestion${gestion}`] = valor;
142
- filaTotalesCPOtras[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + valor;
189
+ filaTotalesCPOtras[`Gestion${gestion}`] =
190
+ (0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + valor;
143
191
  }
144
192
  }
145
193
  setInteresesLineasMixtas(gestion) {
146
- const totalGastos = this.data.LineasMixtasOtros.find(lin => lin.Clasificador === 'T' && lin.RubroId === admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones);
147
- const filaTotales = this.proyeccion[filas["Total Intereses (BDP y Otras EIFs)"]];
148
- const filaInteresesManuales = this.proyeccion[filas["Interes - MANUAL"]];
194
+ const totalGastos = this.data.LineasMixtasOtros.find((lin) => lin.Clasificador === 'T' &&
195
+ lin.RubroId === admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones);
196
+ const filaTotales = this.proyeccion[filas['Total Intereses (BDP y Otras EIFs)']];
149
197
  if (totalGastos) {
150
- const fila = this.proyeccion[filas["Intereses y Comisiones - Linea de Credito Mixta"]];
198
+ const fila = this.proyeccion[filas['Intereses y Comisiones - Linea de Credito Mixta']];
151
199
  const valor = (0, utils_1.ourParseFloat)(totalGastos[`Gestion${gestion}`]);
152
200
  fila[`Gestion${gestion}`] = valor;
153
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor + (0, utils_1.ourParseFloat)(filaInteresesManuales[`Gestion${gestion}`]);
201
+ filaTotales[`Gestion${gestion}`] =
202
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
154
203
  }
155
204
  }
156
205
  setPorcionLPBDP(gestion) {
157
- const fila = this.proyeccion[filas["Porción LP - BDP SAM"]];
158
- const porcionesNoCorrientes = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.filter(p => p.EsNuestroBanco)
159
- .reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.PorcionesNoCorrientes?.[`Gestion${gestion}`]), 0));
160
- const totalDeudaFinancieraLineas = this.data.LineasMixtasBDP.find(lin => lin.Clasificador === 'T' && lin.RubroId === admFinanciera_1.rubros.lineasMixtas.deudaFinancieraLargoPlazo);
161
- const total = porcionesNoCorrientes + (0, utils_1.ourParseFloat)(totalDeudaFinancieraLineas?.[`Gestion${gestion}`]);
206
+ const fila = this.proyeccion[filas['Porción LP - BDP SAM']];
207
+ const porcionesNoCorrientes = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.filter((p) => p.IndicadorABM !== 'B' && p.EsNuestroBanco).reduce((acc, curr) => acc +
208
+ (0, utils_1.ourParseFloat)(curr.PorcionesNoCorrientes?.[`Gestion${gestion}`]), 0));
209
+ const totalDeudaFinancieraLineas = this.data.LineasMixtasBDP.find((lin) => lin.Clasificador === 'T' &&
210
+ lin.RubroId === admFinanciera_1.rubros.lineasMixtas.deudaFinancieraLargoPlazo);
211
+ const total = porcionesNoCorrientes +
212
+ (0, utils_1.ourParseFloat)(totalDeudaFinancieraLineas?.[`Gestion${gestion}`]);
162
213
  fila[`Gestion${gestion}`] = total;
163
- this.proyeccion[filas["TOTAL PORCIÓN LP - BDP SAM"]][`Gestion${gestion}`] = total;
214
+ this.proyeccion[filas['TOTAL PORCIÓN LP - BDP SAM']][`Gestion${gestion}`] = total;
164
215
  }
165
216
  setPorcionLPOtras(gestion) {
166
- const fila = this.proyeccion[filas["Porción LP - Otras EIFs"]];
167
- const filaTotales = this.proyeccion[filas["TOTAL PORCIÓN LP - Otras EIFs"]];
168
- const porcionesNoCorrientes = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.filter(p => !p.EsNuestroBanco)
169
- .reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.PorcionesNoCorrientes?.[`Gestion${gestion}`]), 0));
170
- const totalDeudaFinancieraLineas = this.data.LineasMixtasOtros.find(lin => lin.Clasificador === 'T' && lin.RubroId === admFinanciera_1.rubros.lineasMixtas.deudaFinancieraLargoPlazo);
171
- const total = porcionesNoCorrientes + (0, utils_1.ourParseFloat)(totalDeudaFinancieraLineas?.[`Gestion${gestion}`]);
217
+ const fila = this.proyeccion[filas['Porción LP - Otras EIFs']];
218
+ const filaTotales = this.proyeccion[filas['TOTAL PORCIÓN LP - Otras EIFs']];
219
+ const porcionesNoCorrientes = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.filter((p) => p.IndicadorABM !== 'B' && !p.EsNuestroBanco).reduce((acc, curr) => acc +
220
+ (0, utils_1.ourParseFloat)(curr.PorcionesNoCorrientes?.[`Gestion${gestion}`]), 0));
221
+ const totalDeudaFinancieraLineas = this.data.LineasMixtasOtros.find((lin) => lin.Clasificador === 'T' &&
222
+ lin.RubroId === admFinanciera_1.rubros.lineasMixtas.deudaFinancieraLargoPlazo);
223
+ const total = porcionesNoCorrientes +
224
+ (0, utils_1.ourParseFloat)(totalDeudaFinancieraLineas?.[`Gestion${gestion}`]);
172
225
  fila[`Gestion${gestion}`] = total;
173
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + total;
226
+ filaTotales[`Gestion${gestion}`] =
227
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + total;
174
228
  }
175
229
  setLeasingCP(gestion) {
176
- const fila = this.proyeccion[filas["Leasing CP (Venc.Corriente + Deuda CP) - Otras EIFs"]];
177
- const filaTotales = this.proyeccion[filas["TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs"]];
178
- const valor = (0, utils_1.ourParseFloat)(this.data.PrestamoLeasing.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.PorcionesCorrientes?.[`Gestion${gestion}`]), 0));
230
+ const fila = this.proyeccion[filas['Leasing CP (Venc.Corriente + Deuda CP) - Otras EIFs']];
231
+ const filaTotales = this.proyeccion[filas['TOTAL PORCIÓN CP (Venc.Corriente) - Otras EIFs']];
232
+ const prestamosLeasing = this.data.PrestamoLeasing.filter((pr) => pr.IndicadorABM !== 'B');
233
+ const valor = (0, utils_1.ourParseFloat)(prestamosLeasing.reduce((acc, curr) => acc +
234
+ (0, utils_1.ourParseFloat)(curr.PorcionesCorrientes?.[`Gestion${gestion}`]), 0));
179
235
  fila[`Gestion${gestion}`] = valor;
180
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
236
+ filaTotales[`Gestion${gestion}`] =
237
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
181
238
  }
182
239
  setLeasingLP(gestion) {
183
- const fila = this.proyeccion[filas["Leasing LP - Otras EIFs"]];
184
- const filaTotales = this.proyeccion[filas["TOTAL PORCIÓN LP - Otras EIFs"]];
185
- const valor = (0, utils_1.ourParseFloat)(this.data.PrestamoLeasing.reduce((acc, curr) => {
240
+ const fila = this.proyeccion[filas['Leasing LP - Otras EIFs']];
241
+ const filaTotales = this.proyeccion[filas['TOTAL PORCIÓN LP - Otras EIFs']];
242
+ const prestamosLeasing = this.data.PrestamoLeasing.filter((pr) => pr.IndicadorABM !== 'B');
243
+ const valor = (0, utils_1.ourParseFloat)(prestamosLeasing.reduce((acc, curr) => {
186
244
  const value = (0, utils_1.ourParseFloat)(curr.PorcionesNoCorrientes?.[`Gestion${gestion}`]);
187
245
  return acc + (value > 0 ? value : 0);
188
246
  }, 0));
189
247
  fila[`Gestion${gestion}`] = valor;
190
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
248
+ filaTotales[`Gestion${gestion}`] =
249
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
191
250
  }
192
251
  setInteresLeasing(gestion) {
193
252
  if (gestion > 1) {
194
- const fila = this.proyeccion[filas["Intereses Leasing"]];
195
- fila[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(this.data.PrestamoLeasing.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesInteres?.[`Gestion${gestion - 1}`]), 0));
253
+ const fila = this.proyeccion[filas['Intereses Leasing']];
254
+ const prestamosLeasing = this.data.PrestamoLeasing.filter((pr) => pr.IndicadorABM !== 'B');
255
+ fila[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(prestamosLeasing.reduce((acc, curr) => acc +
256
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesInteres?.[`Gestion${gestion - 1}`]), 0));
196
257
  }
197
258
  }
198
259
  setInteresesPrestamosDirectos(gestion) {
199
- const filaTotales = this.proyeccion[filas["Total Intereses (BDP y Otras EIFs)"]];
200
- const fila = this.proyeccion[filas["Intereses y Comisiones - Prestamos Directos"]];
201
- const totalAmortizacionesInteres = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.reduce((acc, curr) => acc + (0, utils_1.ourParseFloat)(curr.AmortizacionesInteres?.[`Gestion${gestion}`]), 0));
202
- const totalPagoCostosFinancieros = this.data.ProyeccionPrestamosBajoLineas.find(p => p.Clasificador == 'T')?.[`Gestion${gestion}`];
203
- const totalGastosFinancieroBDP = this.data.LineasMixtasBDP.find(p => p.Clasificador == 'T' && p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion + 1}`];
204
- const totalGastosFinancieroOtros = this.data.LineasMixtasOtros.find(p => p.Clasificador == 'T' && p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion + 1}`];
205
- const costosMasGastos = (0, utils_1.ourParseFloat)(totalPagoCostosFinancieros) + (0, utils_1.ourParseFloat)(totalGastosFinancieroBDP) + (0, utils_1.ourParseFloat)(totalGastosFinancieroOtros);
260
+ const filaInteresesManuales = this.proyeccion[filas['Interes - MANUAL']];
261
+ const filaTotales = this.proyeccion[filas['Total Intereses (BDP y Otras EIFs)']];
262
+ const fila = this.proyeccion[filas['Intereses y Comisiones - Prestamos Directos']];
263
+ const totalAmortizacionesInteres = (0, utils_1.ourParseFloat)(this.data.PrestamoDirecto.filter((pr) => pr.IndicadorABM !== 'B').reduce((acc, curr) => acc +
264
+ (0, utils_1.ourParseFloat)(curr.AmortizacionesInteres?.[`Gestion${gestion}`]), 0));
265
+ const totalPagoCostosFinancieros = this.data.ProyeccionPrestamosBajoLineas.find((p) => p.Clasificador == 'T')?.[`Gestion${gestion}`];
266
+ const totalGastosFinancieroBDP = this.data.LineasMixtasBDP.find((p) => p.Clasificador == 'T' &&
267
+ p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion + 1}`];
268
+ const totalGastosFinancieroOtros = this.data.LineasMixtasOtros.find((p) => p.Clasificador == 'T' &&
269
+ p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion + 1}`];
270
+ const costosMasGastos = (0, utils_1.ourParseFloat)(totalPagoCostosFinancieros) +
271
+ (0, utils_1.ourParseFloat)(totalGastosFinancieroBDP) +
272
+ (0, utils_1.ourParseFloat)(totalGastosFinancieroOtros);
206
273
  const total = totalAmortizacionesInteres + costosMasGastos;
207
274
  const valor = total - costosMasGastos;
208
275
  fila[`Gestion${gestion}`] = valor;
209
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + valor;
276
+ filaTotales[`Gestion${gestion}`] =
277
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) +
278
+ valor +
279
+ (0, utils_1.ourParseFloat)(filaInteresesManuales[`Gestion${gestion}`]);
210
280
  }
211
281
  setInteresesLineaKO(gestion) {
212
- const fila = this.proyeccion[filas["Intereses y Comisiones - Linea de Credito 100% KO"]];
213
- const filaTotales = this.proyeccion[filas["Total Intereses (BDP y Otras EIFs)"]];
214
- const totalPagoCostosFinancieros = (0, utils_1.ourParseFloat)(this.data.ProyeccionPrestamosBajoLineas.find(p => p.Clasificador == 'T')?.[`Gestion${gestion}`]);
282
+ const fila = this.proyeccion[filas['Intereses y Comisiones - Linea de Credito 100% KO']];
283
+ const filaTotales = this.proyeccion[filas['Total Intereses (BDP y Otras EIFs)']];
284
+ const totalPagoCostosFinancieros = (0, utils_1.ourParseFloat)(this.data.ProyeccionPrestamosBajoLineas.find((p) => p.Clasificador == 'T')?.[`Gestion${gestion}`]);
215
285
  fila[`Gestion${gestion}`] = totalPagoCostosFinancieros;
216
- filaTotales[`Gestion${gestion}`] = (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) + totalPagoCostosFinancieros;
286
+ filaTotales[`Gestion${gestion}`] =
287
+ (0, utils_1.ourParseFloat)(filaTotales[`Gestion${gestion}`]) +
288
+ totalPagoCostosFinancieros;
217
289
  }
218
290
  }
219
291
  exports.ProyeccionPrestamosDirectosHandler = ProyeccionPrestamosDirectosHandler;