@zeniai/client-epic-state 5.2.41-beta5MM → 5.2.41-beta6MM

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.
@@ -227,6 +227,7 @@ function emptyKpiSummary() {
227
227
  actualsReceived: { count: 0, expectedCount: 0, vendorsPending: 0 },
228
228
  autoReversed: { count: 0, percent: 0, clearedAmount: 0 },
229
229
  pendingReview: { count: 0, amount: 0, estimatedMinutesToClear: 0 },
230
+ reversed: { count: 0 },
230
231
  variance: { percent: 0, averagePercentPerMatch: 0, netAmount: 0 },
231
232
  };
232
233
  }
@@ -282,6 +283,7 @@ export function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
282
283
  }
283
284
  const autoReversed = kpiRows.filter((row) => row.kind === 'auto_reversed');
284
285
  const pendingReview = kpiRows.filter((row) => row.kind === 'pending_review');
286
+ const reversed = kpiRows.filter((row) => isReversedMatchKind(row.kind));
285
287
  const receivedCount = kpiRows.length;
286
288
  const rowsWithActual = kpiRows.filter((row) => row.actualAmount?.amount != null);
287
289
  const accruedTotal = rowsWithActual.reduce((sum, row) => sum + (row.accruedAmount?.amount ?? row.estimatedAmount.amount), 0);
@@ -307,6 +309,9 @@ export function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
307
309
  amount: sumRowAmounts(pendingReview, displayCurrencyCode),
308
310
  estimatedMinutesToClear: pendingReview.length * ESTIMATED_MINUTES_PER_PENDING_MATCH,
309
311
  },
312
+ reversed: {
313
+ count: reversed.length,
314
+ },
310
315
  variance: {
311
316
  percent: accruedTotal === 0
312
317
  ? 0
@@ -43,6 +43,9 @@ export interface ActualMatchingKpiSummary {
43
43
  count: number;
44
44
  estimatedMinutesToClear: number;
45
45
  };
46
+ reversed: {
47
+ count: number;
48
+ };
46
49
  variance: {
47
50
  averagePercentPerMatch: number;
48
51
  netAmount: number;
@@ -247,6 +247,7 @@ function emptyKpiSummary() {
247
247
  actualsReceived: { count: 0, expectedCount: 0, vendorsPending: 0 },
248
248
  autoReversed: { count: 0, percent: 0, clearedAmount: 0 },
249
249
  pendingReview: { count: 0, amount: 0, estimatedMinutesToClear: 0 },
250
+ reversed: { count: 0 },
250
251
  variance: { percent: 0, averagePercentPerMatch: 0, netAmount: 0 },
251
252
  };
252
253
  }
@@ -302,6 +303,7 @@ function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
302
303
  }
303
304
  const autoReversed = kpiRows.filter((row) => row.kind === 'auto_reversed');
304
305
  const pendingReview = kpiRows.filter((row) => row.kind === 'pending_review');
306
+ const reversed = kpiRows.filter((row) => isReversedMatchKind(row.kind));
305
307
  const receivedCount = kpiRows.length;
306
308
  const rowsWithActual = kpiRows.filter((row) => row.actualAmount?.amount != null);
307
309
  const accruedTotal = rowsWithActual.reduce((sum, row) => sum + (row.accruedAmount?.amount ?? row.estimatedAmount.amount), 0);
@@ -327,6 +329,9 @@ function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
327
329
  amount: sumRowAmounts(pendingReview, displayCurrencyCode),
328
330
  estimatedMinutesToClear: pendingReview.length * ESTIMATED_MINUTES_PER_PENDING_MATCH,
329
331
  },
332
+ reversed: {
333
+ count: reversed.length,
334
+ },
330
335
  variance: {
331
336
  percent: accruedTotal === 0
332
337
  ? 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.41-beta5MM",
3
+ "version": "5.2.41-beta6MM",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",