bdpformulas 1.0.56 → 1.0.58
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/context.d.ts +1 -1
- package/build/index.d.ts +13 -1
- package/build/strategies/agriculture/flujoProyAgr.strategy.d.ts +1 -1
- package/build/strategies/agriculture/flujoProyAgr.strategy.js +16 -7
- package/build/strategies/agriculture/ventas.detail/ventas.calc.js +8 -5
- package/build/strategies/analisisFinancieros.strategy.d.ts +1 -1
- package/build/strategies/analisisFinancieros.strategy.js +10 -6
- package/build/strategies/balance.strategy.d.ts +0 -12
- package/build/strategies/common/analisisFinCalculos/analisisDupont.calc.js +35 -17
- package/build/strategies/common/analisisFinCalculos/analisisGrafico.calc.d.ts +1 -0
- package/build/strategies/common/analisisFinCalculos/analisisGrafico.calc.js +17 -9
- package/build/strategies/common/analisisFinCalculos/apalancamiento.calc.js +49 -26
- package/build/strategies/common/analisisFinCalculos/puntoEquilibrio.calc.js +25 -12
- package/build/strategies/common/analisisFinCalculos/ratios.calc.js +114 -62
- package/build/strategies/common/declaracionJurada.calc.js +1 -1
- package/build/strategies/common/flujoCalculos/flujoConstructor.d.ts +4 -0
- package/build/strategies/common/flujoCalculos/flujoConstructor.js +231 -96
- package/build/strategies/common/flujoCalculos/supuestos.calc.js +21 -27
- package/build/strategies/common/flujoProyectado.calc.js +4 -1
- package/build/strategies/flujoProyectado.strategy.d.ts +1 -1
- package/build/strategies/flujoProyectado.strategy.js +2 -1
- package/build/strategies/index.js +2645 -7280
- package/build/strategies/utils.d.ts +2 -1
- package/build/strategies/utils.js +7 -1
- package/package.json +1 -1
|
@@ -14,43 +14,58 @@ class Ratios {
|
|
|
14
14
|
}
|
|
15
15
|
gestionActividad = () => {
|
|
16
16
|
const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
|
|
17
|
-
|
|
17
|
+
const ratio1 = {
|
|
18
18
|
id: 'Ratio1',
|
|
19
|
-
descripcion: 'PERÍODO PROMEDIO DE COBRANZA (Cuentas por Cobrar/Total Ingresos)*360'
|
|
19
|
+
descripcion: 'PERÍODO PROMEDIO DE COBRANZA (Cuentas por Cobrar/Total Ingresos)*360'
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
const ratio2 = {
|
|
22
22
|
id: 'Ratio2',
|
|
23
|
-
descripcion: 'PERÍODO PROMEDIO DE PAGOS (Cuentas por Pagar / Total Costos)*360'
|
|
23
|
+
descripcion: 'PERÍODO PROMEDIO DE PAGOS (Cuentas por Pagar / Total Costos)*360'
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const ratio3 = {
|
|
26
26
|
id: 'Ratio3',
|
|
27
|
-
descripcion: 'ROTACIÓN DE INVENTARIOS (Inventarios/Total Costos)*360'
|
|
27
|
+
descripcion: 'ROTACIÓN DE INVENTARIOS (Inventarios/Total Costos)*360'
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
const ratio4 = {
|
|
30
30
|
id: 'Ratio4',
|
|
31
|
-
descripcion: 'ROTACIÓN DEL ACTIVO TOTAL (Total Ingresos / Total Activo)'
|
|
31
|
+
descripcion: 'ROTACIÓN DEL ACTIVO TOTAL (Total Ingresos / Total Activo)'
|
|
32
32
|
};
|
|
33
33
|
const cuentasXCobrar = this.data.balanceMap.get('ACT_CN_11002_0');
|
|
34
34
|
const cuentasXPagar = this.data.balanceMap.get('ACT_CN_21002_0');
|
|
35
35
|
const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
|
|
36
36
|
const totalCostos = this.data.eerrMap.get('ACT_CN_41004_0');
|
|
37
37
|
const totalInventario = this.data.balanceMap.get('ACT_CN_11003_0');
|
|
38
|
-
const totalActivos = this.data.balanceMap.get('
|
|
38
|
+
const totalActivos = this.data.balanceMap.get('ACT_CN_19000_0');
|
|
39
39
|
for (let i = 1; i <= rango; i++) {
|
|
40
|
-
ratio1[`Monto${i}`] =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
ratio1[`Monto${i}`] =
|
|
41
|
+
totalIngresos[`MontoEmpresa_${i}`] == 0
|
|
42
|
+
? 0
|
|
43
|
+
: (parseFloat(cuentasXCobrar[`MontoEmpresa_${i}`]) /
|
|
44
|
+
parseFloat(totalIngresos[`MontoEmpresa_${i}`])) *
|
|
45
|
+
360;
|
|
46
|
+
ratio2[`Monto${i}`] =
|
|
47
|
+
totalCostos[`MontoEmpresa_${i}`] == 0
|
|
48
|
+
? 0
|
|
49
|
+
: (parseFloat(cuentasXPagar[`MontoEmpresa_${i}`]) /
|
|
50
|
+
parseFloat(totalCostos[`MontoEmpresa_${i}`])) *
|
|
51
|
+
360;
|
|
52
|
+
ratio3[`Monto${i}`] =
|
|
53
|
+
totalCostos[`MontoEmpresa_${i}`] == 0
|
|
54
|
+
? 0
|
|
55
|
+
: (parseFloat(totalInventario[`MontoEmpresa_${i}`]) /
|
|
56
|
+
parseFloat(totalCostos[`MontoEmpresa_${i}`])) *
|
|
57
|
+
360;
|
|
58
|
+
ratio4[`Monto${i}`] =
|
|
59
|
+
totalActivos[`MontoEmpresa_${i}`] == 0
|
|
60
|
+
? 0
|
|
61
|
+
: parseFloat(totalIngresos[`MontoEmpresa_${i}`]) /
|
|
62
|
+
parseFloat(totalActivos[`MontoEmpresa_${i}`]);
|
|
48
63
|
ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
|
|
49
64
|
ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
|
|
50
65
|
ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
|
|
51
66
|
ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
|
|
52
67
|
}
|
|
53
|
-
|
|
68
|
+
const array = [];
|
|
54
69
|
array.push(ratio1);
|
|
55
70
|
array.push(ratio2);
|
|
56
71
|
array.push(ratio3);
|
|
@@ -59,32 +74,41 @@ class Ratios {
|
|
|
59
74
|
};
|
|
60
75
|
liquidez = () => {
|
|
61
76
|
const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
|
|
62
|
-
|
|
77
|
+
const ratio1 = {
|
|
63
78
|
id: 'Ratio1',
|
|
64
|
-
descripcion: 'CAPITAL DE TRABAJO (Total Activo Corriente - Total Pasivo Corriente )'
|
|
79
|
+
descripcion: 'CAPITAL DE TRABAJO (Total Activo Corriente - Total Pasivo Corriente )'
|
|
65
80
|
};
|
|
66
|
-
|
|
81
|
+
const ratio2 = {
|
|
67
82
|
id: 'Ratio2',
|
|
68
|
-
descripcion: 'LIQUIDEZ (Total Activo Corriente / Total Pasivo Corriente)'
|
|
83
|
+
descripcion: 'LIQUIDEZ (Total Activo Corriente / Total Pasivo Corriente)'
|
|
69
84
|
};
|
|
70
|
-
|
|
85
|
+
const ratio3 = {
|
|
71
86
|
id: 'Ratio3',
|
|
72
|
-
descripcion: 'PRUEBA ÁCIDA (Total Activo Corriente - Inventarios) / Total Pasivo Corriente'
|
|
87
|
+
descripcion: 'PRUEBA ÁCIDA (Total Activo Corriente - Inventarios) / Total Pasivo Corriente'
|
|
73
88
|
};
|
|
74
89
|
const totalActivoCorriente = this.data.balanceMap.get('ACT_CN_11900_0');
|
|
75
90
|
const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21000_0');
|
|
76
91
|
const inventarios = this.data.balanceMap.get('ACT_CN_11003_0');
|
|
77
92
|
for (let i = 1; i <= rango; i++) {
|
|
78
|
-
ratio1[`Monto${i}`] =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
ratio1[`Monto${i}`] =
|
|
94
|
+
totalActivoCorriente[`MontoEmpresa_${i}`] -
|
|
95
|
+
totalPasivoCorriente[`MontoEmpresa_${i}`];
|
|
96
|
+
ratio2[`Monto${i}`] =
|
|
97
|
+
totalPasivoCorriente[`MontoEmpresa_${i}`] == 0
|
|
98
|
+
? 0
|
|
99
|
+
: totalActivoCorriente[`MontoEmpresa_${i}`] /
|
|
100
|
+
totalPasivoCorriente[`MontoEmpresa_${i}`];
|
|
101
|
+
ratio3[`Monto${i}`] =
|
|
102
|
+
totalPasivoCorriente[`MontoEmpresa_${i}`] == 0
|
|
103
|
+
? 0
|
|
104
|
+
: (totalActivoCorriente[`MontoEmpresa_${i}`] -
|
|
105
|
+
inventarios[`MontoEmpresa_${i}`]) /
|
|
106
|
+
totalPasivoCorriente[`MontoEmpresa_${i}`];
|
|
83
107
|
ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
|
|
84
108
|
ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
|
|
85
109
|
ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
|
|
86
110
|
}
|
|
87
|
-
|
|
111
|
+
const array = [];
|
|
88
112
|
array.push(ratio1);
|
|
89
113
|
array.push(ratio2);
|
|
90
114
|
array.push(ratio3);
|
|
@@ -92,76 +116,104 @@ class Ratios {
|
|
|
92
116
|
};
|
|
93
117
|
endeudamiento = () => {
|
|
94
118
|
const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
|
|
95
|
-
|
|
119
|
+
const ratio1 = {
|
|
96
120
|
id: 'Ratio1',
|
|
97
|
-
descripcion: 'ENDEUDAMIENTO PATRIMONIAL (Total Pasivo/ Total Patrimonio) '
|
|
121
|
+
descripcion: 'ENDEUDAMIENTO PATRIMONIAL (Total Pasivo/ Total Patrimonio) '
|
|
98
122
|
};
|
|
99
|
-
|
|
123
|
+
const ratio2 = {
|
|
100
124
|
id: 'Ratio2',
|
|
101
|
-
descripcion: 'CONCENTRACIÓN DE DEUDA EN EL CORTO PLAZO (Total Pasivo Corriente / Total Pasivo)'
|
|
125
|
+
descripcion: 'CONCENTRACIÓN DE DEUDA EN EL CORTO PLAZO (Total Pasivo Corriente / Total Pasivo)'
|
|
102
126
|
};
|
|
103
127
|
const totalPasivo = this.data.balanceMap.get('ACT_CN_29000_0');
|
|
104
|
-
const totalPatrimonio = this.data.balanceMap.get('
|
|
128
|
+
const totalPatrimonio = this.data.balanceMap.get('ACT_CN_39000_0');
|
|
105
129
|
const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21900_0');
|
|
106
130
|
for (let i = 1; i <= rango; i++) {
|
|
107
|
-
ratio1[`Monto${i}`] =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
131
|
+
ratio1[`Monto${i}`] =
|
|
132
|
+
totalPatrimonio[`MontoEmpresa_${i}`] == 0
|
|
133
|
+
? 0
|
|
134
|
+
: (parseFloat(totalPasivo[`MontoEmpresa_${i}`]) /
|
|
135
|
+
parseFloat(totalPatrimonio[`MontoEmpresa_${i}`])) *
|
|
136
|
+
100;
|
|
137
|
+
ratio2[`Monto${i}`] =
|
|
138
|
+
totalPasivo[`MontoEmpresa_${i}`] == 0
|
|
139
|
+
? 0
|
|
140
|
+
: (parseFloat(totalPasivoCorriente[`MontoEmpresa_${i}`]) /
|
|
141
|
+
parseFloat(totalPasivo[`MontoEmpresa_${i}`])) *
|
|
142
|
+
100;
|
|
111
143
|
ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
|
|
112
144
|
ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
|
|
113
145
|
}
|
|
114
|
-
|
|
146
|
+
const array = [];
|
|
115
147
|
array.push(ratio1);
|
|
116
148
|
array.push(ratio2);
|
|
117
149
|
this.data.Ratios.endeudamiento = array;
|
|
118
150
|
};
|
|
119
151
|
rentabilidad = () => {
|
|
120
152
|
const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
|
|
121
|
-
|
|
153
|
+
const ratio1 = {
|
|
122
154
|
id: 'Ratio1',
|
|
123
|
-
descripcion: 'ROA (Utilidad Neta del Ejercicio / Total Activo)'
|
|
155
|
+
descripcion: 'ROA (Utilidad Neta del Ejercicio / Total Activo)'
|
|
124
156
|
};
|
|
125
|
-
|
|
157
|
+
const ratio2 = {
|
|
126
158
|
id: 'Ratio2',
|
|
127
|
-
descripcion: 'ROE (Utilidad Neta del Ejercicio / Total Patrimonio)'
|
|
159
|
+
descripcion: 'ROE (Utilidad Neta del Ejercicio / Total Patrimonio)'
|
|
128
160
|
};
|
|
129
|
-
|
|
161
|
+
const ratio3 = {
|
|
130
162
|
id: 'Ratio3',
|
|
131
|
-
descripcion: 'MARGEN BRUTO (Utilidad Bruta / Total Ingresos)'
|
|
163
|
+
descripcion: 'MARGEN BRUTO (Utilidad Bruta / Total Ingresos)'
|
|
132
164
|
};
|
|
133
|
-
|
|
165
|
+
const ratio4 = {
|
|
134
166
|
id: 'Ratio4',
|
|
135
|
-
descripcion: 'MARGEN OPERACIONAL (Utilidad Operacional / Total Ingresos)'
|
|
167
|
+
descripcion: 'MARGEN OPERACIONAL (Utilidad Operacional / Total Ingresos)'
|
|
136
168
|
};
|
|
137
|
-
|
|
169
|
+
const ratio5 = {
|
|
138
170
|
id: 'Ratio5',
|
|
139
|
-
descripcion: 'MARGEN NETO (Utilidad Neta / Total Ingresos)'
|
|
171
|
+
descripcion: 'MARGEN NETO (Utilidad Neta / Total Ingresos)'
|
|
140
172
|
};
|
|
141
173
|
const utilidadNeta = this.data.eerrMap.get('ACT_CN_47000_0');
|
|
142
174
|
const totalActivo = this.data.balanceMap.get('ACT_CN_10000_0');
|
|
143
|
-
const totalPatrimonio = this.data.balanceMap.get('
|
|
175
|
+
const totalPatrimonio = this.data.balanceMap.get('ACT_CN_39000_0');
|
|
144
176
|
const utilidadBruta = this.data.eerrMap.get('ACT_CN_42000_0');
|
|
145
177
|
const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
|
|
146
178
|
const utilidadOperacional = this.data.eerrMap.get('ACT_CN_44000_0');
|
|
147
179
|
for (let i = 1; i <= rango; i++) {
|
|
148
|
-
ratio1[`Monto${i}`] =
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
180
|
+
ratio1[`Monto${i}`] =
|
|
181
|
+
totalActivo[`MontoEmpresa_${i}`] == 0
|
|
182
|
+
? 0
|
|
183
|
+
: (parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) /
|
|
184
|
+
parseFloat(totalActivo[`MontoEmpresa_${i}`])) *
|
|
185
|
+
100;
|
|
186
|
+
ratio2[`Monto${i}`] =
|
|
187
|
+
totalPatrimonio[`MontoEmpresa_${i}`] == 0
|
|
188
|
+
? 0
|
|
189
|
+
: (parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) /
|
|
190
|
+
parseFloat(totalPatrimonio[`MontoEmpresa_${i}`])) *
|
|
191
|
+
100;
|
|
192
|
+
ratio3[`Monto${i}`] =
|
|
193
|
+
totalIngresos[`MontoEmpresa_${i}`] == 0
|
|
194
|
+
? 0
|
|
195
|
+
: (parseFloat(utilidadBruta[`MontoEmpresa_${i}`]) /
|
|
196
|
+
parseFloat(totalIngresos[`MontoEmpresa_${i}`])) *
|
|
197
|
+
100;
|
|
198
|
+
ratio4[`Monto${i}`] =
|
|
199
|
+
totalIngresos[`MontoEmpresa_${i}`] == 0
|
|
200
|
+
? 0
|
|
201
|
+
: (parseFloat(utilidadOperacional[`MontoEmpresa_${i}`]) /
|
|
202
|
+
parseFloat(totalIngresos[`MontoEmpresa_${i}`])) *
|
|
203
|
+
100;
|
|
204
|
+
ratio5[`Monto${i}`] =
|
|
205
|
+
totalIngresos[`MontoTotal_${i}`] == 0
|
|
206
|
+
? 0
|
|
207
|
+
: (parseFloat(utilidadNeta[`MontoTotal_${i}`]) /
|
|
208
|
+
parseFloat(totalIngresos[`MontoTotal_${i}`])) *
|
|
209
|
+
100;
|
|
158
210
|
ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
|
|
159
211
|
ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
|
|
160
212
|
ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
|
|
161
213
|
ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
|
|
162
214
|
ratio5[`Monto${i}`] = Math.round(ratio5[`Monto${i}`] * 100) / 100;
|
|
163
215
|
}
|
|
164
|
-
|
|
216
|
+
const array = [];
|
|
165
217
|
array.push(ratio1);
|
|
166
218
|
array.push(ratio2);
|
|
167
219
|
array.push(ratio3);
|
|
@@ -10,7 +10,7 @@ const getCajaInicial = (declaracionJurada) => {
|
|
|
10
10
|
const disponibilidades = declaracionJurada.Balance.find((value) => value.RubroId === 'SOL_ACT_001');
|
|
11
11
|
if (!disponibilidades)
|
|
12
12
|
throw new Error('No se encontró el rubro de Disponibilidades en el balance de la declaración jurada');
|
|
13
|
-
return disponibilidades.
|
|
13
|
+
return disponibilidades.MontoEmpresa;
|
|
14
14
|
};
|
|
15
15
|
exports.getCajaInicial = getCajaInicial;
|
|
16
16
|
const anadirDeclaracionJurada = (balanceMap, balanceArray, declaracionJurada) => {
|
|
@@ -6,9 +6,13 @@ export default class FlujoConstructor {
|
|
|
6
6
|
private data;
|
|
7
7
|
constructor(tipo: string, data: any);
|
|
8
8
|
calcularFlujo: () => void;
|
|
9
|
+
calcularExcedenteDeficit(): void;
|
|
10
|
+
setearCamposAnual(): void;
|
|
9
11
|
limpiarCamposCalculados: () => void;
|
|
12
|
+
calcularFlujoCajaMensual(): void;
|
|
10
13
|
calcularFlujoAcumuladoMensual: (data: any) => void;
|
|
11
14
|
calcularTotal: (sumandosArray: string[], total: string) => void;
|
|
15
|
+
replicarCuenta: (cuentaOrigen: string, cuentaDestino: string) => void;
|
|
12
16
|
calcularResta: (positivoRubro: string, negativoRubro: string, destinoRubro: string) => void;
|
|
13
17
|
proyectarIngreso: () => void;
|
|
14
18
|
proyectarCosto: () => void;
|