bdpformulas 1.0.48 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/build/context.js +1 -0
  2. package/build/index.d.ts +2 -0
  3. package/build/index.js +3 -1
  4. package/build/models/eeff/admFinanciera/index.d.ts +144 -0
  5. package/build/models/eeff/admFinanciera/index.js +26 -0
  6. package/build/strategies/agriculture/balanceAgr.strategy.js +1 -0
  7. package/build/strategies/agriculture/costos.detail/costosCalc.js +1 -1
  8. package/build/strategies/agriculture/flujoProyAgr.strategy.js +3 -2
  9. package/build/strategies/agriculture/ventas.detail/ventas.calc.js +2 -1
  10. package/build/strategies/analisisFinancieros.strategy.js +20 -22
  11. package/build/strategies/balance.strategy.js +14 -2
  12. package/build/strategies/common/analisisFinCalculos/analisisGrafico.calc.js +47 -45
  13. package/build/strategies/common/analisisFinCalculos/ratios.calc.js +158 -157
  14. package/build/strategies/common/balance.calc.js +3 -1
  15. package/build/strategies/common/balanceCalculos/balanceAux.calc.js +11 -1
  16. package/build/strategies/common/balanceCalculos/flujoAux.calc.js +2 -11
  17. package/build/strategies/common/flujoCalculos/flujoConstructor.js +313 -308
  18. package/build/strategies/eeff/admFinanciera/amortizaciones.d.ts +8 -0
  19. package/build/strategies/eeff/admFinanciera/amortizaciones.js +31 -0
  20. package/build/strategies/eeff/admFinanciera/aplicacionesHandler.d.ts +16 -0
  21. package/build/strategies/eeff/admFinanciera/aplicacionesHandler.js +175 -0
  22. package/build/strategies/eeff/admFinanciera/lineasMixtasHandler.d.ts +7 -0
  23. package/build/strategies/eeff/admFinanciera/lineasMixtasHandler.js +40 -0
  24. package/build/strategies/eeff/admFinanciera/prestamoBajoLineaHandler.d.ts +13 -0
  25. package/build/strategies/eeff/admFinanciera/prestamoBajoLineaHandler.js +75 -0
  26. package/build/strategies/eeff/admFinanciera/prestamoDirectoHandler.d.ts +26 -0
  27. package/build/strategies/eeff/admFinanciera/prestamoDirectoHandler.js +267 -0
  28. package/build/strategies/eeff/admFinanciera/prestamoLeasingHandler.d.ts +20 -0
  29. package/build/strategies/eeff/admFinanciera/prestamoLeasingHandler.js +162 -0
  30. package/build/strategies/eeff/admFinanciera/proyeccionPrestamosDirectosHandler.d.ts +27 -0
  31. package/build/strategies/eeff/admFinanciera/proyeccionPrestamosDirectosHandler.js +219 -0
  32. package/build/strategies/eeff/admFinanciera/utils.d.ts +96 -0
  33. package/build/strategies/eeff/admFinanciera/utils.js +209 -0
  34. package/build/strategies/eeff/admFinanciera.strategy.d.ts +14 -0
  35. package/build/strategies/eeff/admFinanciera.strategy.js +139 -0
  36. package/build/strategies/eeff/balanceEEFF.strategy.js +3 -2
  37. package/build/strategies/eeff/flujoProyEEFF.strategy.js +3 -2
  38. package/build/strategies/general/balanceGeneral.strategy.js +2 -1
  39. package/build/strategies/general/flujoProyGeneral.strategy.js +2 -1
  40. package/build/strategies/pecuary/balancePec.strategy.js +7 -6
  41. package/build/strategies/pecuary/desarrollo.detail/desarrolloCalc.js +11 -3
  42. package/build/strategies/pecuary/desarrollo.strategy.js +2 -2
  43. package/build/strategies/pecuary/flujoProyPec.strategy.js +7 -6
  44. package/build/strategies/pecuary/ventas.detail/estacionalidadCalc.js +7 -1
  45. package/build/strategies/pecuary/ventas.detail/ventasIngresosCalc.js +7 -1
  46. package/build/strategies/production/balancePrd.strategy.js +7 -6
  47. package/build/strategies/production/costos.detail/costosCalc.js +1 -1
  48. package/build/strategies/production/flujoProyPrd.strategy.js +7 -6
  49. package/package.json +26 -21
  50. package/tsconfig.json +1 -1
@@ -1,164 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class Ratios {
4
+ data;
4
5
  constructor(data) {
5
- this.gestionActividad = () => {
6
- const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
7
- let ratio1 = {
8
- id: 'Ratio1',
9
- descripcion: 'PERÍODO PROMEDIO DE COBRANZA (Cuentas por Cobrar/Total Ingresos)*360',
10
- };
11
- let ratio2 = {
12
- id: 'Ratio2',
13
- descripcion: 'PERÍODO PROMEDIO DE PAGOS (Cuentas por Pagar / Total Costos)*360',
14
- };
15
- let ratio3 = {
16
- id: 'Ratio3',
17
- descripcion: 'ROTACIÓN DE INVENTARIOS (Inventarios/Total Costos)*360',
18
- };
19
- let ratio4 = {
20
- id: 'Ratio4',
21
- descripcion: 'ROTACIÓN DEL ACTIVO TOTAL (Total Ingresos / Total Activo)',
22
- };
23
- const cuentasXCobrar = this.data.balanceMap.get('ACT_CN_11002_0');
24
- const cuentasXPagar = this.data.balanceMap.get('ACT_CN_21002_0');
25
- const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
26
- const totalCostos = this.data.eerrMap.get('ACT_CN_41004_0');
27
- const totalInventario = this.data.balanceMap.get('ACT_CN_11003_0');
28
- const totalActivos = this.data.balanceMap.get('ACT_CN_10000_0');
29
- for (let i = 1; i <= rango; i++) {
30
- ratio1[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
31
- parseFloat(cuentasXCobrar[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]) * 360;
32
- ratio2[`Monto${i}`] = totalCostos[`MontoEmpresa_${i}`] == 0 ? 0 :
33
- parseFloat(cuentasXPagar[`MontoEmpresa_${i}`]) / parseFloat(totalCostos[`MontoEmpresa_${i}`]) * 360;
34
- ratio3[`Monto${i}`] = totalCostos[`MontoEmpresa_${i}`] == 0 ? 0 :
35
- parseFloat(totalInventario[`MontoEmpresa_${i}`]) / parseFloat(totalCostos[`MontoEmpresa_${i}`]) * 360;
36
- ratio4[`Monto${i}`] = totalActivos[`MontoEmpresa_${i}`] == 0 ? 0 :
37
- parseFloat(totalIngresos[`MontoEmpresa_${i}`]) / parseFloat(totalActivos[`MontoEmpresa_${i}`]) * 360;
38
- ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
39
- ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
40
- ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
41
- ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
42
- }
43
- let array = [];
44
- array.push(ratio1);
45
- array.push(ratio2);
46
- array.push(ratio3);
47
- array.push(ratio4);
48
- this.data.Ratios.gestionActividad = array;
49
- };
50
- this.liquidez = () => {
51
- const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
52
- let ratio1 = {
53
- id: 'Ratio1',
54
- descripcion: 'CAPITAL DE TRABAJO (Total Activo Corriente - Total Pasivo Corriente )',
55
- };
56
- let ratio2 = {
57
- id: 'Ratio2',
58
- descripcion: 'LIQUIDEZ (Total Activo Corriente / Total Pasivo Corriente)',
59
- };
60
- let ratio3 = {
61
- id: 'Ratio3',
62
- descripcion: 'PRUEBA ÁCIDA (Total Activo Corriente - Inventarios) / Total Pasivo Corriente',
63
- };
64
- const totalActivoCorriente = this.data.balanceMap.get('ACT_CN_11900_0');
65
- const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21000_0');
66
- const inventarios = this.data.balanceMap.get('ACT_CN_11003_0');
67
- for (let i = 1; i <= rango; i++) {
68
- ratio1[`Monto${i}`] = totalActivoCorriente[`MontoEmpresa_${i}`] - totalPasivoCorriente[`MontoEmpresa_${i}`];
69
- ratio2[`Monto${i}`] = (totalPasivoCorriente[`MontoEmpresa_${i}`] == 0) ? 0 :
70
- totalActivoCorriente[`MontoEmpresa_${i}`] / totalPasivoCorriente[`MontoEmpresa_${i}`];
71
- ratio3[`Monto${i}`] = (totalPasivoCorriente[`MontoEmpresa_${i}`] == 0) ? 0 :
72
- (totalActivoCorriente[`MontoEmpresa_${i}`] - inventarios[`MontoEmpresa_${i}`]) / totalPasivoCorriente[`MontoEmpresa_${i}`];
73
- ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
74
- ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
75
- ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
76
- }
77
- let array = [];
78
- array.push(ratio1);
79
- array.push(ratio2);
80
- array.push(ratio3);
81
- this.data.Ratios.liquidez = array;
82
- };
83
- this.endeudamiento = () => {
84
- const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
85
- let ratio1 = {
86
- id: 'Ratio1',
87
- descripcion: 'ENDEUDAMIENTO PATRIMONIAL (Total Pasivo/ Total Patrimonio) ',
88
- };
89
- let ratio2 = {
90
- id: 'Ratio2',
91
- descripcion: 'CONCENTRACIÓN DE DEUDA EN EL CORTO PLAZO (Total Pasivo Corriente / Total Pasivo)',
92
- };
93
- const totalPasivo = this.data.balanceMap.get('ACT_CN_29000_0');
94
- const totalPatrimonio = this.data.balanceMap.get('ACT_CN_30000_0');
95
- const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21900_0');
96
- for (let i = 1; i <= rango; i++) {
97
- ratio1[`Monto${i}`] = (totalPatrimonio[`MontoEmpresa_${i}`] == 0) ? 0 :
98
- totalPasivo[`MontoEmpresa_${i}`] / totalPatrimonio[`MontoEmpresa_${i}`];
99
- ratio2[`Monto${i}`] = (totalPasivo[`MontoEmpresa_${i}`] == 0) ? 0 :
100
- totalPasivoCorriente[`MontoEmpresa_${i}`] / totalPasivo[`MontoEmpresa_${i}`];
101
- ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
102
- ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
103
- }
104
- let array = [];
105
- array.push(ratio1);
106
- array.push(ratio2);
107
- this.data.Ratios.endeudamiento = array;
108
- };
109
- this.rentabilidad = () => {
110
- const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
111
- let ratio1 = {
112
- id: 'Ratio1',
113
- descripcion: 'ROA (Utilidad Neta del Ejercicio / Total Activo)',
114
- };
115
- let ratio2 = {
116
- id: 'Ratio2',
117
- descripcion: 'ROE (Utilidad Neta del Ejercicio / Total Patrimonio)',
118
- };
119
- let ratio3 = {
120
- id: 'Ratio3',
121
- descripcion: 'MARGEN BRUTO (Utilidad Bruta / Total Ingresos)',
122
- };
123
- let ratio4 = {
124
- id: 'Ratio4',
125
- descripcion: 'MARGEN OPERACIONAL (Utilidad Operacional / Total Ingresos)',
126
- };
127
- let ratio5 = {
128
- id: 'Ratio5',
129
- descripcion: 'MARGEN NETO (Utilidad Neta / Total Ingresos)',
130
- };
131
- const utilidadNeta = this.data.eerrMap.get('ACT_CN_47000_0');
132
- const totalActivo = this.data.balanceMap.get('ACT_CN_10000_0');
133
- const totalPatrimonio = this.data.balanceMap.get('ACT_CN_30000_0');
134
- const utilidadBruta = this.data.eerrMap.get('ACT_CN_42000_0');
135
- const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
136
- const utilidadOperacional = this.data.eerrMap.get('ACT_CN_44000_0');
137
- for (let i = 1; i <= rango; i++) {
138
- ratio1[`Monto${i}`] = totalActivo[`MontoEmpresa_${i}`] == 0 ? 0 :
139
- parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) / parseFloat(totalActivo[`MontoEmpresa_${i}`]);
140
- ratio2[`Monto${i}`] = totalPatrimonio[`MontoEmpresa_${i}`] == 0 ? 0 :
141
- parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) / parseFloat(totalPatrimonio[`MontoEmpresa_${i}`]);
142
- ratio3[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
143
- parseFloat(utilidadBruta[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]);
144
- ratio4[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
145
- parseFloat(utilidadOperacional[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]);
146
- ratio5[`Monto${i}`] = totalIngresos[`MontoTotal_${i}`] == 0 ? 0 :
147
- parseFloat(utilidadNeta[`MontoTotal_${i}`]) / parseFloat(totalIngresos[`MontoTotal_${i}`]);
148
- ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
149
- ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
150
- ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
151
- ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
152
- ratio5[`Monto${i}`] = Math.round(ratio5[`Monto${i}`] * 100) / 100;
153
- }
154
- let array = [];
155
- array.push(ratio1);
156
- array.push(ratio2);
157
- array.push(ratio3);
158
- array.push(ratio4);
159
- array.push(ratio5);
160
- this.data.Ratios.rentabilidad = array;
161
- };
162
6
  this.data = data;
163
7
  }
164
8
  generarRatios() {
@@ -168,5 +12,162 @@ class Ratios {
168
12
  this.endeudamiento();
169
13
  this.rentabilidad();
170
14
  }
15
+ gestionActividad = () => {
16
+ const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
17
+ let ratio1 = {
18
+ id: 'Ratio1',
19
+ descripcion: 'PERÍODO PROMEDIO DE COBRANZA (Cuentas por Cobrar/Total Ingresos)*360',
20
+ };
21
+ let ratio2 = {
22
+ id: 'Ratio2',
23
+ descripcion: 'PERÍODO PROMEDIO DE PAGOS (Cuentas por Pagar / Total Costos)*360',
24
+ };
25
+ let ratio3 = {
26
+ id: 'Ratio3',
27
+ descripcion: 'ROTACIÓN DE INVENTARIOS (Inventarios/Total Costos)*360',
28
+ };
29
+ let ratio4 = {
30
+ id: 'Ratio4',
31
+ descripcion: 'ROTACIÓN DEL ACTIVO TOTAL (Total Ingresos / Total Activo)',
32
+ };
33
+ const cuentasXCobrar = this.data.balanceMap.get('ACT_CN_11002_0');
34
+ const cuentasXPagar = this.data.balanceMap.get('ACT_CN_21002_0');
35
+ const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
36
+ const totalCostos = this.data.eerrMap.get('ACT_CN_41004_0');
37
+ const totalInventario = this.data.balanceMap.get('ACT_CN_11003_0');
38
+ const totalActivos = this.data.balanceMap.get('ACT_CN_10000_0');
39
+ for (let i = 1; i <= rango; i++) {
40
+ ratio1[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
41
+ parseFloat(cuentasXCobrar[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]) * 360;
42
+ ratio2[`Monto${i}`] = totalCostos[`MontoEmpresa_${i}`] == 0 ? 0 :
43
+ parseFloat(cuentasXPagar[`MontoEmpresa_${i}`]) / parseFloat(totalCostos[`MontoEmpresa_${i}`]) * 360;
44
+ ratio3[`Monto${i}`] = totalCostos[`MontoEmpresa_${i}`] == 0 ? 0 :
45
+ parseFloat(totalInventario[`MontoEmpresa_${i}`]) / parseFloat(totalCostos[`MontoEmpresa_${i}`]) * 360;
46
+ ratio4[`Monto${i}`] = totalActivos[`MontoEmpresa_${i}`] == 0 ? 0 :
47
+ parseFloat(totalIngresos[`MontoEmpresa_${i}`]) / parseFloat(totalActivos[`MontoEmpresa_${i}`]) * 360;
48
+ ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
49
+ ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
50
+ ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
51
+ ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
52
+ }
53
+ let array = [];
54
+ array.push(ratio1);
55
+ array.push(ratio2);
56
+ array.push(ratio3);
57
+ array.push(ratio4);
58
+ this.data.Ratios.gestionActividad = array;
59
+ };
60
+ liquidez = () => {
61
+ const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
62
+ let ratio1 = {
63
+ id: 'Ratio1',
64
+ descripcion: 'CAPITAL DE TRABAJO (Total Activo Corriente - Total Pasivo Corriente )',
65
+ };
66
+ let ratio2 = {
67
+ id: 'Ratio2',
68
+ descripcion: 'LIQUIDEZ (Total Activo Corriente / Total Pasivo Corriente)',
69
+ };
70
+ let ratio3 = {
71
+ id: 'Ratio3',
72
+ descripcion: 'PRUEBA ÁCIDA (Total Activo Corriente - Inventarios) / Total Pasivo Corriente',
73
+ };
74
+ const totalActivoCorriente = this.data.balanceMap.get('ACT_CN_11900_0');
75
+ const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21000_0');
76
+ const inventarios = this.data.balanceMap.get('ACT_CN_11003_0');
77
+ for (let i = 1; i <= rango; i++) {
78
+ ratio1[`Monto${i}`] = totalActivoCorriente[`MontoEmpresa_${i}`] - totalPasivoCorriente[`MontoEmpresa_${i}`];
79
+ ratio2[`Monto${i}`] = (totalPasivoCorriente[`MontoEmpresa_${i}`] == 0) ? 0 :
80
+ totalActivoCorriente[`MontoEmpresa_${i}`] / totalPasivoCorriente[`MontoEmpresa_${i}`];
81
+ ratio3[`Monto${i}`] = (totalPasivoCorriente[`MontoEmpresa_${i}`] == 0) ? 0 :
82
+ (totalActivoCorriente[`MontoEmpresa_${i}`] - inventarios[`MontoEmpresa_${i}`]) / totalPasivoCorriente[`MontoEmpresa_${i}`];
83
+ ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
84
+ ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
85
+ ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
86
+ }
87
+ let array = [];
88
+ array.push(ratio1);
89
+ array.push(ratio2);
90
+ array.push(ratio3);
91
+ this.data.Ratios.liquidez = array;
92
+ };
93
+ endeudamiento = () => {
94
+ const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
95
+ let ratio1 = {
96
+ id: 'Ratio1',
97
+ descripcion: 'ENDEUDAMIENTO PATRIMONIAL (Total Pasivo/ Total Patrimonio) ',
98
+ };
99
+ let ratio2 = {
100
+ id: 'Ratio2',
101
+ descripcion: 'CONCENTRACIÓN DE DEUDA EN EL CORTO PLAZO (Total Pasivo Corriente / Total Pasivo)',
102
+ };
103
+ const totalPasivo = this.data.balanceMap.get('ACT_CN_29000_0');
104
+ const totalPatrimonio = this.data.balanceMap.get('ACT_CN_30000_0');
105
+ const totalPasivoCorriente = this.data.balanceMap.get('ACT_CN_21900_0');
106
+ for (let i = 1; i <= rango; i++) {
107
+ ratio1[`Monto${i}`] = (totalPatrimonio[`MontoEmpresa_${i}`] == 0) ? 0 :
108
+ totalPasivo[`MontoEmpresa_${i}`] / totalPatrimonio[`MontoEmpresa_${i}`];
109
+ ratio2[`Monto${i}`] = (totalPasivo[`MontoEmpresa_${i}`] == 0) ? 0 :
110
+ totalPasivoCorriente[`MontoEmpresa_${i}`] / totalPasivo[`MontoEmpresa_${i}`];
111
+ ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
112
+ ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
113
+ }
114
+ let array = [];
115
+ array.push(ratio1);
116
+ array.push(ratio2);
117
+ this.data.Ratios.endeudamiento = array;
118
+ };
119
+ rentabilidad = () => {
120
+ const rango = this.data.balanceMap.get('ACT_CN_10000_0').Rango;
121
+ let ratio1 = {
122
+ id: 'Ratio1',
123
+ descripcion: 'ROA (Utilidad Neta del Ejercicio / Total Activo)',
124
+ };
125
+ let ratio2 = {
126
+ id: 'Ratio2',
127
+ descripcion: 'ROE (Utilidad Neta del Ejercicio / Total Patrimonio)',
128
+ };
129
+ let ratio3 = {
130
+ id: 'Ratio3',
131
+ descripcion: 'MARGEN BRUTO (Utilidad Bruta / Total Ingresos)',
132
+ };
133
+ let ratio4 = {
134
+ id: 'Ratio4',
135
+ descripcion: 'MARGEN OPERACIONAL (Utilidad Operacional / Total Ingresos)',
136
+ };
137
+ let ratio5 = {
138
+ id: 'Ratio5',
139
+ descripcion: 'MARGEN NETO (Utilidad Neta / Total Ingresos)',
140
+ };
141
+ const utilidadNeta = this.data.eerrMap.get('ACT_CN_47000_0');
142
+ const totalActivo = this.data.balanceMap.get('ACT_CN_10000_0');
143
+ const totalPatrimonio = this.data.balanceMap.get('ACT_CN_30000_0');
144
+ const utilidadBruta = this.data.eerrMap.get('ACT_CN_42000_0');
145
+ const totalIngresos = this.data.eerrMap.get('ACT_CN_40003_0');
146
+ const utilidadOperacional = this.data.eerrMap.get('ACT_CN_44000_0');
147
+ for (let i = 1; i <= rango; i++) {
148
+ ratio1[`Monto${i}`] = totalActivo[`MontoEmpresa_${i}`] == 0 ? 0 :
149
+ parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) / parseFloat(totalActivo[`MontoEmpresa_${i}`]);
150
+ ratio2[`Monto${i}`] = totalPatrimonio[`MontoEmpresa_${i}`] == 0 ? 0 :
151
+ parseFloat(utilidadNeta[`MontoEmpresa_${i}`]) / parseFloat(totalPatrimonio[`MontoEmpresa_${i}`]);
152
+ ratio3[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
153
+ parseFloat(utilidadBruta[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]);
154
+ ratio4[`Monto${i}`] = totalIngresos[`MontoEmpresa_${i}`] == 0 ? 0 :
155
+ parseFloat(utilidadOperacional[`MontoEmpresa_${i}`]) / parseFloat(totalIngresos[`MontoEmpresa_${i}`]);
156
+ ratio5[`Monto${i}`] = totalIngresos[`MontoTotal_${i}`] == 0 ? 0 :
157
+ parseFloat(utilidadNeta[`MontoTotal_${i}`]) / parseFloat(totalIngresos[`MontoTotal_${i}`]);
158
+ ratio1[`Monto${i}`] = Math.round(ratio1[`Monto${i}`] * 100) / 100;
159
+ ratio2[`Monto${i}`] = Math.round(ratio2[`Monto${i}`] * 100) / 100;
160
+ ratio3[`Monto${i}`] = Math.round(ratio3[`Monto${i}`] * 100) / 100;
161
+ ratio4[`Monto${i}`] = Math.round(ratio4[`Monto${i}`] * 100) / 100;
162
+ ratio5[`Monto${i}`] = Math.round(ratio5[`Monto${i}`] * 100) / 100;
163
+ }
164
+ let array = [];
165
+ array.push(ratio1);
166
+ array.push(ratio2);
167
+ array.push(ratio3);
168
+ array.push(ratio4);
169
+ array.push(ratio5);
170
+ this.data.Ratios.rentabilidad = array;
171
+ };
171
172
  }
172
173
  exports.default = Ratios;
@@ -15,7 +15,9 @@ const getBalanceHashMap = (balance) => {
15
15
  key = `${item.RubroId}_${!item.UUID ? '0' : item.UUID}_${item.Correlativo}`;
16
16
  }
17
17
  if (!acc.has(key)) {
18
- acc.set(key, Object.assign({}, item));
18
+ acc.set(key, {
19
+ ...item
20
+ });
19
21
  }
20
22
  }
21
23
  return acc;
@@ -3,7 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.anadirNuevoRubro = void 0;
4
4
  const anadirNuevoRubro = (muestra, balanceMap, values, descripcion) => {
5
5
  for (let i = 1; i <= muestra.Rango; i++) {
6
- let newData = Object.assign(Object.assign({}, muestra), { Descripcion: `${descripcion}`, Fecha: null, Correlativo: i, MontoFamiliar: 0, MontoEmpresa: 0, IndicadorABM: 'N', Editable: false, Clasificador: 'CT' });
6
+ let newData = {
7
+ ...muestra,
8
+ Descripcion: `${descripcion}`,
9
+ Fecha: null,
10
+ Correlativo: i,
11
+ MontoFamiliar: 0,
12
+ MontoEmpresa: 0,
13
+ IndicadorABM: 'N',
14
+ Editable: false,
15
+ Clasificador: 'CT',
16
+ };
7
17
  if (i == muestra.Rango) {
8
18
  if (values.MontoEmpresa && values.MontoEmpresa > 0)
9
19
  newData.MontoEmpresa = values.MontoEmpresa;
@@ -1,16 +1,7 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.setFlujoInEERR = void 0;
13
- const setFlujoInEERR = (data) => __awaiter(void 0, void 0, void 0, function* () {
4
+ const setFlujoInEERR = async (data) => {
14
5
  if (data.flujoProyectado && data.flujoProyectado.FlujoProyectadoMensual
15
6
  && data.flujoProyectado.FlujoProyectadoMensual.length > 0) {
16
7
  let gastosFinancierosEmp = data.flujoProyectado.FlujoProyectadoMensual.
@@ -23,5 +14,5 @@ const setFlujoInEERR = (data) => __awaiter(void 0, void 0, void 0, function* ()
23
14
  const rango = data.eerrMap.get('ACT_CN_43003_1').Rango;
24
15
  data.eerrMap.get(`ACT_CN_43003_${rango}`).MontoEmpresa = gastosFinancierosEmp;
25
16
  }
26
- });
17
+ };
27
18
  exports.setFlujoInEERR = setFlujoInEERR;