bdpformulas 1.0.82 → 1.0.84
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.ts +2 -0
- package/build/index.js +3 -1
- package/build/models/eeff/admFinanciera/index.d.ts +3 -0
- package/build/models/eeff/calculosAuxiliares.d.ts +50 -0
- package/build/models/eeff/calculosAuxiliares.js +9 -0
- package/build/strategies/eeff/admFinanciera/aplicacionesHandler.js +21 -6
- package/build/strategies/eeff/admFinanciera/index.d.ts +0 -0
- package/build/strategies/eeff/admFinanciera/index.js +1 -0
- package/build/strategies/eeff/admFinanciera/prestamoDirectoHandler.js +14 -7
- package/build/strategies/eeff/admFinanciera/prestamoLeasingHandler.d.ts +1 -1
- package/build/strategies/eeff/admFinanciera/prestamoLeasingHandler.js +34 -14
- package/build/strategies/eeff/admFinanciera/proyeccionPrestamosDirectosHandler.js +7 -7
- package/build/strategies/eeff/admFinanciera/utils.d.ts +2 -1
- package/build/strategies/eeff/admFinanciera/utils.js +4 -2
- package/build/strategies/eeff/calculosAuxiliares.strategy.d.ts +13 -0
- package/build/strategies/eeff/calculosAuxiliares.strategy.js +83 -0
- package/build/strategies/eeff/index.d.ts +0 -1
- package/build/strategies/eeff/index.js +0 -586
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import AdmFinancieraStrategy from './strategies/eeff/admFinanciera.strategy';
|
|
|
23
23
|
import SupuestosStrategy from './strategies/eeff/supuestos.strategy';
|
|
24
24
|
import DeudasStrategy from './strategies/eeff/deudas.strategy';
|
|
25
25
|
import ItapStrategy from './strategies/general/itap.stretegy';
|
|
26
|
+
import CalculosAuxiliaresStrategy from './strategies/eeff/calculosAuxiliares.strategy';
|
|
26
27
|
declare const Pecuario: {
|
|
27
28
|
Auxiliar: typeof Auxiliar;
|
|
28
29
|
Desarrollo: typeof Desarrollo;
|
|
@@ -48,6 +49,7 @@ declare const EEFF: {
|
|
|
48
49
|
AdmFinancieraStrategy: typeof AdmFinancieraStrategy;
|
|
49
50
|
SupuestosStrategy: typeof SupuestosStrategy;
|
|
50
51
|
DeudasStrategy: typeof DeudasStrategy;
|
|
52
|
+
CalculosAuxiliaresStrategy: typeof CalculosAuxiliaresStrategy;
|
|
51
53
|
};
|
|
52
54
|
declare const General: {
|
|
53
55
|
BalanceGeneralStrategy: typeof BalanceGeneralStrategy;
|
package/build/index.js
CHANGED
|
@@ -30,6 +30,7 @@ const admFinanciera_strategy_1 = __importDefault(require("./strategies/eeff/admF
|
|
|
30
30
|
const supuestos_strategy_1 = __importDefault(require("./strategies/eeff/supuestos.strategy"));
|
|
31
31
|
const deudas_strategy_1 = __importDefault(require("./strategies/eeff/deudas.strategy"));
|
|
32
32
|
const itap_stretegy_1 = __importDefault(require("./strategies/general/itap.stretegy"));
|
|
33
|
+
const calculosAuxiliares_strategy_1 = __importDefault(require("./strategies/eeff/calculosAuxiliares.strategy"));
|
|
33
34
|
const Pecuario = {
|
|
34
35
|
Auxiliar: anexo_strategy_1.default,
|
|
35
36
|
Desarrollo: desarrollo_strategy_1.default,
|
|
@@ -57,7 +58,8 @@ const EEFF = {
|
|
|
57
58
|
FlujoProyectadoEEFFStrategy: flujoProyEEFF_strategy_1.default,
|
|
58
59
|
AdmFinancieraStrategy: admFinanciera_strategy_1.default,
|
|
59
60
|
SupuestosStrategy: supuestos_strategy_1.default,
|
|
60
|
-
DeudasStrategy: deudas_strategy_1.default
|
|
61
|
+
DeudasStrategy: deudas_strategy_1.default,
|
|
62
|
+
CalculosAuxiliaresStrategy: calculosAuxiliares_strategy_1.default
|
|
61
63
|
};
|
|
62
64
|
exports.EEFF = EEFF;
|
|
63
65
|
const General = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Frecuencia, TipoCuota } from '../../../strategies/eeff/admFinanciera/utils';
|
|
2
|
+
import { CalculoAuxiliarCalc } from '../calculosAuxiliares';
|
|
2
3
|
export type TipoOperacionLeasing = 'LEASING' | 'LEASEBACK';
|
|
3
4
|
export declare enum TipoDestinoEnum {
|
|
4
5
|
CapitalInversion = "KI",
|
|
@@ -123,6 +124,8 @@ export interface AdministracionFinancieraData {
|
|
|
123
124
|
LineasMixtasBDP: Partial<LineaCreditoMixta>[];
|
|
124
125
|
LineasMixtasOtros: Partial<LineaCreditoMixta>[];
|
|
125
126
|
ProyeccionPrestamosDirectos: Partial<ProyeccionPrestamo>[];
|
|
127
|
+
CalculosAuxiliaresData: CalculoAuxiliarCalc;
|
|
128
|
+
CorrelativoCalculoAuxiliar: number | null;
|
|
126
129
|
}
|
|
127
130
|
export interface AdministracionFinancieraCalcData extends AdministracionFinancieraData {
|
|
128
131
|
ProyeccionPrestamosBajoLineas: Partial<ProyeccionPrestamo>[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface FormulaNotaValue {
|
|
2
|
+
value: number;
|
|
3
|
+
note?: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
notaId?: any;
|
|
6
|
+
isPercentage?: boolean;
|
|
7
|
+
formula?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GestionActividad {
|
|
10
|
+
GestionNumber: number;
|
|
11
|
+
Fecha: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Pasivo {
|
|
14
|
+
ActividadDeudaId: number;
|
|
15
|
+
ActividadEconomicaId: number;
|
|
16
|
+
Activo: boolean;
|
|
17
|
+
Banco: string;
|
|
18
|
+
Correlativo: number;
|
|
19
|
+
Descripcion: string;
|
|
20
|
+
DestinoOperacionId: 'KI' | 'KO' | 'BL_KO' | 'BL_MIXTA';
|
|
21
|
+
EsNuestroBanco: boolean;
|
|
22
|
+
IndicadorABM: 'A' | 'N' | 'M' | 'B';
|
|
23
|
+
CortoPlazo: number | FormulaNotaValue;
|
|
24
|
+
MontoOriginal: number | FormulaNotaValue;
|
|
25
|
+
PorcionCP: number | FormulaNotaValue;
|
|
26
|
+
PorcionLP: number | FormulaNotaValue;
|
|
27
|
+
TipoDeuda: string;
|
|
28
|
+
UUID: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PasivosGestionCalc {
|
|
31
|
+
Pasivos: Pasivo[];
|
|
32
|
+
IndicadorABM?: 'A' | 'N' | 'M' | 'B';
|
|
33
|
+
TotalCortoPlazoBLKO?: number;
|
|
34
|
+
TotalPorcionCPKO?: number;
|
|
35
|
+
TotalBLMixta?: number;
|
|
36
|
+
TotalPorcionCPBDP?: number;
|
|
37
|
+
TotalPorcionCPOtros?: number;
|
|
38
|
+
TotalPorcionLPBDP?: number;
|
|
39
|
+
TotalPorcionLPOtros?: number;
|
|
40
|
+
TotalDeudasDirectasKIyKO?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface CalculoAuxiliarCalc {
|
|
43
|
+
[key: string]: PasivosGestionCalc;
|
|
44
|
+
}
|
|
45
|
+
export declare const ValoresDestino: {
|
|
46
|
+
'B/L KO': string;
|
|
47
|
+
'B/L Mixta': string;
|
|
48
|
+
KI: string;
|
|
49
|
+
KO: string;
|
|
50
|
+
};
|
|
@@ -44,8 +44,9 @@ class AplicacionesHandler {
|
|
|
44
44
|
pr.TipoExistencia === 'NUEVA' &&
|
|
45
45
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion).map((pr) => {
|
|
46
46
|
const proyeccion = {};
|
|
47
|
-
if (pr.AnnoProyectadoInicio) {
|
|
48
|
-
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal)
|
|
47
|
+
if (pr.AnnoProyectadoInicio && pr.AnnoProyectadoInicio <= 3) {
|
|
48
|
+
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal) -
|
|
49
|
+
(0, utils_1.ourParseFloat)(pr.PorcionPagada);
|
|
49
50
|
proyeccion[`Gestion${pr.AnnoProyectadoInicio}`] = value;
|
|
50
51
|
filaTotales[`Gestion${pr.AnnoProyectadoInicio}`] =
|
|
51
52
|
(0, utils_1.ourParseFloat)(filaTotales[`Gestion${pr.AnnoProyectadoInicio}`]) + value;
|
|
@@ -61,6 +62,12 @@ class AplicacionesHandler {
|
|
|
61
62
|
filaTotales[`Gestion${i}`] =
|
|
62
63
|
(0, utils_1.ourParseFloat)(filaTotales[`Gestion${i}`]) - (KOBDP + KOOtros);
|
|
63
64
|
}
|
|
65
|
+
if (this.data.CorrelativoCalculoAuxiliar) {
|
|
66
|
+
const totalPorcionCPKO = this.data.CalculosAuxiliaresData[this.data.CorrelativoCalculoAuxiliar]?.TotalPorcionCPKO;
|
|
67
|
+
filaTotales[`Gestion1`] =
|
|
68
|
+
(0, utils_1.ourParseFloat)(filaTotales[`Gestion1`]) -
|
|
69
|
+
(0, utils_1.ourParseFloat)(totalPorcionCPKO);
|
|
70
|
+
}
|
|
64
71
|
this.data.ProyeccionAplicaciones.push(...filas, filaTotales);
|
|
65
72
|
}
|
|
66
73
|
setKIPrestamoDirecto() {
|
|
@@ -72,8 +79,9 @@ class AplicacionesHandler {
|
|
|
72
79
|
pr.TipoExistencia === 'NUEVA' &&
|
|
73
80
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion).map((pr) => {
|
|
74
81
|
const proyeccion = {};
|
|
75
|
-
if (pr.AnnoProyectadoInicio) {
|
|
76
|
-
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal)
|
|
82
|
+
if (pr.AnnoProyectadoInicio && pr.AnnoProyectadoInicio <= 3) {
|
|
83
|
+
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal) -
|
|
84
|
+
(0, utils_1.ourParseFloat)(pr.PorcionPagada);
|
|
77
85
|
proyeccion[`Gestion${pr.AnnoProyectadoInicio}`] = value;
|
|
78
86
|
filaTotales[`Gestion${pr.AnnoProyectadoInicio}`] =
|
|
79
87
|
(0, utils_1.ourParseFloat)(filaTotales[`Gestion${pr.AnnoProyectadoInicio}`]) + value;
|
|
@@ -94,8 +102,9 @@ class AplicacionesHandler {
|
|
|
94
102
|
pr.TipoExistencia === 'NUEVA' &&
|
|
95
103
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.Otros).map((pr) => {
|
|
96
104
|
const proyeccion = {};
|
|
97
|
-
if (pr.AnnoProyectadoInicio) {
|
|
98
|
-
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal)
|
|
105
|
+
if (pr.AnnoProyectadoInicio && pr.AnnoProyectadoInicio <= 3) {
|
|
106
|
+
const value = (0, utils_1.ourParseFloat)(pr.MontoOriginal) -
|
|
107
|
+
(0, utils_1.ourParseFloat)(pr.PorcionPagada);
|
|
99
108
|
proyeccion[`Gestion${pr.AnnoProyectadoInicio}`] = value;
|
|
100
109
|
filaTotales[`Gestion${pr.AnnoProyectadoInicio}`] =
|
|
101
110
|
(0, utils_1.ourParseFloat)(filaTotales[`Gestion${pr.AnnoProyectadoInicio}`]) + value;
|
|
@@ -196,6 +205,12 @@ class AplicacionesHandler {
|
|
|
196
205
|
}
|
|
197
206
|
i += 4;
|
|
198
207
|
}
|
|
208
|
+
if (this.data.CorrelativoCalculoAuxiliar) {
|
|
209
|
+
const totalBLMixta = this.data.CalculosAuxiliaresData[this.data.CorrelativoCalculoAuxiliar]?.TotalBLMixta;
|
|
210
|
+
filaTotales[`Gestion1`] =
|
|
211
|
+
(0, utils_1.ourParseFloat)(filaTotales[`Gestion1`]) -
|
|
212
|
+
(0, utils_1.ourParseFloat)(totalBLMixta);
|
|
213
|
+
}
|
|
199
214
|
this.data.ProyeccionAplicaciones.push(...filas, filaTotales);
|
|
200
215
|
}
|
|
201
216
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -112,30 +112,37 @@ class PrestamoDirectoHandler {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
setPorcionNoCorriente(gestion) {
|
|
115
|
+
const porcionCorriente = this.prestamo.TipoFacilidad == 'VARIABLE'
|
|
116
|
+
? (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`])
|
|
117
|
+
: (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapital?.[`Gestion${gestion}`]);
|
|
115
118
|
this.prestamo.PorcionesNoCorrientes[`Gestion${gestion}`] =
|
|
116
119
|
(0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoLinea?.[`Gestion${gestion}`]) +
|
|
117
120
|
(0, utils_1.ourParseFloat)(this.prestamo.CuadroEfectoExposicion?.[`Gestion${gestion}`]) -
|
|
118
|
-
|
|
121
|
+
porcionCorriente;
|
|
119
122
|
}
|
|
120
123
|
setPorcionCuotasPagadas() {
|
|
121
124
|
let porcion, cuotas;
|
|
122
|
-
if (this.prestamo.FechaDesembolso
|
|
125
|
+
if (this.prestamo.FechaDesembolso &&
|
|
126
|
+
this.prestamo.AnnoProyectadoInicio) {
|
|
123
127
|
const pagado = (0, utils_1.calcularPorcionCorrientePagada)({
|
|
124
128
|
fechaInicial: this.data.InicioProyeccion,
|
|
125
129
|
fechaDesembolso: this.prestamo.FechaDesembolso,
|
|
126
130
|
frecuencia: this.prestamo.TipoPeriodicidadId ?? 'MENSUAL',
|
|
127
|
-
simulador: this.simulador.simulador
|
|
131
|
+
simulador: this.simulador.simulador,
|
|
132
|
+
annoProyectadoInicio: this.prestamo.AnnoProyectadoInicio
|
|
128
133
|
});
|
|
129
134
|
porcion = (0, utils_1.ourParseFloat)(pagado.porcionCorrientePagada);
|
|
130
135
|
cuotas = pagado.cuotasPagadas;
|
|
131
136
|
if (this.prestamo.TipoFacilidad === 'FIJA') {
|
|
132
137
|
const dif = (0, utils_1.ourParseFloat)(this.prestamo.Gracia) - (0, utils_1.ourParseFloat)(cuotas);
|
|
133
138
|
const periodoGracia = dif > 0 ? dif : 0;
|
|
139
|
+
const monto = (0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) -
|
|
140
|
+
(0, utils_1.ourParseFloat)(porcion);
|
|
141
|
+
const plazo = (0, utils_1.ourParseFloat)(this.prestamo.Plazo) * 12 -
|
|
142
|
+
(0, utils_1.ourParseFloat)(cuotas);
|
|
134
143
|
this.simuladorFijo2 = (0, utils_1.simuladorCuotas)({
|
|
135
|
-
monto
|
|
136
|
-
|
|
137
|
-
plazo: (0, utils_1.ourParseFloat)(this.prestamo.Plazo) * 12 -
|
|
138
|
-
(0, utils_1.ourParseFloat)(cuotas),
|
|
144
|
+
monto,
|
|
145
|
+
plazo,
|
|
139
146
|
frecuencia: this.prestamo.TipoPeriodicidadId ?? 'MENSUAL',
|
|
140
147
|
tipoCuota: this.prestamo.TipoFacilidad ?? 'VARIABLE',
|
|
141
148
|
periodoGracia,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdministracionFinancieraData, PrestamoLeasing } from
|
|
1
|
+
import { AdministracionFinancieraData, PrestamoLeasing } from '../../../models/eeff/admFinanciera';
|
|
2
2
|
interface HandlerData {
|
|
3
3
|
data: AdministracionFinancieraData;
|
|
4
4
|
prestamo: Partial<PrestamoLeasing>;
|
|
@@ -9,7 +9,7 @@ const frecuencias = {
|
|
|
9
9
|
TRIMESTRAL: 4,
|
|
10
10
|
CUATRIMESTRAL: 3,
|
|
11
11
|
SEMESTRAL: 2,
|
|
12
|
-
ANUAL: 1
|
|
12
|
+
ANUAL: 1
|
|
13
13
|
};
|
|
14
14
|
class PrestamoLeasingHandler {
|
|
15
15
|
data;
|
|
@@ -56,12 +56,14 @@ class PrestamoLeasingHandler {
|
|
|
56
56
|
if (this.prestamo.AnnoProyectadoInicio && this.prestamo.Plazo) {
|
|
57
57
|
if (gestion >= this.prestamo.AnnoProyectadoInicio) {
|
|
58
58
|
if (gestion == this.prestamo.AnnoProyectadoInicio) {
|
|
59
|
-
this.prestamo.Plazos[`Gestion${gestion}`] =
|
|
59
|
+
this.prestamo.Plazos[`Gestion${gestion}`] =
|
|
60
|
+
this.prestamo.Plazo;
|
|
60
61
|
}
|
|
61
62
|
else {
|
|
62
63
|
const anterior = (0, utils_1.ourParseFloat)(this.prestamo.Plazos?.[`Gestion${gestion - 1}`]);
|
|
63
64
|
if (anterior > 1) {
|
|
64
|
-
this.prestamo.Plazos[`Gestion${gestion}`] =
|
|
65
|
+
this.prestamo.Plazos[`Gestion${gestion}`] =
|
|
66
|
+
anterior - 1;
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -75,7 +77,8 @@ class PrestamoLeasingHandler {
|
|
|
75
77
|
value = frecuencia;
|
|
76
78
|
}
|
|
77
79
|
else if (this.prestamo.AnnoProyectadoInicio <= gestion) {
|
|
78
|
-
value =
|
|
80
|
+
value =
|
|
81
|
+
(0, utils_1.ourParseFloat)(this.prestamo.PlazosMultiplicados?.[`Gestion${gestion - 1}`]) + frecuencia;
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
this.prestamo.PlazosMultiplicados[`Gestion${gestion}`] = value;
|
|
@@ -98,7 +101,8 @@ class PrestamoLeasingHandler {
|
|
|
98
101
|
}
|
|
99
102
|
else {
|
|
100
103
|
if (añoProyectadoInicio < gestion) {
|
|
101
|
-
periodoInicial =
|
|
104
|
+
periodoInicial =
|
|
105
|
+
(0, utils_1.ourParseFloat)(this.prestamo.PlazosMultiplicados?.[`Gestion${gestion - 1}`]) + 1;
|
|
102
106
|
}
|
|
103
107
|
value = (0, utils_1.calcularPagoPrincipalEntre)({
|
|
104
108
|
tasaPeriodica,
|
|
@@ -115,10 +119,14 @@ class PrestamoLeasingHandler {
|
|
|
115
119
|
periodoFinal
|
|
116
120
|
});
|
|
117
121
|
}
|
|
118
|
-
this.prestamo.AmortizacionesCapital[`Gestion${gestion}`] =
|
|
119
|
-
|
|
122
|
+
this.prestamo.AmortizacionesCapital[`Gestion${gestion}`] =
|
|
123
|
+
(0, utils_1.ourParseFloat)(value);
|
|
124
|
+
this.prestamo.AmortizacionesInteres[`Gestion${gestion}`] =
|
|
125
|
+
(0, utils_1.ourParseFloat)(valueInteres);
|
|
120
126
|
}
|
|
121
|
-
this.prestamo.AmortizacionesCapitalFinal[`Gestion${gestion}`] =
|
|
127
|
+
this.prestamo.AmortizacionesCapitalFinal[`Gestion${gestion}`] =
|
|
128
|
+
(0, utils_1.ourParseFloat)(value) +
|
|
129
|
+
(0, utils_1.ourParseFloat)(this.getGeneracionValorResidual(gestion));
|
|
122
130
|
}
|
|
123
131
|
getGeneracionValorResidual(gestion) {
|
|
124
132
|
if ((0, utils_1.ourParseFloat)(this.prestamo.Plazos[`Gestion${gestion}`]) == 1) {
|
|
@@ -133,7 +141,8 @@ class PrestamoLeasingHandler {
|
|
|
133
141
|
if (this.prestamo.TipoOperacion2 === admFinanciera_1.TipoOperacionExistencia.Antigua) {
|
|
134
142
|
index++;
|
|
135
143
|
}
|
|
136
|
-
const porcionCorriente = (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapitalFinal?.[`Gestion${index}`]) +
|
|
144
|
+
const porcionCorriente = (0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesCapitalFinal?.[`Gestion${index}`]) +
|
|
145
|
+
(0, utils_1.ourParseFloat)(this.prestamo.AmortizacionesInteres?.[`Gestion${index}`]);
|
|
137
146
|
this.prestamo.PorcionesCorrientes[`Gestion${i}`] = porcionCorriente;
|
|
138
147
|
const plazo = (0, utils_1.ourParseFloat)(this.prestamo.Plazos?.[`Gestion${i}`]);
|
|
139
148
|
if (plazo && this.prestamo.TipoAmortizacion) {
|
|
@@ -141,21 +150,32 @@ class PrestamoLeasingHandler {
|
|
|
141
150
|
const frecuencia = frecuencias[this.prestamo.TipoAmortizacion];
|
|
142
151
|
const cuotaPeriodo = (0, utils_1.ourParseFloat)(this.prestamo.MontoCuotaPeriodo);
|
|
143
152
|
const valorResidual = (0, utils_1.ourParseFloat)(this.prestamo.MontoValorResidual);
|
|
144
|
-
if (this.prestamo.TipoOperacion2 ===
|
|
153
|
+
if (this.prestamo.TipoOperacion2 ===
|
|
154
|
+
admFinanciera_1.TipoOperacionExistencia.Antigua) {
|
|
145
155
|
if (plazo > 1) {
|
|
146
|
-
value =
|
|
156
|
+
value =
|
|
157
|
+
(plazo - 1) * cuotaPeriodo * frecuencia +
|
|
158
|
+
valorResidual -
|
|
159
|
+
porcionCorriente;
|
|
147
160
|
}
|
|
148
161
|
}
|
|
149
162
|
else {
|
|
150
|
-
value =
|
|
163
|
+
value =
|
|
164
|
+
plazo * cuotaPeriodo * frecuencia +
|
|
165
|
+
valorResidual -
|
|
166
|
+
porcionCorriente;
|
|
151
167
|
}
|
|
152
|
-
this.prestamo.PorcionesNoCorrientes[`Gestion${i}`] =
|
|
168
|
+
this.prestamo.PorcionesNoCorrientes[`Gestion${i}`] =
|
|
169
|
+
(0, utils_1.ourParseFloat)(value);
|
|
153
170
|
}
|
|
154
171
|
}
|
|
155
172
|
}
|
|
156
173
|
setActivacionOperacion() {
|
|
157
174
|
if (this.prestamo.TipoOperacion2 === admFinanciera_1.TipoOperacionExistencia.Nueva) {
|
|
158
|
-
this.prestamo.ActivacionOperacion =
|
|
175
|
+
this.prestamo.ActivacionOperacion =
|
|
176
|
+
(0, utils_1.ourParseFloat)(this.prestamo.MontoOriginal) +
|
|
177
|
+
(0, utils_1.ourParseFloat)(this.prestamo.MontoAporteInicial) +
|
|
178
|
+
(0, utils_1.ourParseFloat)(this.prestamo.MontoValorResidual);
|
|
159
179
|
}
|
|
160
180
|
}
|
|
161
181
|
}
|
|
@@ -111,7 +111,7 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
111
111
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion &&
|
|
112
112
|
pr.EsNuestroBanco);
|
|
113
113
|
const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
|
|
114
|
-
(0, utils_1.ourParseFloat)(curr.
|
|
114
|
+
(0, utils_1.ourParseFloat)(curr.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]), 0));
|
|
115
115
|
fila[`Gestion${gestion}`] = sumaGestion;
|
|
116
116
|
filaTotalesCPBDP[`Gestion${gestion}`] =
|
|
117
117
|
(0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
|
|
@@ -123,7 +123,7 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
123
123
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion &&
|
|
124
124
|
pr.EsNuestroBanco);
|
|
125
125
|
const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
|
|
126
|
-
(0, utils_1.ourParseFloat)(curr.
|
|
126
|
+
(0, utils_1.ourParseFloat)(curr.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]), 0));
|
|
127
127
|
fila[`Gestion${gestion}`] = sumaGestion;
|
|
128
128
|
filaTotalesCPBDP[`Gestion${gestion}`] =
|
|
129
129
|
(0, utils_1.ourParseFloat)(filaTotalesCPBDP[`Gestion${gestion}`]) + sumaGestion;
|
|
@@ -135,7 +135,7 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
135
135
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalOperacion &&
|
|
136
136
|
!pr.EsNuestroBanco);
|
|
137
137
|
const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
|
|
138
|
-
(0, utils_1.ourParseFloat)(curr.
|
|
138
|
+
(0, utils_1.ourParseFloat)(curr.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]), 0));
|
|
139
139
|
fila[`Gestion${gestion}`] = sumaGestion;
|
|
140
140
|
filaTotalesCPOtras[`Gestion${gestion}`] =
|
|
141
141
|
(0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
|
|
@@ -147,7 +147,7 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
147
147
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.CapitalInversion &&
|
|
148
148
|
!pr.EsNuestroBanco);
|
|
149
149
|
const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
|
|
150
|
-
(0, utils_1.ourParseFloat)(curr.
|
|
150
|
+
(0, utils_1.ourParseFloat)(curr.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]), 0));
|
|
151
151
|
fila[`Gestion${gestion}`] = sumaGestion;
|
|
152
152
|
filaTotalesCPOtras[`Gestion${gestion}`] =
|
|
153
153
|
(0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
|
|
@@ -159,7 +159,7 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
159
159
|
pr.DestinoOperacionId === admFinanciera_1.TipoDestinoEnum.Otros &&
|
|
160
160
|
!pr.EsNuestroBanco);
|
|
161
161
|
const sumaGestion = (0, utils_1.ourParseFloat)(prestamosFiltrados.reduce((acc, curr) => acc +
|
|
162
|
-
(0, utils_1.ourParseFloat)(curr.
|
|
162
|
+
(0, utils_1.ourParseFloat)(curr.AmortizacionesCapitalCuotaFinal?.[`Gestion${gestion}`]), 0));
|
|
163
163
|
fila[`Gestion${gestion}`] = sumaGestion;
|
|
164
164
|
filaTotalesCPOtras[`Gestion${gestion}`] =
|
|
165
165
|
(0, utils_1.ourParseFloat)(filaTotalesCPOtras[`Gestion${gestion}`]) + sumaGestion;
|
|
@@ -264,9 +264,9 @@ class ProyeccionPrestamosDirectosHandler {
|
|
|
264
264
|
(0, utils_1.ourParseFloat)(curr.AmortizacionesInteres?.[`Gestion${gestion}`]), 0));
|
|
265
265
|
const totalPagoCostosFinancieros = this.data.ProyeccionPrestamosBajoLineas.find((p) => p.Clasificador == 'T')?.[`Gestion${gestion}`];
|
|
266
266
|
const totalGastosFinancieroBDP = this.data.LineasMixtasBDP.find((p) => p.Clasificador == 'T' &&
|
|
267
|
-
p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion
|
|
267
|
+
p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion}`];
|
|
268
268
|
const totalGastosFinancieroOtros = this.data.LineasMixtasOtros.find((p) => p.Clasificador == 'T' &&
|
|
269
|
-
p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion
|
|
269
|
+
p.RubroId == admFinanciera_1.rubros.lineasMixtas.gastosFinancierosYComisiones)?.[`Gestion${gestion}`];
|
|
270
270
|
const costosMasGastos = (0, utils_1.ourParseFloat)(totalPagoCostosFinancieros) +
|
|
271
271
|
(0, utils_1.ourParseFloat)(totalGastosFinancieroBDP) +
|
|
272
272
|
(0, utils_1.ourParseFloat)(totalGastosFinancieroOtros);
|
|
@@ -42,8 +42,9 @@ interface CalcularPorcionCorrienteParams {
|
|
|
42
42
|
fechaDesembolso: string;
|
|
43
43
|
fechaInicial: string;
|
|
44
44
|
frecuencia: Frecuencia;
|
|
45
|
+
annoProyectadoInicio: number;
|
|
45
46
|
}
|
|
46
|
-
export declare function calcularPorcionCorrientePagada({ fechaDesembolso, fechaInicial, frecuencia, simulador }: CalcularPorcionCorrienteParams): ResultadoPorcionPagada;
|
|
47
|
+
export declare function calcularPorcionCorrientePagada({ fechaDesembolso, fechaInicial, frecuencia, simulador, annoProyectadoInicio }: CalcularPorcionCorrienteParams): ResultadoPorcionPagada;
|
|
47
48
|
export declare function ourParseFloat(num: any, round?: boolean): number;
|
|
48
49
|
/**
|
|
49
50
|
* Calcula la tasa de interés periódica (similar a la función TASA de Excel).
|
|
@@ -88,8 +88,10 @@ function simuladorCuotas({ monto, plazo, frecuencia, tipoCuota, periodoGracia =
|
|
|
88
88
|
return { simulador: cuotas, pagosAnuales };
|
|
89
89
|
}
|
|
90
90
|
exports.simuladorCuotas = simuladorCuotas;
|
|
91
|
-
function calcularPorcionCorrientePagada({ fechaDesembolso, fechaInicial, frecuencia, simulador }) {
|
|
92
|
-
|
|
91
|
+
function calcularPorcionCorrientePagada({ fechaDesembolso, fechaInicial, frecuencia, simulador, annoProyectadoInicio }) {
|
|
92
|
+
let inicial = getDateTime(fechaInicial).endOf('month');
|
|
93
|
+
if (annoProyectadoInicio)
|
|
94
|
+
inicial = inicial.plus({ years: annoProyectadoInicio - 1 });
|
|
93
95
|
const desembolso = getDateTime(fechaDesembolso).endOf('month');
|
|
94
96
|
const mesesPorFrecuencia = exports.frecuenciaMeses[frecuencia];
|
|
95
97
|
const mesesTranscurridos = inicial.diff(desembolso, 'months').months;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalculoAuxiliarCalc } from '../../models/eeff/calculosAuxiliares';
|
|
2
|
+
import { Strategy } from '../../strategy.interface';
|
|
3
|
+
interface Data {
|
|
4
|
+
data: any;
|
|
5
|
+
isUnformatted?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default class CalculosAuxiliaresStrategy implements Strategy {
|
|
8
|
+
execute({ data, isUnformatted }: Data): CalculoAuxiliarCalc;
|
|
9
|
+
private calculate;
|
|
10
|
+
private getValue;
|
|
11
|
+
private format;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const calculosAuxiliares_1 = require("../../models/eeff/calculosAuxiliares");
|
|
5
|
+
const utils_1 = require("./admFinanciera/utils");
|
|
6
|
+
class CalculosAuxiliaresStrategy {
|
|
7
|
+
execute({ data, isUnformatted = false }) {
|
|
8
|
+
let formatted = data;
|
|
9
|
+
if (isUnformatted)
|
|
10
|
+
formatted = this.format(data);
|
|
11
|
+
return this.calculate(formatted);
|
|
12
|
+
}
|
|
13
|
+
calculate(data) {
|
|
14
|
+
const copy = (0, lodash_1.cloneDeep)(data);
|
|
15
|
+
Object.values(copy).forEach((data) => {
|
|
16
|
+
if (data.IndicadorABM !== 'B') {
|
|
17
|
+
const active = data.Pasivos.filter((el) => el.IndicadorABM !== 'B');
|
|
18
|
+
data.TotalCortoPlazoBLKO = active
|
|
19
|
+
.filter((el) => el.DestinoOperacionId === calculosAuxiliares_1.ValoresDestino['B/L KO'])
|
|
20
|
+
.reduce((acc, curr) => {
|
|
21
|
+
return acc + this.getValue(curr.CortoPlazo);
|
|
22
|
+
}, 0);
|
|
23
|
+
data.TotalPorcionCPKO = active
|
|
24
|
+
.filter((el) => el.DestinoOperacionId === calculosAuxiliares_1.ValoresDestino.KO)
|
|
25
|
+
.reduce((acc, curr) => {
|
|
26
|
+
return acc + this.getValue(curr.PorcionCP);
|
|
27
|
+
}, 0);
|
|
28
|
+
data.TotalBLMixta = active
|
|
29
|
+
.filter((el) => el.DestinoOperacionId ===
|
|
30
|
+
calculosAuxiliares_1.ValoresDestino['B/L Mixta'])
|
|
31
|
+
.reduce((acc, curr) => {
|
|
32
|
+
return (acc +
|
|
33
|
+
this.getValue(curr.PorcionLP) +
|
|
34
|
+
this.getValue(curr.CortoPlazo));
|
|
35
|
+
}, 0);
|
|
36
|
+
data.TotalDeudasDirectasKIyKO = active
|
|
37
|
+
.filter((el) => [calculosAuxiliares_1.ValoresDestino.KI, calculosAuxiliares_1.ValoresDestino.KO].includes(el.DestinoOperacionId))
|
|
38
|
+
.reduce((acc, curr) => {
|
|
39
|
+
return acc + this.getValue(curr.MontoOriginal);
|
|
40
|
+
}, 0);
|
|
41
|
+
data.TotalPorcionCPBDP = active
|
|
42
|
+
.filter((el) => el.EsNuestroBanco)
|
|
43
|
+
.reduce((acc, curr) => {
|
|
44
|
+
return acc + this.getValue(curr.PorcionCP);
|
|
45
|
+
}, 0);
|
|
46
|
+
data.TotalPorcionCPOtros = active
|
|
47
|
+
.filter((el) => !el.EsNuestroBanco)
|
|
48
|
+
.reduce((acc, curr) => {
|
|
49
|
+
return acc + this.getValue(curr.PorcionCP);
|
|
50
|
+
}, 0);
|
|
51
|
+
data.TotalPorcionLPBDP = active
|
|
52
|
+
.filter((el) => el.EsNuestroBanco)
|
|
53
|
+
.reduce((acc, curr) => {
|
|
54
|
+
return acc + this.getValue(curr.PorcionLP);
|
|
55
|
+
}, 0);
|
|
56
|
+
data.TotalPorcionLPOtros = active
|
|
57
|
+
.filter((el) => !el.EsNuestroBanco)
|
|
58
|
+
.reduce((acc, curr) => {
|
|
59
|
+
return acc + this.getValue(curr.PorcionLP);
|
|
60
|
+
}, 0);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return copy;
|
|
64
|
+
}
|
|
65
|
+
getValue(value) {
|
|
66
|
+
let val = value;
|
|
67
|
+
if (typeof value === 'object' && 'value' in value) {
|
|
68
|
+
val = value.value;
|
|
69
|
+
}
|
|
70
|
+
return (0, utils_1.ourParseFloat)(val);
|
|
71
|
+
}
|
|
72
|
+
format(data) {
|
|
73
|
+
const grouped = (0, lodash_1.groupBy)(data, 'Correlativo');
|
|
74
|
+
const formatted = {};
|
|
75
|
+
Object.entries(grouped).forEach(([Correlativo, Pasivos]) => {
|
|
76
|
+
formatted[Correlativo] = {
|
|
77
|
+
Pasivos
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
return formatted;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.default = CalculosAuxiliaresStrategy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,587 +1 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const admFinanciera_strategy_1 = __importDefault(require("./admFinanciera.strategy"));
|
|
7
|
-
const strategy = new admFinanciera_strategy_1.default();
|
|
8
|
-
const data = {
|
|
9
|
-
ActividadEconomicaId: 472,
|
|
10
|
-
EvaluacionId: 168,
|
|
11
|
-
CantidadProyeccion: 12,
|
|
12
|
-
InicioProyeccion: '2025-03-20T00:00:00.000Z',
|
|
13
|
-
PrestamoDirecto: [
|
|
14
|
-
{
|
|
15
|
-
ActividadDeudaId: 2,
|
|
16
|
-
ActividadEconomicaId: 472,
|
|
17
|
-
UUID: '123e4567-e89b-12d3-a456-426614174000',
|
|
18
|
-
IndicadorABM: 'N',
|
|
19
|
-
TipoDeuda: 'DIRECTO',
|
|
20
|
-
Descripcion: 'PRUEBAS DE GUARDADO',
|
|
21
|
-
TipoExistencia: 'EXISTENTE',
|
|
22
|
-
MontoOriginal: 2700000,
|
|
23
|
-
Plazo: 9,
|
|
24
|
-
Tasa: 6,
|
|
25
|
-
AnnoProyectadoInicio: 1,
|
|
26
|
-
Gracia: 0,
|
|
27
|
-
EsNuestroBanco: true,
|
|
28
|
-
TipoFacilidad: 'VARIABLE',
|
|
29
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
30
|
-
FechaDesembolso: '2024-03-01',
|
|
31
|
-
Activo: true,
|
|
32
|
-
DestinoOperacionId: 'KO',
|
|
33
|
-
EsBajoLinea: false
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
ActividadDeudaId: 2,
|
|
37
|
-
ActividadEconomicaId: 472,
|
|
38
|
-
UUID: '123e4567-e89b-12d3-a456-426614174000',
|
|
39
|
-
IndicadorABM: 'N',
|
|
40
|
-
TipoDeuda: 'DIRECTO',
|
|
41
|
-
Descripcion: 'PRUEBAS DE GUARDADO',
|
|
42
|
-
TipoExistencia: 'EXISTENTE',
|
|
43
|
-
MontoOriginal: 333333,
|
|
44
|
-
Plazo: 2,
|
|
45
|
-
Tasa: 6,
|
|
46
|
-
AnnoProyectadoInicio: 1,
|
|
47
|
-
Gracia: 0,
|
|
48
|
-
EsNuestroBanco: false,
|
|
49
|
-
TipoFacilidad: 'VARIABLE',
|
|
50
|
-
TipoPeriodicidadId: 'TRIMESTRAL',
|
|
51
|
-
DestinoOperacionId: 'KO',
|
|
52
|
-
FechaDesembolso: '2024-07-01'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
ActividadDeudaId: 2,
|
|
56
|
-
ActividadEconomicaId: 472,
|
|
57
|
-
UUID: '123e4567-e89b-12d3-a456-426614174000',
|
|
58
|
-
IndicadorABM: 'N',
|
|
59
|
-
TipoDeuda: 'DIRECTO',
|
|
60
|
-
Descripcion: 'PRUEBAS DE GUARDADO',
|
|
61
|
-
TipoExistencia: 'EXISTENTE',
|
|
62
|
-
MontoOriginal: 1750000,
|
|
63
|
-
Plazo: 7,
|
|
64
|
-
Tasa: 6,
|
|
65
|
-
AnnoProyectadoInicio: 3,
|
|
66
|
-
Gracia: 0,
|
|
67
|
-
EsNuestroBanco: true,
|
|
68
|
-
TipoFacilidad: 'FIJA',
|
|
69
|
-
TipoPeriodicidadId: 'ANUAL',
|
|
70
|
-
DestinoOperacionId: 'KI',
|
|
71
|
-
FechaDesembolso: '2024-03-01'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
ActividadDeudaId: 2,
|
|
75
|
-
ActividadEconomicaId: 472,
|
|
76
|
-
UUID: '123e4567-e89b-12d3-a456-426614174000',
|
|
77
|
-
IndicadorABM: 'N',
|
|
78
|
-
TipoDeuda: 'DIRECTO',
|
|
79
|
-
Descripcion: 'PRUEBAS DE GUARDADO',
|
|
80
|
-
TipoExistencia: 'NUEVA',
|
|
81
|
-
MontoOriginal: 3000000,
|
|
82
|
-
Plazo: 5,
|
|
83
|
-
Tasa: 6,
|
|
84
|
-
AnnoProyectadoInicio: 1,
|
|
85
|
-
Gracia: 0,
|
|
86
|
-
EsNuestroBanco: true,
|
|
87
|
-
TipoFacilidad: 'FIJA',
|
|
88
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
89
|
-
DestinoOperacionId: 'KI',
|
|
90
|
-
FechaDesembolso: '2024-07-01'
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
ActividadDeudaId: 2,
|
|
94
|
-
ActividadEconomicaId: 472,
|
|
95
|
-
UUID: '123e4567-e89b-12d3-a456-426614174000',
|
|
96
|
-
IndicadorABM: 'N',
|
|
97
|
-
TipoDeuda: 'DIRECTO',
|
|
98
|
-
Descripcion: 'PRUEBAS DE GUARDADO',
|
|
99
|
-
TipoExistencia: 'NUEVA',
|
|
100
|
-
MontoOriginal: 12000000,
|
|
101
|
-
Plazo: 10,
|
|
102
|
-
Tasa: 4,
|
|
103
|
-
AnnoProyectadoInicio: 2,
|
|
104
|
-
Gracia: 4,
|
|
105
|
-
EsNuestroBanco: false,
|
|
106
|
-
TipoFacilidad: 'VARIABLE',
|
|
107
|
-
TipoPeriodicidadId: 'SEMESTRAL',
|
|
108
|
-
DestinoOperacionId: 'OTROS',
|
|
109
|
-
FechaDesembolso: '2024-03-01'
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
PrestamoBajoLinea: [
|
|
113
|
-
{
|
|
114
|
-
ActividadDeudaId: 36,
|
|
115
|
-
ActividadEconomicaId: 472,
|
|
116
|
-
UUID: '251cade9-5f36-4a7a-90e8-25a228936272',
|
|
117
|
-
IndicadorABM: 'N',
|
|
118
|
-
TipoDeuda: 'BAJOLINEA',
|
|
119
|
-
Descripcion: 'PRUEBAS BAJO LINEA',
|
|
120
|
-
MontoOriginal: 5000000,
|
|
121
|
-
Activo: true,
|
|
122
|
-
TipoExistencia: 'EXISTENTE',
|
|
123
|
-
Plazo: 10,
|
|
124
|
-
Tasa: 6,
|
|
125
|
-
EsNuestroBanco: false,
|
|
126
|
-
EsBajoLinea: false,
|
|
127
|
-
MontoUtilizado: 4500000,
|
|
128
|
-
VencimientoLinea: '2032-11-01',
|
|
129
|
-
CantidadAnnos: null,
|
|
130
|
-
TasaPonderada: null
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
ActividadDeudaId: 37,
|
|
134
|
-
ActividadEconomicaId: 472,
|
|
135
|
-
UUID: '251cade9-5f36-4a7a-90e8-25a228936272',
|
|
136
|
-
IndicadorABM: 'N',
|
|
137
|
-
TipoDeuda: 'BAJOLINEA',
|
|
138
|
-
Descripcion: 'PRUEBAS BAJO LINEA',
|
|
139
|
-
MontoOriginal: 2000000,
|
|
140
|
-
Activo: true,
|
|
141
|
-
TipoExistencia: 'EXISTENTE',
|
|
142
|
-
Plazo: 8,
|
|
143
|
-
Tasa: 6,
|
|
144
|
-
EsNuestroBanco: false,
|
|
145
|
-
EsBajoLinea: false,
|
|
146
|
-
MontoUtilizado: 0,
|
|
147
|
-
VencimientoLinea: '2028-11-01',
|
|
148
|
-
CantidadAnnos: null,
|
|
149
|
-
TasaPonderada: null
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
ActividadDeudaId: 37,
|
|
153
|
-
ActividadEconomicaId: 472,
|
|
154
|
-
UUID: '251cade9-5f36-4a7a-90e8-25a228936272',
|
|
155
|
-
IndicadorABM: 'N',
|
|
156
|
-
TipoDeuda: 'BAJOLINEA',
|
|
157
|
-
Descripcion: 'PRUEBAS BAJO LINEA',
|
|
158
|
-
TipoExistencia: 'NUEVA',
|
|
159
|
-
MontoOriginal: 1200000,
|
|
160
|
-
MontoUtilizado: 500000,
|
|
161
|
-
Plazo: 5,
|
|
162
|
-
Tasa: 5,
|
|
163
|
-
VencimientoLinea: '2029-05-01',
|
|
164
|
-
Activo: true,
|
|
165
|
-
EsNuestroBanco: false,
|
|
166
|
-
EsBajoLinea: false,
|
|
167
|
-
CantidadAnnos: null,
|
|
168
|
-
TasaPonderada: null
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
PrestamoLeasing: [
|
|
172
|
-
{
|
|
173
|
-
ActividadDeudaId: 29,
|
|
174
|
-
ActividadEconomicaId: 472,
|
|
175
|
-
UUID: '425bb6af-f390-4ae9-9b46-bfe317031367',
|
|
176
|
-
IndicadorABM: 'N',
|
|
177
|
-
TipoDeuda: 'LEASING',
|
|
178
|
-
Descripcion: 'PRUEBAS LEASING',
|
|
179
|
-
MontoOriginal: 2700000,
|
|
180
|
-
Plazo: 9,
|
|
181
|
-
AnnoProyectadoInicio: 1,
|
|
182
|
-
TipoAmortizacion: 'TRIMESTRAL',
|
|
183
|
-
TipoOperacion: 'LEASING',
|
|
184
|
-
TipoOperacion2: 'ANTIGUA',
|
|
185
|
-
MontoCuotaPeriodo: 200000,
|
|
186
|
-
MontoAporteInicial: 100000,
|
|
187
|
-
MontoValorResidual: 15000,
|
|
188
|
-
MontoValorBien: 0
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
ActividadDeudaId: 29,
|
|
192
|
-
ActividadEconomicaId: 472,
|
|
193
|
-
UUID: '425bb6af-f390-4ae9-9b46-bfe317031367',
|
|
194
|
-
IndicadorABM: 'N',
|
|
195
|
-
TipoDeuda: 'LEASING',
|
|
196
|
-
Descripcion: 'PRUEBAS LEASING',
|
|
197
|
-
MontoOriginal: 1200000,
|
|
198
|
-
Plazo: 4,
|
|
199
|
-
AnnoProyectadoInicio: 2,
|
|
200
|
-
TipoAmortizacion: 'MENSUAL',
|
|
201
|
-
TipoOperacion: 'LEASEBACK',
|
|
202
|
-
TipoOperacion2: 'NUEVA',
|
|
203
|
-
MontoCuotaPeriodo: 50000,
|
|
204
|
-
MontoAporteInicial: 20000,
|
|
205
|
-
MontoValorResidual: 0,
|
|
206
|
-
MontoValorBien: 0
|
|
207
|
-
}
|
|
208
|
-
],
|
|
209
|
-
LineasMixtasBDP: [
|
|
210
|
-
{
|
|
211
|
-
Descripcion: 'BDP 1 - LINEA DE CRÉDITO - KI Y KO',
|
|
212
|
-
TipoExistencia: 'NUEVA'
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
Descripcion: 'Vencimiento Corriente de Deuda de Largo Blazo BDP 1',
|
|
216
|
-
Gestion1: 500000,
|
|
217
|
-
Gestion2: 500000,
|
|
218
|
-
Gestion3: 500000,
|
|
219
|
-
Gestion4: 500000,
|
|
220
|
-
Gestion5: 500000,
|
|
221
|
-
Gestion6: 500000,
|
|
222
|
-
Gestion7: 500000,
|
|
223
|
-
Gestion8: 500000
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
Descripcion: 'Deuda Financiera de Largo Plazo BDP 1',
|
|
227
|
-
Gestion1: 4500000,
|
|
228
|
-
Gestion2: 4500000,
|
|
229
|
-
Gestion3: 4500000,
|
|
230
|
-
Gestion4: 4500000,
|
|
231
|
-
Gestion5: 4500000,
|
|
232
|
-
Gestion6: 4500000,
|
|
233
|
-
Gestion7: 4500000,
|
|
234
|
-
Gestion8: 4500000
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
Descripcion: 'Gastos Financieros y Comisiones BDP 1',
|
|
238
|
-
Tasa: 6,
|
|
239
|
-
Gestion1: 200000
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
LineasMixtasOtros: [
|
|
243
|
-
{
|
|
244
|
-
Descripcion: 'OTROS - FIREDIN OP.90266 - KI',
|
|
245
|
-
TipoExistencia: 'EXISTENTE'
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
Descripcion: 'Vencimiento Corriente de Deuda de Largo Blazo OTROS',
|
|
249
|
-
Gestion1: 200000,
|
|
250
|
-
Gestion2: 200000,
|
|
251
|
-
Gestion3: 200000,
|
|
252
|
-
Gestion4: 200000,
|
|
253
|
-
Gestion5: 200000,
|
|
254
|
-
Gestion6: 200000,
|
|
255
|
-
Gestion7: 200000,
|
|
256
|
-
Gestion8: 200000
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
Descripcion: 'Deuda Financiera de Largo Plazo OTROS',
|
|
260
|
-
Gestion1: 1800000,
|
|
261
|
-
Gestion2: 1800000,
|
|
262
|
-
Gestion3: 1800000,
|
|
263
|
-
Gestion4: 1800000,
|
|
264
|
-
Gestion5: 1800000,
|
|
265
|
-
Gestion6: 1800000,
|
|
266
|
-
Gestion7: 1800000,
|
|
267
|
-
Gestion8: 1800000
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
Descripcion: 'Gastos Financieros y Comisiones',
|
|
271
|
-
Tasa: 6,
|
|
272
|
-
Gestion1: 90000
|
|
273
|
-
}
|
|
274
|
-
],
|
|
275
|
-
ProyeccionPrestamosDirectos: [
|
|
276
|
-
{
|
|
277
|
-
RubroId: 'INTM',
|
|
278
|
-
Gestion1: 330000
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
RubroId: 'INTLM',
|
|
282
|
-
Gestion1: 110000
|
|
283
|
-
}
|
|
284
|
-
]
|
|
285
|
-
};
|
|
286
|
-
console.log(JSON.stringify(strategy.execute({
|
|
287
|
-
CantidadProyeccion: 12,
|
|
288
|
-
InicioProyeccion: '2025-03-01T00:00:00.000Z',
|
|
289
|
-
UltimaGestion: '2024-03-01T00:00:00.000Z',
|
|
290
|
-
PrestamoDirecto: [
|
|
291
|
-
{
|
|
292
|
-
ActividadDeudaId: 65,
|
|
293
|
-
ActividadEconomicaId: 514,
|
|
294
|
-
UUID: '75c0e5ac-85eb-44aa-a05c-f1d8cfea08ee',
|
|
295
|
-
IndicadorABM: 'N',
|
|
296
|
-
TipoDeuda: 'DIRECTO',
|
|
297
|
-
Descripcion: 'deuda largo plazo 1',
|
|
298
|
-
MontoOriginal: 2700000,
|
|
299
|
-
Activo: true,
|
|
300
|
-
Plazo: 9,
|
|
301
|
-
Tasa: 6,
|
|
302
|
-
TipoExistencia: 'EXISTENTE',
|
|
303
|
-
AnnoProyectadoInicio: 1,
|
|
304
|
-
Gracia: 0,
|
|
305
|
-
EsNuestroBanco: false,
|
|
306
|
-
TipoFacilidad: 'VARIABLE',
|
|
307
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
308
|
-
DestinoOperacionId: 'KI',
|
|
309
|
-
FechaDesembolso: '2025-03-01T00:00:00.000Z',
|
|
310
|
-
EsBajoLinea: false
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
ActividadDeudaId: 66,
|
|
314
|
-
ActividadEconomicaId: 514,
|
|
315
|
-
UUID: 'b1573e88-66a0-4765-bd1e-7141ff7e8086',
|
|
316
|
-
IndicadorABM: 'N',
|
|
317
|
-
TipoDeuda: 'DIRECTO',
|
|
318
|
-
Descripcion: 'deuda largo plazo 2',
|
|
319
|
-
MontoOriginal: 333333,
|
|
320
|
-
Activo: true,
|
|
321
|
-
Plazo: 2,
|
|
322
|
-
Tasa: 6,
|
|
323
|
-
TipoExistencia: 'EXISTENTE',
|
|
324
|
-
AnnoProyectadoInicio: 1,
|
|
325
|
-
Gracia: 0,
|
|
326
|
-
EsNuestroBanco: false,
|
|
327
|
-
TipoFacilidad: 'VARIABLE',
|
|
328
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
329
|
-
DestinoOperacionId: 'KO',
|
|
330
|
-
FechaDesembolso: '2025-03-01T00:00:00.000Z',
|
|
331
|
-
EsBajoLinea: false
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
ActividadDeudaId: 67,
|
|
335
|
-
ActividadEconomicaId: 514,
|
|
336
|
-
UUID: '98c4251f-2267-463c-81d1-c6a4079b5c0f',
|
|
337
|
-
IndicadorABM: 'N',
|
|
338
|
-
TipoDeuda: 'DIRECTO',
|
|
339
|
-
Descripcion: 'deuda largo plazo 3',
|
|
340
|
-
MontoOriginal: 1750000,
|
|
341
|
-
Activo: true,
|
|
342
|
-
Plazo: 7,
|
|
343
|
-
Tasa: 6,
|
|
344
|
-
TipoExistencia: 'EXISTENTE',
|
|
345
|
-
AnnoProyectadoInicio: 1,
|
|
346
|
-
Gracia: 0,
|
|
347
|
-
EsNuestroBanco: false,
|
|
348
|
-
TipoFacilidad: 'VARIABLE',
|
|
349
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
350
|
-
DestinoOperacionId: 'KI',
|
|
351
|
-
FechaDesembolso: '2025-03-01T00:00:00.000Z',
|
|
352
|
-
EsBajoLinea: false
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
ActividadDeudaId: 68,
|
|
356
|
-
ActividadEconomicaId: 514,
|
|
357
|
-
UUID: 'f9b815a7-46bb-4ad7-940d-c750cbac2e64',
|
|
358
|
-
IndicadorABM: 'N',
|
|
359
|
-
TipoDeuda: 'DIRECTO',
|
|
360
|
-
Descripcion: 'deuda largo plazo 5',
|
|
361
|
-
MontoOriginal: 3000000,
|
|
362
|
-
Activo: true,
|
|
363
|
-
Plazo: 5,
|
|
364
|
-
Tasa: 6,
|
|
365
|
-
TipoExistencia: 'NUEVA',
|
|
366
|
-
AnnoProyectadoInicio: 1,
|
|
367
|
-
Gracia: 0,
|
|
368
|
-
EsNuestroBanco: true,
|
|
369
|
-
TipoFacilidad: 'VARIABLE',
|
|
370
|
-
TipoPeriodicidadId: 'MENSUAL',
|
|
371
|
-
DestinoOperacionId: 'KI',
|
|
372
|
-
FechaDesembolso: '2025-03-01T00:00:00.000Z',
|
|
373
|
-
EsBajoLinea: false
|
|
374
|
-
}
|
|
375
|
-
],
|
|
376
|
-
PrestamoBajoLinea: [
|
|
377
|
-
{
|
|
378
|
-
ActividadDeudaId: 69,
|
|
379
|
-
ActividadEconomicaId: 514,
|
|
380
|
-
UUID: '7e5ebc0f-8622-49a2-951b-eb19a3b6fa68',
|
|
381
|
-
IndicadorABM: 'N',
|
|
382
|
-
TipoDeuda: 'BAJOLINEA',
|
|
383
|
-
Descripcion: 'linea de Credito BDP SAM',
|
|
384
|
-
MontoOriginal: 5000000,
|
|
385
|
-
Activo: true,
|
|
386
|
-
TipoExistencia: 'EXISTENTE',
|
|
387
|
-
Plazo: 10,
|
|
388
|
-
Tasa: 6,
|
|
389
|
-
EsNuestroBanco: false,
|
|
390
|
-
EsBajoLinea: false,
|
|
391
|
-
MontoUtilizado: 4500000,
|
|
392
|
-
VencimientoLinea: '2032-11-01T00:00:00.000Z'
|
|
393
|
-
}
|
|
394
|
-
],
|
|
395
|
-
PrestamoLeasing: [],
|
|
396
|
-
LineasMixtasBDP: [
|
|
397
|
-
{
|
|
398
|
-
Descripcion: 'BDP 1 - LINEA DE CRÉDITO - KI Y KO',
|
|
399
|
-
TipoExistencia: 'NUEVA',
|
|
400
|
-
RubroId: 'DESCP',
|
|
401
|
-
CodigoConcepto: 1,
|
|
402
|
-
IndicadorABM: 'N',
|
|
403
|
-
UUID: '019b5b7b-0a40-4702-8895-4d6b90064216'
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
Descripcion: 'Vencimiento Corriente de Deuda de Largo Plazo',
|
|
407
|
-
RubroId: 'VCLP',
|
|
408
|
-
CodigoConcepto: 1,
|
|
409
|
-
IndicadorABM: 'N',
|
|
410
|
-
Gestion1: '500000',
|
|
411
|
-
Gestion2: '500000',
|
|
412
|
-
Gestion3: '500000',
|
|
413
|
-
Gestion4: '500000',
|
|
414
|
-
Gestion5: '500000',
|
|
415
|
-
Gestion6: '500000',
|
|
416
|
-
Gestion7: '500000',
|
|
417
|
-
Gestion8: '500000',
|
|
418
|
-
Gestion9: '500000',
|
|
419
|
-
Gestion10: '500000',
|
|
420
|
-
Gestion11: '0',
|
|
421
|
-
Gestion12: '0',
|
|
422
|
-
Gestion13: '0'
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
Descripcion: 'Deuda Financiera de Largo Plazo',
|
|
426
|
-
RubroId: 'DFLP',
|
|
427
|
-
CodigoConcepto: 1,
|
|
428
|
-
IndicadorABM: 'N',
|
|
429
|
-
Gestion1: '4500000',
|
|
430
|
-
Gestion2: '4500000',
|
|
431
|
-
Gestion3: '4500000',
|
|
432
|
-
Gestion4: '4500000',
|
|
433
|
-
Gestion5: '4500000',
|
|
434
|
-
Gestion6: '4500000',
|
|
435
|
-
Gestion7: '4500000',
|
|
436
|
-
Gestion8: '4500000',
|
|
437
|
-
Gestion9: '4500000',
|
|
438
|
-
Gestion10: '4500000',
|
|
439
|
-
Gestion11: '0',
|
|
440
|
-
Gestion12: '0',
|
|
441
|
-
Gestion13: '0'
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
Descripcion: 'Gastos Financieros y Comisiones',
|
|
445
|
-
RubroId: 'GFC',
|
|
446
|
-
CodigoConcepto: 1,
|
|
447
|
-
IndicadorABM: 'N',
|
|
448
|
-
Tasa: 6,
|
|
449
|
-
TipoExistencia: 6,
|
|
450
|
-
Gestion1: '200000',
|
|
451
|
-
Gestion2: '300000',
|
|
452
|
-
Gestion3: '300000',
|
|
453
|
-
Gestion4: '300000',
|
|
454
|
-
Gestion5: '300000',
|
|
455
|
-
Gestion6: '300000',
|
|
456
|
-
Gestion7: '300000',
|
|
457
|
-
Gestion8: '300000',
|
|
458
|
-
Gestion9: '300000',
|
|
459
|
-
Gestion10: '300000',
|
|
460
|
-
Gestion11: '300000',
|
|
461
|
-
Gestion12: '0',
|
|
462
|
-
Gestion13: '0'
|
|
463
|
-
}
|
|
464
|
-
],
|
|
465
|
-
LineasMixtasOtros: [
|
|
466
|
-
{
|
|
467
|
-
Descripcion: '',
|
|
468
|
-
TipoExistencia: 'EXISTENTE',
|
|
469
|
-
RubroId: 'DESCP',
|
|
470
|
-
CodigoConcepto: 1,
|
|
471
|
-
IndicadorABM: 'N',
|
|
472
|
-
UUID: '5e002805-bdac-4a9b-b1a6-dc651064e2ed'
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
Descripcion: 'Vencimiento Corriente de Deuda de Largo Plazo',
|
|
476
|
-
RubroId: 'VCLP',
|
|
477
|
-
CodigoConcepto: 1,
|
|
478
|
-
IndicadorABM: 'N',
|
|
479
|
-
Gestion1: '200000',
|
|
480
|
-
Gestion2: '200000',
|
|
481
|
-
Gestion3: '200000',
|
|
482
|
-
Gestion4: '200000',
|
|
483
|
-
Gestion5: '200000',
|
|
484
|
-
Gestion6: '200000',
|
|
485
|
-
Gestion7: '200000',
|
|
486
|
-
Gestion8: '200000',
|
|
487
|
-
Gestion9: '200000',
|
|
488
|
-
Gestion10: '200000',
|
|
489
|
-
Gestion11: '0',
|
|
490
|
-
Gestion12: '0',
|
|
491
|
-
Gestion13: '0'
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
Descripcion: 'Deuda Financiera de Largo Plazo',
|
|
495
|
-
RubroId: 'DFLP',
|
|
496
|
-
CodigoConcepto: 1,
|
|
497
|
-
IndicadorABM: 'N',
|
|
498
|
-
Gestion1: '1800000',
|
|
499
|
-
Gestion2: '1800000',
|
|
500
|
-
Gestion3: '1800000',
|
|
501
|
-
Gestion4: '1800000',
|
|
502
|
-
Gestion5: '1800000',
|
|
503
|
-
Gestion6: '1800000',
|
|
504
|
-
Gestion7: '1800000',
|
|
505
|
-
Gestion8: '1800000',
|
|
506
|
-
Gestion9: '1800000',
|
|
507
|
-
Gestion10: '1800000',
|
|
508
|
-
Gestion11: '0',
|
|
509
|
-
Gestion12: '0',
|
|
510
|
-
Gestion13: '0'
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
Descripcion: 'Gastos Financieros y Comisiones',
|
|
514
|
-
RubroId: 'GFC',
|
|
515
|
-
CodigoConcepto: 1,
|
|
516
|
-
IndicadorABM: 'N',
|
|
517
|
-
Tasa: 6,
|
|
518
|
-
TipoExistencia: 6,
|
|
519
|
-
Gestion1: '90000',
|
|
520
|
-
Gestion2: '120000',
|
|
521
|
-
Gestion3: '120000',
|
|
522
|
-
Gestion4: '120000',
|
|
523
|
-
Gestion5: '120000',
|
|
524
|
-
Gestion6: '120000',
|
|
525
|
-
Gestion7: '120000',
|
|
526
|
-
Gestion8: '120000',
|
|
527
|
-
Gestion9: '120000',
|
|
528
|
-
Gestion10: '120000',
|
|
529
|
-
Gestion11: '120000',
|
|
530
|
-
Gestion12: '0',
|
|
531
|
-
Gestion13: '108000'
|
|
532
|
-
}
|
|
533
|
-
],
|
|
534
|
-
ProyeccionPrestamosDirectos: [
|
|
535
|
-
{
|
|
536
|
-
RubroId: 'INTM',
|
|
537
|
-
Gestion1: '330000',
|
|
538
|
-
Gestion2: '0',
|
|
539
|
-
Gestion3: '0',
|
|
540
|
-
Gestion4: '0',
|
|
541
|
-
Gestion5: '0',
|
|
542
|
-
Gestion6: '0',
|
|
543
|
-
Gestion7: '0',
|
|
544
|
-
Gestion8: '0',
|
|
545
|
-
Gestion9: '0',
|
|
546
|
-
Gestion10: '0',
|
|
547
|
-
Gestion11: '0',
|
|
548
|
-
Gestion12: '0',
|
|
549
|
-
Gestion13: '0'
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
RubroId: 'INTLM',
|
|
553
|
-
Gestion1: '0',
|
|
554
|
-
Gestion2: '0',
|
|
555
|
-
Gestion3: '0',
|
|
556
|
-
Gestion4: '0',
|
|
557
|
-
Gestion5: '0',
|
|
558
|
-
Gestion6: '0',
|
|
559
|
-
Gestion7: '0',
|
|
560
|
-
Gestion8: '0',
|
|
561
|
-
Gestion9: '0',
|
|
562
|
-
Gestion10: '0',
|
|
563
|
-
Gestion11: '0',
|
|
564
|
-
Gestion12: '0',
|
|
565
|
-
Gestion13: '0'
|
|
566
|
-
}
|
|
567
|
-
]
|
|
568
|
-
})));
|
|
569
|
-
/* console.log(
|
|
570
|
-
JSON.stringify(
|
|
571
|
-
simuladorCuotas({
|
|
572
|
-
monto: 3000000,
|
|
573
|
-
plazo: 5,
|
|
574
|
-
frecuencia: 'MENSUAL',
|
|
575
|
-
tipoCuota: 'FIJA',
|
|
576
|
-
tasaInteres: 6,
|
|
577
|
-
periodoGracia: 0
|
|
578
|
-
})
|
|
579
|
-
)
|
|
580
|
-
) */
|
|
581
|
-
/* console.log(calcularPagoPrincipalEntre({
|
|
582
|
-
tasaPeriodica: 26.75/100/4,
|
|
583
|
-
numeroPagos: 9*4,
|
|
584
|
-
montoPrestamo: 2700000,
|
|
585
|
-
periodoInicial: 1,
|
|
586
|
-
periodoFinal: 4
|
|
587
|
-
})) */
|