bdpformulas 1.0.64 → 1.0.65

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/index.d.ts CHANGED
@@ -20,6 +20,7 @@ import AnalisisFinancieros from './strategies/analisisFinancieros.strategy';
20
20
  import BalanceGeneralStrategy from './strategies/general/balanceGeneral.strategy';
21
21
  import FlujoProyectadoGeneralStrategy from './strategies/general/flujoProyGeneral.strategy';
22
22
  import AdmFinancieraStrategy from './strategies/eeff/admFinanciera.strategy';
23
+ import SupuestosStrategy from './strategies/eeff/supuestos.strategy';
23
24
  declare const Pecuario: {
24
25
  Auxiliar: typeof Auxiliar;
25
26
  Desarrollo: typeof Desarrollo;
@@ -43,6 +44,7 @@ declare const EEFF: {
43
44
  BalanceEEFFStrategy: typeof BalanceEEFFStrategy;
44
45
  FlujoProyectadoEEFFStrategy: typeof FlujoProyectadoEEFFStrategy;
45
46
  AdmFinancieraStrategy: typeof AdmFinancieraStrategy;
47
+ SupuestosStrategy: typeof SupuestosStrategy;
46
48
  };
47
49
  declare const General: {
48
50
  BalanceGeneralStrategy: typeof BalanceGeneralStrategy;
package/build/index.js CHANGED
@@ -27,6 +27,7 @@ const analisisFinancieros_strategy_1 = __importDefault(require("./strategies/ana
27
27
  const balanceGeneral_strategy_1 = __importDefault(require("./strategies/general/balanceGeneral.strategy"));
28
28
  const flujoProyGeneral_strategy_1 = __importDefault(require("./strategies/general/flujoProyGeneral.strategy"));
29
29
  const admFinanciera_strategy_1 = __importDefault(require("./strategies/eeff/admFinanciera.strategy"));
30
+ const supuestos_strategy_1 = __importDefault(require("./strategies/eeff/supuestos.strategy"));
30
31
  const Pecuario = {
31
32
  Auxiliar: anexo_strategy_1.default,
32
33
  Desarrollo: desarrollo_strategy_1.default,
@@ -52,7 +53,8 @@ exports.Agricola = Agricola;
52
53
  const EEFF = {
53
54
  BalanceEEFFStrategy: balanceEEFF_strategy_1.default,
54
55
  FlujoProyectadoEEFFStrategy: flujoProyEEFF_strategy_1.default,
55
- AdmFinancieraStrategy: admFinanciera_strategy_1.default
56
+ AdmFinancieraStrategy: admFinanciera_strategy_1.default,
57
+ SupuestosStrategy: supuestos_strategy_1.default
56
58
  };
57
59
  exports.EEFF = EEFF;
58
60
  const General = {
@@ -0,0 +1,5 @@
1
+ import { Strategy } from "../../strategy.interface";
2
+ export default class SupuestosStrategy implements Strategy {
3
+ constructor();
4
+ execute(data: any): any;
5
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class SupuestosStrategy {
4
+ constructor() {
5
+ }
6
+ execute(data) {
7
+ let rowDeprecCoef = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10402');
8
+ let rowDeprecValue = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10403');
9
+ let rowDeprecCoefLeasing = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10404');
10
+ let rowDeprecValueLeasing = data.Supuestos.find((item) => item.RubroId == 'ACT_SUP_10405');
11
+ const cleanNumber = (data) => {
12
+ if (!data)
13
+ return 0;
14
+ else
15
+ return Math.round(parseFloat(data) * 100) / 100;
16
+ };
17
+ for (let i = 1; i <= data.CantidadProyeccion; i++) {
18
+ const activosFijosNetos = data.BalanceProyectado.find((item) => item.Correlativo == i && item.RubroId == 'BP_ACT_EF_12003');
19
+ const activosPorArrendamiento = data.BalanceProyectado.find((item) => item.Correlativo == i && item.RubroId == 'BP_ACT_EF_12004');
20
+ if (rowDeprecValue != null)
21
+ rowDeprecValue[`Gestion${i}`] = cleanNumber(rowDeprecCoef[`Gestion${i}`]) * cleanNumber(activosFijosNetos.Monto);
22
+ if (rowDeprecValueLeasing != null)
23
+ rowDeprecValueLeasing[`Gestion${i}`] = cleanNumber(rowDeprecCoefLeasing[`Gestion${i}`]) * cleanNumber(activosPorArrendamiento.Monto);
24
+ }
25
+ return data.Supuestos;
26
+ }
27
+ }
28
+ exports.default = SupuestosStrategy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bdpformulas",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",