bdpformulas 1.0.27 → 1.0.28
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,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class BalanceAgrStrategy {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.ventas = {};
|
|
6
|
+
this.costos = {};
|
|
7
|
+
}
|
|
4
8
|
execute(data) {
|
|
5
9
|
data.eerr = calcularEERR(data.eerr, this.ventas, this.costos);
|
|
6
10
|
return data;
|
|
@@ -10,3 +14,22 @@ exports.default = BalanceAgrStrategy;
|
|
|
10
14
|
const calcularEERR = (eerr, ventas, costos) => {
|
|
11
15
|
return eerr;
|
|
12
16
|
};
|
|
17
|
+
//
|
|
18
|
+
// const getVentasXGestion = (ventas: any) => {
|
|
19
|
+
//
|
|
20
|
+
// const ingresosTotales = ventas.Productos.map((item:any)=>item.Ingresos).flat().
|
|
21
|
+
// filter((item:any)=>item.RubroId==='ACT_AGR_ING_TO')
|
|
22
|
+
//
|
|
23
|
+
// let result = ingresosTotales.reduce((acc:any, item:any) => {
|
|
24
|
+
// const rango = item.Rango
|
|
25
|
+
// for(let i=1; i<=rango;i++){
|
|
26
|
+
// if(!acc.has(i)){
|
|
27
|
+
// acc.set(i,{value:0})
|
|
28
|
+
// }
|
|
29
|
+
// acc.get(i).value += item[`Gestion${i}`]
|
|
30
|
+
// }
|
|
31
|
+
// return acc
|
|
32
|
+
// },new Map())
|
|
33
|
+
//
|
|
34
|
+
// return Array.from(result.values())
|
|
35
|
+
// }
|