bdpformulas 1.0.69 → 1.0.70
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.
|
@@ -13,12 +13,13 @@ class SupuestosStrategy {
|
|
|
13
13
|
//@ts-ignore
|
|
14
14
|
const origenRow = origen.find((item) => item.RubroId == rubroOrigen);
|
|
15
15
|
//@ts-ignore
|
|
16
|
-
|
|
16
|
+
const destinoRow = this.data.find((item) => item.RubroId == rubroDestino);
|
|
17
17
|
if (!percent)
|
|
18
18
|
destinoRow.Gestion1 = this.cleanNumber(origenRow[`Gestion${this.cantidadGestiones}`]);
|
|
19
19
|
else {
|
|
20
20
|
destinoRow.Gestion1 = this.cleanNumber(origenRow[`Gestion${this.cantidadGestiones}%`] / 100);
|
|
21
|
-
destinoRow.Gestion1 =
|
|
21
|
+
destinoRow.Gestion1 =
|
|
22
|
+
Math.round(destinoRow.Gestion1 * 100) / 100;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -31,17 +32,21 @@ class SupuestosStrategy {
|
|
|
31
32
|
execute(data) {
|
|
32
33
|
this.data = data.Supuestos;
|
|
33
34
|
this.cantidadGestiones = data.CantidadGestiones;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const rowDeprecCoef = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10402');
|
|
36
|
+
const rowDeprecValue = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10403');
|
|
37
|
+
const rowDeprecCoefLeasing = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10404');
|
|
38
|
+
const rowDeprecValueLeasing = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10405');
|
|
38
39
|
for (let i = 1; i <= data.CantidadProyeccion; i++) {
|
|
39
40
|
const activosFijosNetos = data.BalanceProyectado.find((item) => item.Correlativo == i && item.RubroId == 'BP_ACT_EF_12003');
|
|
40
41
|
const activosPorArrendamiento = data.BalanceProyectado.find((item) => item.Correlativo == i && item.RubroId == 'BP_ACT_EF_12004');
|
|
41
42
|
if (rowDeprecValue != null)
|
|
42
|
-
rowDeprecValue[`Gestion${i}`] =
|
|
43
|
+
rowDeprecValue[`Gestion${i}`] =
|
|
44
|
+
this.cleanNumber(rowDeprecCoef[`Gestion${i}`]) *
|
|
45
|
+
this.cleanNumber(activosFijosNetos.Monto);
|
|
43
46
|
if (rowDeprecValueLeasing != null)
|
|
44
|
-
rowDeprecValueLeasing[`Gestion${i}`] =
|
|
47
|
+
rowDeprecValueLeasing[`Gestion${i}`] =
|
|
48
|
+
this.cleanNumber(rowDeprecCoefLeasing[`Gestion${i}`]) *
|
|
49
|
+
this.cleanNumber(activosPorArrendamiento.Monto);
|
|
45
50
|
}
|
|
46
51
|
this.anadirPrecalculo(data.EEFF.eerr, 'ACT_EF_42000', 'ACT_SUP_10101');
|
|
47
52
|
this.anadirPrecalculo(data.EEFF.eerr, 'ACT_EF_44003', 'ACT_SUP_10104');
|