bdpformulas 1.0.71 → 1.0.72
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.
|
@@ -259,13 +259,9 @@ class FlujoConstructor {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
agregarQuitarClones = () => {
|
|
262
|
-
const
|
|
263
|
-
(item.Clasificador == 'DETL' || item.Clasificador == 'HABM'))
|
|
264
|
-
|
|
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'));
|
|
268
|
-
filter.map((item) => {
|
|
262
|
+
const filter = this.data.FlujoProyectadoMensual.filter((item) => item.IndicadorABM !== 'B' &&
|
|
263
|
+
(item.Clasificador == 'DETL' || item.Clasificador == 'HABM'));
|
|
264
|
+
filter.forEach((item) => {
|
|
269
265
|
const key = `${item.RubroId}_CLONE_${item.UUID}`;
|
|
270
266
|
const UUID = `CLONE_${item.UUID}`;
|
|
271
267
|
const clone = {
|
|
@@ -280,9 +276,6 @@ class FlujoConstructor {
|
|
|
280
276
|
clone['Monto1'] = total;
|
|
281
277
|
item.MontoTotal = total;
|
|
282
278
|
if (!this.mapObject.has(key)) {
|
|
283
|
-
for (let i = 1; i <= this.rango; i++) {
|
|
284
|
-
clone[`Monto${i}`] = 0;
|
|
285
|
-
}
|
|
286
279
|
this.array.push(clone);
|
|
287
280
|
}
|
|
288
281
|
else {
|
|
@@ -290,8 +283,14 @@ class FlujoConstructor {
|
|
|
290
283
|
if (index >= 0)
|
|
291
284
|
this.array[index] = clone;
|
|
292
285
|
}
|
|
293
|
-
this.mapObject.set(
|
|
286
|
+
this.mapObject.set(key, clone);
|
|
294
287
|
});
|
|
288
|
+
const borrados = this.data.FlujoProyectadoMensual.filter((item) => item.IndicadorABM === 'B' &&
|
|
289
|
+
(item.Clasificador == 'DETL' || item.Clasificador == 'HABM')).map((item) => `CLONE_${item.UUID}`);
|
|
290
|
+
this.data.FlujoProyectadoMensual =
|
|
291
|
+
this.data.FlujoProyectadoMensual.filter((item) => item.IndicadorABM !== 'B');
|
|
292
|
+
this.array = this.array.filter((item) => !borrados.includes(item.UUID));
|
|
293
|
+
this.data.FlujoProyectadoAnual = this.data.FlujoProyectadoAnual.filter((item) => !borrados.includes(item.UUID));
|
|
295
294
|
const anuales = this.array.filter((item) => item.Clasificador == 'DETL' || item.Clasificador == 'HABM');
|
|
296
295
|
for (const anualItem of anuales) {
|
|
297
296
|
const key = `${anualItem.RubroId}_${anualItem.UUID}`.replace('_CLONE', '');
|
|
@@ -41,7 +41,7 @@ class DeudasStrategy {
|
|
|
41
41
|
let destino = this.data.Deudas.find((item) => item.RubroId == params.rubro2);
|
|
42
42
|
this.data.Deudas.filter((item) => item.RubroId == params.rubro1).reduce((sum, item) => {
|
|
43
43
|
if (!sum)
|
|
44
|
-
sum = item;
|
|
44
|
+
sum = { ...item };
|
|
45
45
|
else {
|
|
46
46
|
for (let i = 1; i <= this.data.CantidadProyeccion; i++) {
|
|
47
47
|
sum[`Monto${i}`] = this.cleanNumber(sum[`Monto${i}`]) + this.cleanNumber(item[`Monto${i}`]);
|