bdpformulas 1.0.33 → 1.0.35

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.
@@ -1,8 +1,6 @@
1
1
  import { Strategy } from "../../strategy.interface";
2
2
  export default class BalanceAgrStrategy implements Strategy {
3
- ventas: any;
4
- costos: any;
5
- gastos: any;
3
+ actividades: any[];
6
4
  constructor();
7
5
  execute(data: any): any;
8
6
  }
@@ -2,16 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class BalanceAgrStrategy {
4
4
  constructor() {
5
- this.ventas = {};
6
- this.costos = {};
5
+ this.actividades = [];
7
6
  }
8
7
  execute(data) {
9
- data.eerr = calcularEERR(data.eerr, this.ventas, this.costos);
8
+ data.eerr = calcularEERR(data.eerr, this.actividades);
10
9
  return data;
11
10
  }
12
11
  }
13
12
  exports.default = BalanceAgrStrategy;
14
- const calcularEERR = (eerr, ventas, costos) => {
13
+ const calcularEERR = (eerr, actividades) => {
15
14
  // const totalesOtrosIngresos = getOtrosIngresos(ventas)
16
15
  // const mapVentas = getVentasXGestion(ventas)
17
16
  // const costoTotal = calcularCostoTotal(costos)
@@ -1,8 +1,6 @@
1
1
  import { Strategy } from "../../strategy.interface";
2
2
  export default class FlujoProyectadoAgrStrategy implements Strategy {
3
- ventas: any;
4
- costos: any;
5
- gastos: any;
3
+ actividades: any[];
6
4
  constructor();
7
5
  execute(data: any): any;
8
6
  }
@@ -2,15 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class FlujoProyectadoAgrStrategy {
4
4
  constructor() {
5
- this.ventas = {};
6
- this.costos = {};
5
+ this.actividades = [];
7
6
  }
8
7
  execute(data) {
9
- data.eerr = calcular(data, this.ventas, this.costos);
8
+ data.eerr = calcular(data, this.actividades);
10
9
  return data;
11
10
  }
12
11
  }
13
12
  exports.default = FlujoProyectadoAgrStrategy;
14
- const calcular = (data, ventas, costos) => {
13
+ const calcular = (data, actividades) => {
15
14
  return data;
16
15
  };
@@ -1,5 +1,12 @@
1
1
  export declare const getSupuestosEmpty: (data: any) => any[];
2
2
  export declare const getHistoricoFlujoCaja: (data: any) => any[];
3
- export declare const getFlujoEfectivo: (data: any) => void;
4
- export declare const getFlujoEfectivoExtra: (data: any) => void;
3
+ export declare const getFlujoEfectivo: (data: any) => {
4
+ Anno: number;
5
+ FlujoDeEfectivo: number;
6
+ FlujoEfectivoDescontado: number;
7
+ }[];
8
+ export declare const getFlujoEfectivoExtra: (data: any) => {
9
+ Descripcion: string;
10
+ Valor: number;
11
+ }[];
5
12
  export declare const getPieFlujo: (data: any) => any;
@@ -35,18 +35,18 @@ const getHistoricoFlujoCaja = (data) => {
35
35
  };
36
36
  exports.getHistoricoFlujoCaja = getHistoricoFlujoCaja;
37
37
  const getFlujoEfectivo = (data) => {
38
- return;
39
- [{ Anno: 0, FlujoDeEfectivo: 0, FlujoEfectivoDescontado: 0 },
38
+ const value = [{ Anno: 0, FlujoDeEfectivo: 0, FlujoEfectivoDescontado: 0 },
40
39
  { Anno: 1, FlujoDeEfectivo: 0, FlujoEfectivoDescontado: 0 }];
40
+ return value;
41
41
  };
42
42
  exports.getFlujoEfectivo = getFlujoEfectivo;
43
43
  const getFlujoEfectivoExtra = (data) => {
44
- return;
45
- [{ Descripcion: 'Tasa de descuento', Valor: 0 },
44
+ const value = [{ Descripcion: 'Tasa de descuento', Valor: 0 },
46
45
  { Descripcion: 'VAN', Valor: 0 },
47
46
  { Descripcion: 'TIR', Valor: 0 },
48
47
  { Descripcion: 'Índice de Rentabilidad', Valor: 0 },
49
48
  ];
49
+ return value;
50
50
  };
51
51
  exports.getFlujoEfectivoExtra = getFlujoEfectivoExtra;
52
52
  const getPieFlujo = (data) => {
@@ -6,6 +6,7 @@ class FlujoProyectado {
6
6
  execute(data) {
7
7
  let result = {};
8
8
  result = data;
9
+ delete result.strategy;
9
10
  result.CajaInicial = 0;
10
11
  result.Supuestos = (0, flujoProyectado_calc_1.getSupuestosEmpty)(data);
11
12
  result.HistoricoGrafico = (0, flujoProyectado_calc_1.getHistoricoFlujoCaja)(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bdpformulas",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",