@zeniai/client-epic-state 5.2.34 → 5.2.35-beta10MM
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/lib/entity/actualMatching/actualMatchingPayload.d.ts +31 -0
- package/lib/entity/actualMatching/actualMatchingPayload.js +50 -0
- package/lib/entity/actualMatching/actualMatchingReducer.d.ts +9 -0
- package/lib/entity/actualMatching/actualMatchingReducer.js +33 -0
- package/lib/entity/actualMatching/actualMatchingSelector.d.ts +3 -0
- package/lib/entity/actualMatching/actualMatchingSelector.js +6 -0
- package/lib/entity/actualMatching/actualMatchingState.d.ts +23 -0
- package/lib/entity/actualMatching/actualMatchingState.js +2 -0
- package/lib/entity/actualMatching/actualMatchingTypes.d.ts +1 -0
- package/lib/entity/actualMatching/actualMatchingTypes.js +2 -0
- package/lib/entity/aiCfo/aiCfoReducer.js +78 -4
- package/lib/entity/aiCfo/aiCfoState.d.ts +16 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +31 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +53 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +33 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/epic.d.ts +8 -1
- package/lib/epic.js +14 -0
- package/lib/esm/entity/actualMatching/actualMatchingPayload.js +46 -0
- package/lib/esm/entity/actualMatching/actualMatchingReducer.js +30 -0
- package/lib/esm/entity/actualMatching/actualMatchingSelector.js +3 -0
- package/lib/esm/entity/actualMatching/actualMatchingState.js +1 -0
- package/lib/esm/entity/actualMatching/actualMatchingTypes.js +1 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +79 -5
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +53 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/esm/epic.js +14 -0
- package/lib/esm/index.js +7 -3
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +36 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +7 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +107 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +16 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +54 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +74 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +76 -0
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +35 -15
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewState.js +4 -2
- package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +68 -0
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +434 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +426 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
- package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +35 -0
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
- package/lib/esm/view/financeStatement/financeStatementReducer.js +17 -27
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +3 -3
- package/lib/index.d.ts +15 -6
- package/lib/index.js +82 -48
- package/lib/reducer.d.ts +2 -0
- package/lib/reducer.js +6 -0
- package/lib/rootStateTypes.d.ts +4 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.d.ts +12 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +40 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.d.ts +5 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +11 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +111 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.d.ts +3 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +19 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +58 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +78 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +80 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +5 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +34 -14
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +6 -3
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +85 -0
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +74 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +79 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +438 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +6 -5
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +87 -0
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +11 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +38 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +445 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +105 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +42 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
- package/lib/view/financeStatement/financeStatementReducer.js +17 -27
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.d.ts +1 -11
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +15 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import orderBy from 'lodash/orderBy';
|
|
2
|
+
import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
|
|
3
|
+
import { getActualMatchingMatchById } from '../../../entity/actualMatching/actualMatchingSelector';
|
|
4
|
+
import { generateJEOneTimeAccrualKey } from '../../../entity/jeSchedules/jeScheduleHelper';
|
|
5
|
+
import { getJEOneTimeAccrualByKey, } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
6
|
+
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
7
|
+
import { date } from '../../../zeniDayJS';
|
|
8
|
+
import { actualMatchingTransactionLineKey, } from '../types/actualMatchingViewState';
|
|
9
|
+
export function getSelectedMonthYearForCurrentTenant(state) {
|
|
10
|
+
const tenantId = getCurrentTenant(state)?.tenantId;
|
|
11
|
+
if (tenantId == null) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
return state.expenseAutomationViewState.selectedPeriodByTenantId[tenantId];
|
|
15
|
+
}
|
|
16
|
+
export function getTenantDisplayCurrency(state) {
|
|
17
|
+
const locale = getCurrentTenant(state)?.company?.companyLocaleInfo;
|
|
18
|
+
if (locale?.currencyCode == null || locale.currencyCode === '') {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
currencyCode: locale.currencyCode,
|
|
23
|
+
currencySymbol: locale.currencySymbol != null && locale.currencySymbol !== ''
|
|
24
|
+
? locale.currencySymbol
|
|
25
|
+
: locale.currencyCode,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function toMatchModalAccrual(member) {
|
|
29
|
+
if ('jeOneTimeAccrualKey' in member && member.jeOneTimeAccrualKey != null) {
|
|
30
|
+
return member;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
...member,
|
|
34
|
+
jeOneTimeAccrualKey: generateJEOneTimeAccrualKey(member.accrualId),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function uniqueMatchModalAccruals(pinned, searched) {
|
|
38
|
+
const byId = new Map();
|
|
39
|
+
pinned.forEach((row) => byId.set(row.accrualId, row));
|
|
40
|
+
searched.forEach((row) => {
|
|
41
|
+
if (!byId.has(row.accrualId)) {
|
|
42
|
+
byId.set(row.accrualId, row);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return Array.from(byId.values());
|
|
46
|
+
}
|
|
47
|
+
function uniqueTransactionSearchResults(pinned, searched) {
|
|
48
|
+
const byKey = new Map();
|
|
49
|
+
pinned.forEach((row) => byKey.set(actualMatchingTransactionLineKey(row.transactionType, row.transactionIntegrationId, row.lineId), row));
|
|
50
|
+
searched.forEach((row) => {
|
|
51
|
+
const key = actualMatchingTransactionLineKey(row.transactionType, row.transactionIntegrationId, row.lineId);
|
|
52
|
+
if (!byKey.has(key)) {
|
|
53
|
+
byKey.set(key, row);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return Array.from(byKey.values());
|
|
57
|
+
}
|
|
58
|
+
export function parseActualMatchingMatchId(matchId) {
|
|
59
|
+
const separator = matchId.indexOf(':');
|
|
60
|
+
if (separator <= 0 || separator === matchId.length - 1) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
transactionType: matchId.slice(0, separator).toLowerCase(),
|
|
65
|
+
transactionIntegrationId: matchId.slice(separator + 1),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const NOT_STARTED = {
|
|
69
|
+
fetchState: 'Not-Started',
|
|
70
|
+
error: undefined,
|
|
71
|
+
};
|
|
72
|
+
export function isAutoReversedAccrual(accrual) {
|
|
73
|
+
return (accrual.accrualStatus === 'reversed' &&
|
|
74
|
+
accrual.reversalTrigger === 'bill_match');
|
|
75
|
+
}
|
|
76
|
+
export function isManuallyReversedAccrual(accrual) {
|
|
77
|
+
return (accrual.accrualStatus === 'reversed' &&
|
|
78
|
+
accrual.reversalTrigger === 'manual_reverse');
|
|
79
|
+
}
|
|
80
|
+
export function isPendingReviewAccrual(accrual) {
|
|
81
|
+
if (accrual.accrualStatus !== 'posted' || accrual.matchSuggestion == null) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const resolution = accrual.matchSuggestion.resolution;
|
|
85
|
+
return resolution == null || resolution.length === 0;
|
|
86
|
+
}
|
|
87
|
+
export function isReversedMatchKind(kind) {
|
|
88
|
+
return kind === 'auto_reversed' || kind === 'manually_reversed';
|
|
89
|
+
}
|
|
90
|
+
export function getClearedMatchedAmount(accrual) {
|
|
91
|
+
return accrual.cleared?.matchedAmount?.amount;
|
|
92
|
+
}
|
|
93
|
+
export function getActualMatchingAmount(row) {
|
|
94
|
+
return row.actualAmount?.amount ?? row.estimatedAmount.amount;
|
|
95
|
+
}
|
|
96
|
+
function parseMatchTransactionDate(transactionDate) {
|
|
97
|
+
if (transactionDate == null || transactionDate === '') {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const parsed = date(transactionDate);
|
|
101
|
+
return Number.isFinite(parsed.valueOf()) ? parsed : undefined;
|
|
102
|
+
}
|
|
103
|
+
export function getActualMatchingReversalDate(accrual, matchTransactionDate) {
|
|
104
|
+
const matchedDate = isPendingReviewAccrual(accrual)
|
|
105
|
+
? accrual.matchSuggestion.matchedTransactionDate
|
|
106
|
+
: accrual.cleared?.matchedTransactionDate;
|
|
107
|
+
return matchedDate ?? parseMatchTransactionDate(matchTransactionDate);
|
|
108
|
+
}
|
|
109
|
+
function collectGroupedMembers(members) {
|
|
110
|
+
if (members.length <= 1) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
return members.map((member) => ({
|
|
114
|
+
accrualId: member.accrualId,
|
|
115
|
+
estimatedAmount: member.estimatedAmount,
|
|
116
|
+
jeDebitAccountName: member.jeDebitAccountName,
|
|
117
|
+
memo: member.memo,
|
|
118
|
+
serviceMonth: member.serviceMonth,
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
function collectLeftoverMembers(leftovers) {
|
|
122
|
+
if (leftovers == null || leftovers.length === 0) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
return leftovers.map((member) => ({
|
|
126
|
+
accrualId: member.accrualId,
|
|
127
|
+
estimatedAmount: member.estimatedAmount,
|
|
128
|
+
jeDebitAccountName: member.jeDebitAccountName,
|
|
129
|
+
memo: member.memo,
|
|
130
|
+
serviceMonth: member.serviceMonth,
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
function toActualMatchingRow(match) {
|
|
134
|
+
const firstMember = match.members[0];
|
|
135
|
+
if (firstMember == null) {
|
|
136
|
+
throw new Error('Actual matching row requires at least one member');
|
|
137
|
+
}
|
|
138
|
+
const first = toMatchModalAccrual(firstMember);
|
|
139
|
+
const leftoverMembers = match.leftovers ?? [];
|
|
140
|
+
const fromCleared = firstMember.cleared?.intendedAccrualIds;
|
|
141
|
+
const intendedAccrualIds = fromCleared != null && fromCleared.length > 0
|
|
142
|
+
? fromCleared
|
|
143
|
+
: [
|
|
144
|
+
...match.members.map((member) => member.accrualId),
|
|
145
|
+
...leftoverMembers.map((leftover) => leftover.accrualId),
|
|
146
|
+
];
|
|
147
|
+
return {
|
|
148
|
+
...first,
|
|
149
|
+
matchId: match.matchId,
|
|
150
|
+
kind: match.kind,
|
|
151
|
+
accruedAmount: match.accruedAmount,
|
|
152
|
+
actualAmount: match.actualAmount,
|
|
153
|
+
matchTier: match.matchTier,
|
|
154
|
+
matchShape: match.matchShape,
|
|
155
|
+
transactionType: match.transactionType,
|
|
156
|
+
transactionDate: match.transactionDate,
|
|
157
|
+
groupedAccrualIds: match.members.map((member) => member.accrualId),
|
|
158
|
+
groupedMembers: collectGroupedMembers(match.members),
|
|
159
|
+
intendedAccrualIds,
|
|
160
|
+
leftovers: collectLeftoverMembers(match.leftovers),
|
|
161
|
+
reversalDate: getActualMatchingReversalDate(first, match.transactionDate),
|
|
162
|
+
vendorName: match.vendorName != null && match.vendorName !== ''
|
|
163
|
+
? match.vendorName
|
|
164
|
+
: first.vendorName,
|
|
165
|
+
estimatedAmount: match.accruedAmount,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function matchesSearch(row, searchString) {
|
|
169
|
+
const trimmed = searchString.trim().toLowerCase();
|
|
170
|
+
if (trimmed.length === 0) {
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
if ((row.vendorName ?? '').toLowerCase().includes(trimmed)) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
if ((row.memo ?? '').toLowerCase().includes(trimmed)) {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return (row.groupedMembers ?? []).some((member) => (member.memo ?? '').toLowerCase().includes(trimmed));
|
|
180
|
+
}
|
|
181
|
+
function getActualMatchingSortValue(row, sortKey) {
|
|
182
|
+
switch (sortKey) {
|
|
183
|
+
case 'vendor':
|
|
184
|
+
return (row.vendorName ?? '').toLowerCase();
|
|
185
|
+
case 'date': {
|
|
186
|
+
const millis = row.reversalDate?.valueOf() ??
|
|
187
|
+
(row.transactionDate != null && row.transactionDate !== ''
|
|
188
|
+
? date(row.transactionDate).valueOf()
|
|
189
|
+
: 0);
|
|
190
|
+
return Number.isFinite(millis) ? millis : 0;
|
|
191
|
+
}
|
|
192
|
+
case 'amount':
|
|
193
|
+
return getActualMatchingAmount(row);
|
|
194
|
+
case 'category':
|
|
195
|
+
return row.jeDebitAccountName?.toLowerCase();
|
|
196
|
+
case 'class':
|
|
197
|
+
return row.jeDebitAccountingClassName?.toLowerCase();
|
|
198
|
+
case 'type':
|
|
199
|
+
return row.transactionType?.toLowerCase();
|
|
200
|
+
case 'lifecycle':
|
|
201
|
+
return row.kind;
|
|
202
|
+
case 'service':
|
|
203
|
+
return row.serviceMonth;
|
|
204
|
+
case 'accrued':
|
|
205
|
+
return row.accruedAmount?.amount ?? row.estimatedAmount.amount;
|
|
206
|
+
case 'actual':
|
|
207
|
+
return row.actualAmount?.amount;
|
|
208
|
+
case 'variance': {
|
|
209
|
+
const accrued = row.accruedAmount?.amount ?? row.estimatedAmount.amount;
|
|
210
|
+
const actual = row.actualAmount?.amount;
|
|
211
|
+
if (actual == null || accrued === 0) {
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
return ((actual - accrued) / Math.abs(accrued)) * 100;
|
|
215
|
+
}
|
|
216
|
+
default:
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function sortActualMatchingRows(rows, uiState) {
|
|
221
|
+
const lodashOrder = uiState.sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
222
|
+
return orderBy(rows, [(row) => getActualMatchingSortValue(row, uiState.sortKey)], [lodashOrder]);
|
|
223
|
+
}
|
|
224
|
+
const ESTIMATED_MINUTES_PER_PENDING_MATCH = 4;
|
|
225
|
+
function emptyKpiSummary() {
|
|
226
|
+
return {
|
|
227
|
+
actualsReceived: { count: 0, expectedCount: 0, vendorsPending: 0 },
|
|
228
|
+
autoReversed: { count: 0, percent: 0, clearedAmount: 0 },
|
|
229
|
+
pendingReview: { count: 0, amount: 0, estimatedMinutesToClear: 0 },
|
|
230
|
+
variance: { percent: 0, averagePercentPerMatch: 0, netAmount: 0 },
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function sumRowAmounts(rows, displayCurrencyCode) {
|
|
234
|
+
return rows.reduce((sum, row) => {
|
|
235
|
+
if (displayCurrencyCode != null &&
|
|
236
|
+
row.accruedAmount.currencyCode !== displayCurrencyCode) {
|
|
237
|
+
return sum;
|
|
238
|
+
}
|
|
239
|
+
return sum + getActualMatchingAmount(row);
|
|
240
|
+
}, 0);
|
|
241
|
+
}
|
|
242
|
+
function uniqueVendorCount(rows) {
|
|
243
|
+
const ids = new Set();
|
|
244
|
+
rows.forEach((row) => {
|
|
245
|
+
if (row.vendorId != null && row.vendorId !== '') {
|
|
246
|
+
ids.add(row.vendorId);
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (row.vendorName != null && row.vendorName !== '') {
|
|
250
|
+
ids.add(row.vendorName);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
return ids.size;
|
|
254
|
+
}
|
|
255
|
+
function rowVariancePercent(row) {
|
|
256
|
+
const accrued = row.accruedAmount?.amount ?? row.estimatedAmount.amount;
|
|
257
|
+
const actual = row.actualAmount?.amount;
|
|
258
|
+
if (actual == null || accrued === 0) {
|
|
259
|
+
return undefined;
|
|
260
|
+
}
|
|
261
|
+
return ((actual - accrued) / Math.abs(accrued)) * 100;
|
|
262
|
+
}
|
|
263
|
+
export function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
|
|
264
|
+
if (rows.length === 0) {
|
|
265
|
+
return emptyKpiSummary();
|
|
266
|
+
}
|
|
267
|
+
const autoReversed = rows.filter((row) => row.kind === 'auto_reversed');
|
|
268
|
+
const pendingReview = rows.filter((row) => row.kind === 'pending_review');
|
|
269
|
+
const receivedCount = rows.length;
|
|
270
|
+
const rowsWithActual = rows.filter((row) => {
|
|
271
|
+
if (row.actualAmount?.amount == null) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
if (displayCurrencyCode == null) {
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
const rowCurrency = row.accruedAmount?.currencyCode ?? row.estimatedAmount.currencyCode;
|
|
278
|
+
return rowCurrency === displayCurrencyCode;
|
|
279
|
+
});
|
|
280
|
+
const accruedTotal = rowsWithActual.reduce((sum, row) => sum + (row.accruedAmount?.amount ?? row.estimatedAmount.amount), 0);
|
|
281
|
+
const actualTotal = rowsWithActual.reduce((sum, row) => sum + (row.actualAmount?.amount ?? 0), 0);
|
|
282
|
+
const variancePercents = rows
|
|
283
|
+
.filter((row) => {
|
|
284
|
+
if (displayCurrencyCode == null) {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
const rowCurrency = row.accruedAmount?.currencyCode ?? row.estimatedAmount.currencyCode;
|
|
288
|
+
return rowCurrency === displayCurrencyCode;
|
|
289
|
+
})
|
|
290
|
+
.map(rowVariancePercent)
|
|
291
|
+
.filter((percent) => percent != null);
|
|
292
|
+
return {
|
|
293
|
+
actualsReceived: {
|
|
294
|
+
count: receivedCount,
|
|
295
|
+
// List API does not return still-expected accruals; hide "of N expected"
|
|
296
|
+
// in the strip until expectedCount is greater than received.
|
|
297
|
+
expectedCount: receivedCount,
|
|
298
|
+
vendorsPending: uniqueVendorCount(pendingReview),
|
|
299
|
+
},
|
|
300
|
+
autoReversed: {
|
|
301
|
+
count: autoReversed.length,
|
|
302
|
+
percent: Math.round((autoReversed.length / receivedCount) * 100),
|
|
303
|
+
clearedAmount: sumRowAmounts(autoReversed, displayCurrencyCode),
|
|
304
|
+
},
|
|
305
|
+
pendingReview: {
|
|
306
|
+
count: pendingReview.length,
|
|
307
|
+
amount: sumRowAmounts(pendingReview, displayCurrencyCode),
|
|
308
|
+
estimatedMinutesToClear: pendingReview.length * ESTIMATED_MINUTES_PER_PENDING_MATCH,
|
|
309
|
+
},
|
|
310
|
+
variance: {
|
|
311
|
+
percent: accruedTotal === 0
|
|
312
|
+
? 0
|
|
313
|
+
: ((actualTotal - accruedTotal) / Math.abs(accruedTotal)) * 100,
|
|
314
|
+
averagePercentPerMatch: variancePercents.length === 0
|
|
315
|
+
? 0
|
|
316
|
+
: variancePercents.reduce((sum, percent) => sum + percent, 0) /
|
|
317
|
+
variancePercents.length,
|
|
318
|
+
netAmount: actualTotal - accruedTotal,
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
export function getExpenseAutomationActualMatchingMatchView(state, matchId) {
|
|
323
|
+
const view = state.expenseAutomationActualMatchingViewState;
|
|
324
|
+
return {
|
|
325
|
+
match: getActualMatchingMatchById(state.actualMatchingState, matchId),
|
|
326
|
+
detailFetchState: view.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
|
|
327
|
+
refreshStatus: view.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
328
|
+
undoReversalStatus: view.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
329
|
+
lastMatchResults: view.lastMatchResultsByMatchId?.[matchId],
|
|
330
|
+
lastUndoResults: view.lastUndoResultsByMatchId?.[matchId],
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
export function getCloseMatchAfterUndo(state) {
|
|
334
|
+
return state.expenseAutomationActualMatchingViewState.closeMatchAfterUndo;
|
|
335
|
+
}
|
|
336
|
+
export function getExpenseAutomationActualMatchingView(state) {
|
|
337
|
+
const { expenseAutomationActualMatchingViewState } = state;
|
|
338
|
+
const { matchIdsByPeriod, fetchState, error, refreshStatus, uiState, matchModal, } = expenseAutomationActualMatchingViewState;
|
|
339
|
+
const selectedPeriod = getSelectedMonthYearForCurrentTenant(state);
|
|
340
|
+
const monthYearPeriodId = selectedPeriod != null ? toMonthYearPeriodId(selectedPeriod) : undefined;
|
|
341
|
+
const matchIds = monthYearPeriodId != null ? matchIdsByPeriod[monthYearPeriodId] : undefined;
|
|
342
|
+
const allRows = (matchIds ?? [])
|
|
343
|
+
.map((matchId) => getActualMatchingMatchById(state.actualMatchingState, matchId))
|
|
344
|
+
.filter((match) => match != null)
|
|
345
|
+
.filter((match) => match.members.length > 0)
|
|
346
|
+
.map(toActualMatchingRow);
|
|
347
|
+
const rows = allRows.filter((row) => matchesSearch(row, uiState.searchString));
|
|
348
|
+
const reversed = sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState);
|
|
349
|
+
const pendingReview = sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState);
|
|
350
|
+
const kpiSummary = buildActualMatchingKpiSummary(allRows, getTenantDisplayCurrency(state)?.currencyCode);
|
|
351
|
+
const searchedAccruals = matchModal.accrualSearch.results
|
|
352
|
+
.map((key) => getJEOneTimeAccrualByKey(key, state.jeSchedulesState))
|
|
353
|
+
.filter((accrual) => accrual != null);
|
|
354
|
+
const openedMatch = matchModal.openedFromMatchId != null
|
|
355
|
+
? getActualMatchingMatchById(state.actualMatchingState, matchModal.openedFromMatchId)
|
|
356
|
+
: undefined;
|
|
357
|
+
const pinnedAccruals = [
|
|
358
|
+
...(openedMatch?.members ?? []),
|
|
359
|
+
...(openedMatch?.leftovers ?? []),
|
|
360
|
+
].map(toMatchModalAccrual);
|
|
361
|
+
const firstMember = openedMatch?.members[0];
|
|
362
|
+
const cleared = firstMember?.cleared;
|
|
363
|
+
const suggestion = firstMember?.matchSuggestion;
|
|
364
|
+
const stamp = cleared ?? suggestion;
|
|
365
|
+
const consumedLineIds = cleared?.consumedLineIds;
|
|
366
|
+
const prefill = openedMatch == null
|
|
367
|
+
? undefined
|
|
368
|
+
: {
|
|
369
|
+
selectedAccrualIds: [
|
|
370
|
+
...openedMatch.members.map((member) => member.accrualId),
|
|
371
|
+
...(openedMatch.leftovers ?? []).map((leftover) => leftover.accrualId),
|
|
372
|
+
],
|
|
373
|
+
actualAmount: openedMatch.actualAmount.amount,
|
|
374
|
+
matchedTransactionId: stamp?.matchedTransactionId,
|
|
375
|
+
matchedLineId: cleared == null ? suggestion?.matchedLineId : undefined,
|
|
376
|
+
...(consumedLineIds != null && consumedLineIds.length > 0
|
|
377
|
+
? { consumedLineIds }
|
|
378
|
+
: {}),
|
|
379
|
+
};
|
|
380
|
+
// `fetchState` is a flat slice field that survives a period switch. Until this
|
|
381
|
+
// month's ids land, leftover Completed/Error is the previous month. Report
|
|
382
|
+
// Not-Started so chrome matches Review's "cache slot missing" skeleton, not
|
|
383
|
+
// empty-complete or a stale error. In-Progress is this month's fetch.
|
|
384
|
+
const fetchStatus = matchIds == null &&
|
|
385
|
+
fetchState !== 'In-Progress' &&
|
|
386
|
+
fetchState !== 'Not-Started'
|
|
387
|
+
? { fetchState: 'Not-Started', error: undefined }
|
|
388
|
+
: { fetchState, error };
|
|
389
|
+
return {
|
|
390
|
+
fetchState: fetchStatus.fetchState,
|
|
391
|
+
error: fetchStatus.error,
|
|
392
|
+
reversed,
|
|
393
|
+
pendingReview,
|
|
394
|
+
kpiSummary,
|
|
395
|
+
uiState,
|
|
396
|
+
refreshStatus,
|
|
397
|
+
hasLoadedForSelectedPeriod: matchIds != null,
|
|
398
|
+
matchModal: {
|
|
399
|
+
isOpen: matchModal.isOpen,
|
|
400
|
+
openedFromMatchId: matchModal.openedFromMatchId,
|
|
401
|
+
prefill,
|
|
402
|
+
confirmStatus: matchModal.confirmStatus,
|
|
403
|
+
lastBatchResults: matchModal.lastBatchResults,
|
|
404
|
+
transactionSearch: {
|
|
405
|
+
query: matchModal.transactionSearch.query,
|
|
406
|
+
results: uniqueTransactionSearchResults(matchModal.pinnedTransactionResults, matchModal.transactionSearch.results),
|
|
407
|
+
fetchState: {
|
|
408
|
+
fetchState: matchModal.transactionSearch.fetchState,
|
|
409
|
+
error: matchModal.transactionSearch.error,
|
|
410
|
+
},
|
|
411
|
+
nextPageToken: matchModal.transactionSearch.nextPageToken,
|
|
412
|
+
isLoadingMore: matchModal.transactionSearch.isLoadingMore,
|
|
413
|
+
},
|
|
414
|
+
accrualSearch: {
|
|
415
|
+
query: matchModal.accrualSearch.query,
|
|
416
|
+
results: uniqueMatchModalAccruals(pinnedAccruals, searchedAccruals),
|
|
417
|
+
fetchState: {
|
|
418
|
+
fetchState: matchModal.accrualSearch.fetchState,
|
|
419
|
+
error: matchModal.accrualSearch.error,
|
|
420
|
+
},
|
|
421
|
+
nextPageToken: matchModal.accrualSearch.nextPageToken,
|
|
422
|
+
isLoadingMore: matchModal.accrualSearch.isLoadingMore,
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
}
|
|
@@ -366,6 +366,10 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
366
366
|
// reports undefined rather than 0, so the UI can hide the badge instead of asserting "none".
|
|
367
367
|
const scheduleCountsByTab = {};
|
|
368
368
|
ALL_JE_PAGE_TABS.forEach((pageTab) => {
|
|
369
|
+
// AM's badge is `actualMatching.kpiSummary`, not schedule row keys.
|
|
370
|
+
if (pageTab === 'actual_matching') {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
369
373
|
const periodTabKey = monthYearPeriodId != null
|
|
370
374
|
? getJESchedulePeriodTabKey(pageTab, monthYearPeriodId)
|
|
371
375
|
: null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
|
+
const ACTUAL_MATCHING_SORT_KEYS = [
|
|
3
|
+
'vendor',
|
|
4
|
+
'date',
|
|
5
|
+
'amount',
|
|
6
|
+
'category',
|
|
7
|
+
'class',
|
|
8
|
+
'type',
|
|
9
|
+
'lifecycle',
|
|
10
|
+
'service',
|
|
11
|
+
'accrued',
|
|
12
|
+
'actual',
|
|
13
|
+
'variance',
|
|
14
|
+
];
|
|
15
|
+
export const toActualMatchingSortKey = (v) => stringToUnion(v, ACTUAL_MATCHING_SORT_KEYS);
|
|
16
|
+
export const MATCH_TRANSACTION_SEARCH_PAGE_SIZE = 50;
|
|
17
|
+
export const MATCH_ACCRUAL_SEARCH_LIMIT = 50;
|
|
18
|
+
export const MATCH_SEARCH_DEBOUNCE_MS = 300;
|
|
19
|
+
const MATCH_AND_REVERSE_RESULT_STATUSES = [
|
|
20
|
+
'reversed',
|
|
21
|
+
'noop',
|
|
22
|
+
'conflict',
|
|
23
|
+
'claim_lost',
|
|
24
|
+
'error',
|
|
25
|
+
];
|
|
26
|
+
export const toMatchAndReverseResultStatus = (v) => stringToUnion(v, MATCH_AND_REVERSE_RESULT_STATUSES);
|
|
27
|
+
const UNDO_REVERSAL_RESULT_STATUSES = [
|
|
28
|
+
'undone',
|
|
29
|
+
'claim_lost',
|
|
30
|
+
'error',
|
|
31
|
+
];
|
|
32
|
+
export const toUndoReversalResultStatus = (v) => stringToUnion(v, UNDO_REVERSAL_RESULT_STATUSES);
|
|
33
|
+
export function actualMatchingTransactionLineKey(transactionType, transactionIntegrationId, lineId) {
|
|
34
|
+
return `${transactionType}:${transactionIntegrationId}:${lineId}`;
|
|
35
|
+
}
|
|
@@ -16,7 +16,14 @@ const JE_SCHEDULE_SORT_KEYS = [
|
|
|
16
16
|
'memo',
|
|
17
17
|
];
|
|
18
18
|
export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
|
|
19
|
-
|
|
19
|
+
// `actual_matching` is chrome only: the JE tab bar includes it, but AM data is
|
|
20
|
+
// `expenseAutomationActualMatchingViewState`, not the schedules period-tab
|
|
21
|
+
// cache below. Walks of ALL_JE_PAGE_TABS that read schedule keys must skip it.
|
|
22
|
+
const JE_PAGE_TABS = [
|
|
23
|
+
'schedules',
|
|
24
|
+
'actual_matching',
|
|
25
|
+
'existing_schedules',
|
|
26
|
+
];
|
|
20
27
|
export const toJEPageTab = (v) => stringToUnion(v, JE_PAGE_TABS);
|
|
21
28
|
export const ALL_JE_PAGE_TABS = JE_PAGE_TABS;
|
|
22
29
|
export const getJESchedulePeriodTabKey = (selectedPageTab, monthYearPeriodId) => `${selectedPageTab}_${monthYearPeriodId}`;
|
|
@@ -33,9 +33,18 @@ const financeStatement = createSlice({
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
updateFinanceStatementTimeframe(draft, action) {
|
|
36
|
+
// Unrelated UI re-dispatches the *current* timeframe as a side effect (the
|
|
37
|
+
// reports page hangs its table scroll reset off that callback); dropping the
|
|
38
|
+
// anchor there would silently reset the user's period to the latest one.
|
|
39
|
+
if (draft.timeframe === action.payload) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
36
42
|
draft.timeframe = action.payload;
|
|
43
|
+
// A month anchor is meaningless once the timeframe becomes quarter/year, so
|
|
44
|
+
// a real change drops it and returns the width to the default — 12 months
|
|
45
|
+
// must not become 12 quarters. Order is the user's, so it survives.
|
|
37
46
|
draft.selectedCOABalancesRange = {
|
|
38
|
-
numberOfPeriods:
|
|
47
|
+
numberOfPeriods: initialFinanceStatementState.selectedCOABalancesRange.numberOfPeriods,
|
|
39
48
|
orderBy: draft.selectedCOABalancesRange.orderBy,
|
|
40
49
|
};
|
|
41
50
|
},
|
|
@@ -77,8 +86,7 @@ const financeStatement = createSlice({
|
|
|
77
86
|
draft.selectedReportId = action.payload;
|
|
78
87
|
},
|
|
79
88
|
updateFinanceStatementAdditionalBalancesSelection(draft, action) {
|
|
80
|
-
const {
|
|
81
|
-
const safeCoaBalances = coaBalances != null ? coaBalances : [];
|
|
89
|
+
const { additionalBalances: additionalBalancesPayload, maxNumOfPeriodsToHighlight, } = action.payload;
|
|
82
90
|
const additionalBalances = additionalBalancesPayload ?? [];
|
|
83
91
|
let tempAdditionalBalances = [...additionalBalances];
|
|
84
92
|
if (additionalBalances.includes('this_period_vs_last_period') ||
|
|
@@ -94,30 +102,12 @@ const financeStatement = createSlice({
|
|
|
94
102
|
draft.maxNumOfPeriodsToHighlight = maxNumOfPeriodsToHighlight;
|
|
95
103
|
draft.isAdditionalBalancesShown =
|
|
96
104
|
additionalBalances.length != 0 ? true : false;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
thisPeriod,
|
|
104
|
-
};
|
|
105
|
-
const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
|
|
106
|
-
firstMonthOfFY,
|
|
107
|
-
thisPeriod: thisPeriod,
|
|
108
|
-
coaBalances: safeCoaBalances,
|
|
109
|
-
timeframe,
|
|
110
|
-
maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
|
|
111
|
-
currentSelection: {
|
|
112
|
-
selectedCOABalancesRange: selectedCoaBalancesRangeWithThisPeriod,
|
|
113
|
-
},
|
|
114
|
-
orderBy: 'ascending_date',
|
|
115
|
-
maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
|
|
116
|
-
});
|
|
117
|
-
draft.selectedCOABalancesRange =
|
|
118
|
-
selectionRanges.selectedCOABalancesRange;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
105
|
+
// Column metadata only — must not touch selectedCOABalancesRange. The
|
|
106
|
+
// reports page fires this on load, on resize and on every fetch-state
|
|
107
|
+
// transition (so also on report switch and on remount after a drill-down)
|
|
108
|
+
// with a viewport-derived period count that knows nothing about the range
|
|
109
|
+
// the user picked. The width default comes from initial state, and from
|
|
110
|
+
// updateFinanceStatementTimeframe on a real timeframe change.
|
|
121
111
|
},
|
|
122
112
|
updateDownloadState(draft, action) {
|
|
123
113
|
draft.downloadState = action.payload;
|
|
@@ -30,6 +30,10 @@ export const localDataToSaveInvoicingCustomerPayload = (localData, billingAddres
|
|
|
30
30
|
: {}),
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* The email rendered once with sentinel tokens standing in for the subject and
|
|
35
|
+
* body, so the composer can splice a draft into it without another request.
|
|
36
|
+
*/
|
|
33
37
|
export const toInvoicingPaymentLinkEmailPreview = (payload) => ({
|
|
34
38
|
body: payload.body,
|
|
35
39
|
bodyToken: payload.body_token,
|
|
@@ -8,7 +8,7 @@ import { isAwaitingMarkAsPaid, isBulkProcessing, isSodAdminFallbackEligibleForSt
|
|
|
8
8
|
import { applyAdvancedFiltersOnList } from '../../spendManagementFilterHelpers';
|
|
9
9
|
import { getSelectedWithdrawFromAccount } from '../billDetailView/billDetailViewSelector';
|
|
10
10
|
import { getBillPayConfigBotEmail } from '../billPayConfig/billPayConfigSelector';
|
|
11
|
-
import { getCategoryValueForBill } from './billListFilterHelpers';
|
|
11
|
+
import { getActualPaymentDate, getCategoryValueForBill, } from './billListFilterHelpers';
|
|
12
12
|
import { ALL_BILL_TABS, getBillListKey, } from './billListState';
|
|
13
13
|
export const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, loggedInUserId) => {
|
|
14
14
|
const { billListState, billTransactionState, billPayConfigState, entityApprovalStatusState, userState, recurringBillState, billsBulkActionViewState, } = state;
|
|
@@ -432,7 +432,7 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
else {
|
|
435
|
-
if (Boolean(transaction.billPayInfo
|
|
435
|
+
if (Boolean(getActualPaymentDate(transaction.billPayInfo)) === true) {
|
|
436
436
|
transactionsWithSortKeyValue.push(transaction);
|
|
437
437
|
}
|
|
438
438
|
else {
|
|
@@ -517,7 +517,7 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
517
517
|
case 'dueDate':
|
|
518
518
|
return currentTab === 'draft'
|
|
519
519
|
? transaction.dueDate
|
|
520
|
-
: transaction.billPayInfo
|
|
520
|
+
: getActualPaymentDate(transaction.billPayInfo);
|
|
521
521
|
case 'status':
|
|
522
522
|
return getStatusPerTab(transaction);
|
|
523
523
|
case 'amount':
|