bdpformulas 1.0.18 → 1.0.19

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.
@@ -17,6 +17,7 @@ const getPrimeraFila = (configuracion, auxiliarPrimitivo, desarrolloCalc) => {
17
17
  acc.CorrelativoDesc = '';
18
18
  acc.Total = 0;
19
19
  acc.TotalPlusHato = 0;
20
+ acc.IndicadorABM = 'N';
20
21
  }
21
22
  let value = 0;
22
23
  if (item.RubroId !== 'ACT_PEC_SALDO') {
@@ -46,6 +47,7 @@ const getFila = (configuracion, correlativo = 0) => {
46
47
  acc.Descripcion = '';
47
48
  acc.Total = 0;
48
49
  acc.TotalPlusHato = 0;
50
+ acc.IndicadorABM = 'N';
49
51
  }
50
52
  acc[item.RubroId] = 0;
51
53
  return acc;
@@ -60,7 +62,7 @@ const getGrupoCalculado = (grupo, configuracion) => {
60
62
  const monto = parseFloat(item.Monto);
61
63
  result.get(item.Correlativo).CodigoConcepto = item.Grupo;
62
64
  result.get(item.Correlativo).Subtipo = item.Subtipo;
63
- result.get(item.Correlativo).Descripcion = item.Descripcion;
65
+ result.get(item.Correlativo).Descripcion = item.Descripcion1;
64
66
  result.get(item.Correlativo).SubtipoDesc = item.SubtipoDesc;
65
67
  result.get(item.Correlativo).Unidad = item.Descripcion2;
66
68
  result.get(item.Correlativo).CorrelativoDesc = item.CorrelativoDesc;
@@ -99,6 +101,14 @@ const calcular = (conceptos, configuracion, auxiliarPrimitivo, desarrolloCalc) =
99
101
  const subtipo = grupoCalc.get(3).Subtipo;
100
102
  if (!subtipos.has(subtipo))
101
103
  subtipos.set(subtipo, getFila(configuracion, 4));
104
+ if (!subtipos.has('T')) {
105
+ subtipos.set('T', getFila(configuracion, 4));
106
+ subtipos.get('T').CodigoConcepto = 'TOTAL';
107
+ subtipos.get('T').Subtipo = 'T';
108
+ subtipos.get('T').SubtipoDesc = 'TOTAL';
109
+ subtipos.get('T').Descripcion = 'TOTAL';
110
+ subtipos.get('T').Unidad = '';
111
+ }
102
112
  subtipos.get(subtipo).CodigoConcepto = 'TOTAL_GRUPO';
103
113
  subtipos.get(subtipo).Subtipo = grupoCalc.get(3).Subtipo;
104
114
  subtipos.get(subtipo).SubtipoDesc = grupoCalc.get(3).SubtipoDesc;
@@ -106,9 +116,12 @@ const calcular = (conceptos, configuracion, auxiliarPrimitivo, desarrolloCalc) =
106
116
  subtipos.get(subtipo).Unidad = grupoCalc.get(3).Unidad;
107
117
  configuracion.forEach((item) => {
108
118
  subtipos.get(subtipo)[item.RubroId] += grupoCalc.get(3)[item.RubroId];
119
+ subtipos.get('T')[item.RubroId] += grupoCalc.get(3)[item.RubroId];
109
120
  });
110
121
  subtipos.get(subtipo).Total += grupoCalc.get(3).Total;
111
122
  subtipos.get(subtipo).TotalPlusHato += grupoCalc.get(3).TotalPlusHato;
123
+ subtipos.get('T').Total += grupoCalc.get(3).Total;
124
+ subtipos.get('T').TotalPlusHato += grupoCalc.get(3).TotalPlusHato;
112
125
  result = [...result, ...Array.from(grupoCalc.values())];
113
126
  }
114
127
  return [...root, ...result, ...Array.from(subtipos.values())];
@@ -0,0 +1 @@
1
+ export declare const calcular: (data: any) => void;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calcular = void 0;
4
+ const calcular = (data) => {
5
+ };
6
+ exports.calcular = calcular;
@@ -0,0 +1,4 @@
1
+ import { Strategy } from "../../strategy.interface";
2
+ export default class VentasPrd implements Strategy {
3
+ execute(data: any): any;
4
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const ingresosCalc = __importStar(require("./ventas.detail/ingresosCalc"));
27
+ class VentasPrd {
28
+ execute(data) {
29
+ let result = {};
30
+ result.Ingresos = ingresosCalc.calcular(data.Ingresos);
31
+ // const estacionalidad = estacionalidadCalc.estacionalidadCalc(data.Ventas,
32
+ // result.VentasIngreso)
33
+ // result.EstacionalidadPorcentaje= estacionalidadCalc.getEstacionalidadPorcentaje(estacionalidad)
34
+ // result.EstacionalidadCalc= estacionalidadCalc.getEstacionalidadCalc(estacionalidad)
35
+ result.OtrosIngresos = data.Ventas.OtrosIngresos;
36
+ return result;
37
+ }
38
+ }
39
+ exports.default = VentasPrd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bdpformulas",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",