@bizdoc/core 1.10.0-next.7 → 1.10.0-next.8
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/fesm2020/bizdoc-core.mjs
CHANGED
@@ -14267,23 +14267,27 @@ class CubeMatrixComponent {
|
|
14267
14267
|
let sum = 0, j = 0;
|
14268
14268
|
while (j < this.rows.length) {
|
14269
14269
|
let key = this.rows[j].key;
|
14270
|
-
if (
|
14271
|
-
|
14272
|
-
|
14273
|
-
sum += val;
|
14274
|
-
}
|
14275
|
-
else {
|
14276
|
-
let row = data[key];
|
14277
|
-
if (row) {
|
14278
|
-
let val = row[c.key];
|
14270
|
+
if (!key.startsWith('_sum')) {
|
14271
|
+
if (isFunction(calculate)) {
|
14272
|
+
let val = calculate(key, this.data);
|
14279
14273
|
if (val !== undefined)
|
14280
14274
|
sum += val;
|
14281
|
-
|
14282
|
-
|
14275
|
+
}
|
14276
|
+
else {
|
14277
|
+
let row = data[key];
|
14278
|
+
if (row) {
|
14279
|
+
let val = row[c.key];
|
14280
|
+
if (val !== undefined)
|
14281
|
+
sum += val;
|
14282
|
+
if (key === value)
|
14283
|
+
break;
|
14284
|
+
}
|
14283
14285
|
}
|
14284
14286
|
}
|
14285
14287
|
j++;
|
14286
14288
|
}
|
14289
|
+
if (!data[name])
|
14290
|
+
data[name] = {};
|
14287
14291
|
data[name][c.key] = sum;
|
14288
14292
|
total += sum;
|
14289
14293
|
});
|