bdpformulas 1.0.39 → 1.0.41

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.
@@ -15,12 +15,14 @@ class AnalisisGrafico {
15
15
  let array = [];
16
16
  array.push(this.data.balanceMap.get('ACT_CN_11900_0'));
17
17
  array.push(this.data.balanceMap.get('ACT_CN_12900_0'));
18
+ array.push(this.data.balanceMap.get('ACT_CN_19000_0'));
18
19
  this.data.evolucionActivos = array;
19
20
  };
20
21
  this.comportamientoPasivos = () => {
21
22
  let array = [];
22
23
  array.push(this.data.balanceMap.get('ACT_CN_21900_0'));
23
24
  array.push(this.data.balanceMap.get('ACT_CN_22900_0'));
25
+ array.push(this.data.balanceMap.get('ACT_CN_29000_0'));
24
26
  this.data.comportamientoPasivos = array;
25
27
  };
26
28
  this.comportamientoPatrimonio = () => {
@@ -43,7 +45,7 @@ class AnalisisGrafico {
43
45
  array.push(ratio3);
44
46
  array.push(ratio4);
45
47
  array.push(ratio5);
46
- this.data.evolucionEstadoResultados = array;
48
+ this.data.margenesEstadoResultados = array;
47
49
  };
48
50
  this.data = data;
49
51
  }
@@ -13,6 +13,7 @@ export default class FlujoConstructor {
13
13
  proyectarIngreso: () => void;
14
14
  proyectarCosto: () => void;
15
15
  proyectarGasto: () => void;
16
+ agregarQuitarClones: () => void;
16
17
  moverDetalledesdeMensual: () => void;
17
18
  calcularTotalDetalle: (sumandosArray: string[], total: string) => void;
18
19
  calcularPorcentajeIngresCostos: () => void;
@@ -8,6 +8,7 @@ class FlujoConstructor {
8
8
  this.proyectarIngreso();
9
9
  this.proyectarCosto();
10
10
  this.proyectarGasto();
11
+ this.agregarQuitarClones();
11
12
  this.moverDetalledesdeMensual();
12
13
  this.calcularTotalDetalle(['ACT_CNFL_73000'], 'ACT_CNFL_73900');
13
14
  this.calcularTotalDetalle(['ACT_CNFL_61001'], 'ACT_CNFL_61900');
@@ -134,6 +135,40 @@ class FlujoConstructor {
134
135
  rowGasto[`Monto${i}`] = Math.round(rowGasto[`Monto${i}`] * 100) / 100;
135
136
  }
136
137
  };
138
+ this.agregarQuitarClones = () => {
139
+ let filter = this.data.FlujoProyectadoMensual.filter((item) => item.Clasificador == 'DETL' || item.Clasificador == 'HABM');
140
+ filter.map((item) => {
141
+ if (!this.mapObject.has(`${item.RubroId}_CLONE_${item.UUID}`)) {
142
+ let newItem = {
143
+ ActividadId: item.ActividadId,
144
+ RubroId: item.RubroId,
145
+ RubroPadreId: item.RubroPadreId,
146
+ Descripcion: item.Descripcion,
147
+ UUID: item.UUID,
148
+ Clasificador: item.Clasificador,
149
+ Entidad: item.Entidad,
150
+ Operacion: item.Operacion,
151
+ Comprar: item.Comprar,
152
+ Variable: item.Variable,
153
+ IndicadorABM: item.IndicadorABM,
154
+ MontoCajaPercent: item.MontoCajaPercent,
155
+ };
156
+ for (let i = 1; i <= this.rango; i++) {
157
+ newItem[`Monto${i}`] = 0;
158
+ }
159
+ this.array.push(newItem);
160
+ this.mapObject.set(`${item.RubroId}_CLONE_${item.UUID}`, newItem);
161
+ }
162
+ });
163
+ let anuales = this.array.filter((item) => item.Clasificador == 'DETL' || item.Clasificador == 'HABM');
164
+ for (let anualItem of anuales) {
165
+ let key = `${anualItem.RubroId}_${anualItem.UUID}`.replace('_CLONE_', '');
166
+ if (!this.data.FlujoProyectadoMensualMap.has(key)) {
167
+ this.array = this.array.filter((item) => item.RubroId == anualItem.RubroId ||
168
+ item.UUID == anualItem.UUID);
169
+ }
170
+ }
171
+ };
137
172
  this.moverDetalledesdeMensual = () => {
138
173
  let filter = this.data.FlujoProyectadoMensual.filter((item) => item.RubroId == 'ACT_CNFL_61001' || item.RubroId == 'ACT_CNFL_73000');
139
174
  filter.map((item) => {
@@ -38,6 +38,8 @@ class FlujoProyectado {
38
38
  result = data;
39
39
  const cloneFlujoProyectadoMensual = commmon.clone(data.FlujoProyectadoMensual);
40
40
  const cloneFlujoProyectadoAnual = commmon.clone(data.FlujoProyectadoAnual);
41
+ data.FlujoProyectadoMensual = data.FlujoProyectadoMensual.sort((a, b) => a.RubroId.localeCompare(b.RubroId));
42
+ data.FlujoProyectadoAnual = data.FlujoProyectadoAnual.sort((a, b) => a.RubroId.localeCompare(b.RubroId));
41
43
  data.FlujoProyectadoMensualMap = (0, flujoProyectado_calc_1.getFlujoMap)(data.FlujoProyectadoMensual, 12);
42
44
  data.FlujoProyectadoAnualMap = (0, flujoProyectado_calc_1.getFlujoMap)(data.FlujoProyectadoAnual, data.DatosEvaluacion.CantidadProyeccion);
43
45
  if (data.strategy != null)
@@ -47,10 +49,6 @@ class FlujoProyectado {
47
49
  result.Supuestos = supuestosCalc.getSupuestos(data);
48
50
  flujoProyectadoCalc.calcularFlujoAnual(data);
49
51
  result.HistoricoGrafico = (0, flujoProyectado_calc_1.getHistoricoFlujoCaja)(data);
50
- //result.FlujoEfectivo = getFlujoEfectivo(data)
51
- //result.FlujoEfectivoVars = getFlujoEfectivoExtra(data)
52
- // data.FlujoProyectadoMensual = Array.from(data.FlujoProyectadoMensualMap.values())
53
- //data.FlujoProyectadoAnual = Array.from(data.FlujoProyectadoAnualMap.values())
54
52
  delete result.FlujoProyectadoMensualMap;
55
53
  delete result.FlujoProyectadoAnualMap;
56
54
  result.DataOriginal = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bdpformulas",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",