bdpformulas 1.0.67 → 1.0.68
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 +2 -0
- package/build/index.js +3 -1
- package/build/strategies/common/flujoCalculos/flujoConstructor.js +6 -2
- package/build/strategies/eeff/supuestos.strategy.d.ts +1 -1
- package/build/strategies/eeff/supuestos.strategy.js +13 -8
- package/build/strategies/general/itap.stretegy.d.ts +19 -0
- package/build/strategies/general/itap.stretegy.js +39 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import FlujoProyectadoGeneralStrategy from './strategies/general/flujoProyGenera
|
|
|
22
22
|
import AdmFinancieraStrategy from './strategies/eeff/admFinanciera.strategy';
|
|
23
23
|
import SupuestosStrategy from './strategies/eeff/supuestos.strategy';
|
|
24
24
|
import DeudasStrategy from './strategies/eeff/deudas.strategy';
|
|
25
|
+
import ItapStrategy from './strategies/general/itap.stretegy';
|
|
25
26
|
declare const Pecuario: {
|
|
26
27
|
Auxiliar: typeof Auxiliar;
|
|
27
28
|
Desarrollo: typeof Desarrollo;
|
|
@@ -51,6 +52,7 @@ declare const EEFF: {
|
|
|
51
52
|
declare const General: {
|
|
52
53
|
BalanceGeneralStrategy: typeof BalanceGeneralStrategy;
|
|
53
54
|
FlujoProyectadoGeneralStrategy: typeof FlujoProyectadoGeneralStrategy;
|
|
55
|
+
ItapStrategy: typeof ItapStrategy;
|
|
54
56
|
};
|
|
55
57
|
declare const Actividades: {
|
|
56
58
|
Balance: typeof Balance;
|
package/build/index.js
CHANGED
|
@@ -29,6 +29,7 @@ const flujoProyGeneral_strategy_1 = __importDefault(require("./strategies/genera
|
|
|
29
29
|
const admFinanciera_strategy_1 = __importDefault(require("./strategies/eeff/admFinanciera.strategy"));
|
|
30
30
|
const supuestos_strategy_1 = __importDefault(require("./strategies/eeff/supuestos.strategy"));
|
|
31
31
|
const deudas_strategy_1 = __importDefault(require("./strategies/eeff/deudas.strategy"));
|
|
32
|
+
const itap_stretegy_1 = __importDefault(require("./strategies/general/itap.stretegy"));
|
|
32
33
|
const Pecuario = {
|
|
33
34
|
Auxiliar: anexo_strategy_1.default,
|
|
34
35
|
Desarrollo: desarrollo_strategy_1.default,
|
|
@@ -61,7 +62,8 @@ const EEFF = {
|
|
|
61
62
|
exports.EEFF = EEFF;
|
|
62
63
|
const General = {
|
|
63
64
|
BalanceGeneralStrategy: balanceGeneral_strategy_1.default,
|
|
64
|
-
FlujoProyectadoGeneralStrategy: flujoProyGeneral_strategy_1.default
|
|
65
|
+
FlujoProyectadoGeneralStrategy: flujoProyGeneral_strategy_1.default,
|
|
66
|
+
ItapStrategy: itap_stretegy_1.default
|
|
65
67
|
};
|
|
66
68
|
exports.General = General;
|
|
67
69
|
const Actividades = {
|
|
@@ -259,8 +259,12 @@ class FlujoConstructor {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
agregarQuitarClones = () => {
|
|
262
|
-
const
|
|
263
|
-
(item.Clasificador == 'DETL' || item.Clasificador == 'HABM'));
|
|
262
|
+
const borrados = this.data.FlujoProyectadoMensual.filter((item) => item.IndicadorABM === 'B' &&
|
|
263
|
+
(item.Clasificador == 'DETL' || item.Clasificador == 'HABM')).map((item) => { return `CLONE_${item.UUID}`; });
|
|
264
|
+
this.data.FlujoProyectadoMensual = this.data.FlujoProyectadoMensual.filter((item) => item.IndicadorABM !== 'B');
|
|
265
|
+
this.array = this.array.filter((item) => !borrados.includes(item.UUID));
|
|
266
|
+
this.data.FlujoProyectadoAnual = this.data.FlujoProyectadoAnual.filter((item) => !borrados.includes(item.UUID));
|
|
267
|
+
const filter = this.data.FlujoProyectadoMensual.filter((item) => (item.Clasificador == 'DETL' || item.Clasificador == 'HABM'));
|
|
264
268
|
filter.map((item) => {
|
|
265
269
|
const key = `${item.RubroId}_CLONE_${item.UUID}`;
|
|
266
270
|
const UUID = `CLONE_${item.UUID}`;
|
|
@@ -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');
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Strategy } from '../../strategy.interface';
|
|
2
|
+
type parametros = {
|
|
3
|
+
patrimonio: number;
|
|
4
|
+
ingresos: number;
|
|
5
|
+
personal: number;
|
|
6
|
+
};
|
|
7
|
+
export default class ItapStrategy implements Strategy {
|
|
8
|
+
constructor();
|
|
9
|
+
extraerDelConsolidado: (consolidado: any, personalOcupado: number) => parametros;
|
|
10
|
+
execute(data: any): {
|
|
11
|
+
Indice: number;
|
|
12
|
+
Ingresos: number;
|
|
13
|
+
Patrimonio: number;
|
|
14
|
+
Tamano: any;
|
|
15
|
+
Calculado: number;
|
|
16
|
+
Message: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ItapStrategy {
|
|
4
|
+
constructor() { }
|
|
5
|
+
extraerDelConsolidado = (consolidado, personalOcupado) => {
|
|
6
|
+
let result = {
|
|
7
|
+
patrimonio: 0,
|
|
8
|
+
ingresos: 0,
|
|
9
|
+
personal: personalOcupado
|
|
10
|
+
};
|
|
11
|
+
const rango = consolidado.balance[0].Rango;
|
|
12
|
+
result.patrimonio = consolidado.eerr.find((item) => item.RubroId == 'ACT_CN_40001')[`MontoTotal_${rango}`];
|
|
13
|
+
result.ingresos = consolidado.balance.find((item) => item.RubroId == 'ACT_CN_30000')[`MontoTotal_${rango}`];
|
|
14
|
+
return result;
|
|
15
|
+
};
|
|
16
|
+
execute(data) {
|
|
17
|
+
let indice = 0;
|
|
18
|
+
let tamano = 0;
|
|
19
|
+
const constanteComercios = data.Constantes.comercios;
|
|
20
|
+
const constanteServicios = data.Constantes.servicios;
|
|
21
|
+
const extracto = this.extraerDelConsolidado(data.Consolidado, data.PersonalOcupado);
|
|
22
|
+
const elegido = (data.Tipo == 'PRODUCCION') ? constanteComercios : constanteServicios;
|
|
23
|
+
if (elegido.ingresos > 0 && elegido.patrimonio > 0 && elegido.personal > 0) {
|
|
24
|
+
indice = Math.pow((extracto.ingresos / elegido.ingresos) *
|
|
25
|
+
(extracto.patrimonio / elegido.patrimonio) *
|
|
26
|
+
(extracto.personal / elegido.personal), (1 / 3));
|
|
27
|
+
}
|
|
28
|
+
if (indice <= 0.035)
|
|
29
|
+
tamano = 'Microempresa';
|
|
30
|
+
else if (indice <= 0.115)
|
|
31
|
+
tamano = 'Pequeña Empresa';
|
|
32
|
+
else if (indice <= 1)
|
|
33
|
+
tamano = 'Mediana Empresa';
|
|
34
|
+
else
|
|
35
|
+
tamano = 'Gran Empresa';
|
|
36
|
+
return { Indice: indice, Ingresos: extracto.ingresos, Patrimonio: extracto.patrimonio, Tamano: tamano, Calculado: 1, Message: '' };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = ItapStrategy;
|