@zeniai/client-epic-state 4.19.90 → 4.19.91-beta1ND

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.
Files changed (54) hide show
  1. package/lib/commonStateTypes/reduceFetchState.d.ts +9 -0
  2. package/lib/commonStateTypes/reduceFetchState.js +26 -0
  3. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  4. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -1
  5. package/lib/entity/jeSchedules/jeSchedulesPayload.js +10 -5
  6. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  7. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -2
  8. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -2
  9. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +7 -3
  10. package/lib/entity/jeSchedules/jeSchedulesTypes.js +3 -1
  11. package/lib/entity/reimbursement/reimbursementPayload.d.ts +1 -1
  12. package/lib/entity/reimbursement/reimbursementPayload.js +1 -1
  13. package/lib/entity/transaction/transactionReducer.js +3 -2
  14. package/lib/entity/transaction/transactionSelector.d.ts +2 -2
  15. package/lib/entity/transaction/transactionState.d.ts +3 -2
  16. package/lib/esm/commonStateTypes/reduceFetchState.js +25 -0
  17. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +10 -5
  18. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +3 -3
  19. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +1 -0
  20. package/lib/esm/entity/reimbursement/reimbursementPayload.js +1 -1
  21. package/lib/esm/entity/transaction/transactionReducer.js +3 -2
  22. package/lib/esm/index.js +7 -6
  23. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +4 -12
  24. package/lib/esm/view/financeStatement/financeStatementReducer.js +11 -8
  25. package/lib/esm/view/financeStatement/financeStatementSelector.js +10 -5
  26. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +276 -0
  27. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +1 -0
  28. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
  29. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  30. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  31. package/lib/esm/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  32. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +2 -7
  33. package/lib/index.d.ts +9 -7
  34. package/lib/index.js +30 -25
  35. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  36. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
  37. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -11
  38. package/lib/view/financeStatement/financeStatementReducer.js +11 -8
  39. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  40. package/lib/view/financeStatement/financeStatementSelector.js +10 -5
  41. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +13 -0
  42. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +280 -0
  43. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +57 -0
  44. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +2 -0
  45. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +4 -2
  46. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +7 -2
  47. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  48. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +4 -0
  49. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  50. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  51. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  52. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +1 -6
  53. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  54. package/package.json +2 -2
@@ -8,6 +8,7 @@ import { extractThisPeriod } from '../../commonStateTypes/viewAndReport/thisPeri
8
8
  import { getBalanceSheet } from '../balanceSheet/balanceSheetSelector';
9
9
  import { getCashFlow } from '../cashFlow/cashFlowSelector';
10
10
  import { getProfitAndLossReport, } from '../profitAndLoss/profitAndLossSelector';
11
+ import { getProfitAndLossClassesHorizontalView } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
11
12
  import { getProfitAndLossClassesView } from '../profitAndLossClassesView/profitAndLossClassesViewSelector';
12
13
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
13
14
  const datesSorted = [
@@ -42,11 +43,11 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
42
43
  if (dataAvailable != null) {
43
44
  const noFilter = newBalancesFilterForDateRange(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
44
45
  const profitAndLossForTimeframeTicks = getProfitAndLossReport(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
45
- if (profitAndLossForTimeframeTicks.sections.expenses != null) {
46
- balancesInTimeframe =
47
- profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
48
- ? profitAndLossForTimeframeTicks.sections['expenses'].balances
49
- : profitAndLossForTimeframeTicks.sections['income'].balances;
46
+ const expensesBalances = profitAndLossForTimeframeTicks.sections.expenses?.balances ?? [];
47
+ const incomeBalances = profitAndLossForTimeframeTicks.sections.income?.balances ?? [];
48
+ balancesInTimeframe =
49
+ expensesBalances.length > 0 ? expensesBalances : incomeBalances;
50
+ if (balancesInTimeframe.length > 0) {
50
51
  allTimeframeTicks = balancesInTimeframe.map((balance) => toTimeframeTick(balance));
51
52
  }
52
53
  }
@@ -60,6 +61,9 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
60
61
  const profitAndLossReport = getProfitAndLossReport(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
61
62
  const classFilter = newBalancesFilterClassesView(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
62
63
  const profitAndLossByClassReport = getProfitAndLossClassesView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
64
+ const profitAndLossByClassHorizontalReport = getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
65
+ ? thisPeriod
66
+ : undefined);
63
67
  const balanceSheetReport = getBalanceSheet(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
64
68
  const cashFlowReport = getCashFlow(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
65
69
  const allReports = [
@@ -107,6 +111,7 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
107
111
  dataAvailable,
108
112
  profitAndLossReport,
109
113
  profitAndLossByClassReport,
114
+ profitAndLossByClassHorizontalReport,
110
115
  balanceSheetReport,
111
116
  cashFlowReport,
112
117
  filter,
@@ -0,0 +1,276 @@
1
+ import { toAmountWC } from '../../commonStateTypes/amount';
2
+ import { reduceFetchStateParallelTimeframes } from '../../commonStateTypes/reduceFetchState';
3
+ import { getSectionClassesViewReport } from '../../entity/sectionClassesViewV2/sectionClassesViewSelector';
4
+ /** If `ProfitAndLossClassesViewState.currency` is unset (e.g. tests). */
5
+ const FALLBACK_REPORT_CURRENCY = {
6
+ currencyCode: 'USD',
7
+ currencySymbol: '$',
8
+ };
9
+ export const profitAndLossHorizontalIdsInOrder = [
10
+ 'income',
11
+ 'cogs',
12
+ 'grossProfit',
13
+ 'expenses',
14
+ 'earningsBeforeInterestAndTax',
15
+ 'otherIncome',
16
+ 'otherExpenses',
17
+ 'netOtherIncome',
18
+ 'netIncome',
19
+ ];
20
+ const SECTION_TITLES = {
21
+ income: 'Income',
22
+ cogs: 'Cost of Goods Sold',
23
+ grossProfit: 'Gross Profit',
24
+ expenses: 'Expenses',
25
+ earningsBeforeInterestAndTax: 'Net Operating Income',
26
+ otherIncome: 'Other Income',
27
+ otherExpenses: 'Other Expenses',
28
+ netOtherIncome: 'Net Other Income',
29
+ netIncome: 'Net Income',
30
+ };
31
+ /** Sections fetched and pivoted for horizontal layout (excludes e.g. `netOperatingIncome`). */
32
+ const HORIZONTAL_PANDL_SECTION_IDS = [
33
+ 'income',
34
+ 'cogs',
35
+ 'expenses',
36
+ 'otherIncome',
37
+ 'otherExpenses',
38
+ ];
39
+ export const getProfitAndLossClassesHorizontalView = (filter, accountState, classState, sectionsState, profitAndLossClassesViewState, selectedPeriod) => {
40
+ const fetchState = reduceFetchStateParallelTimeframes([
41
+ profitAndLossClassesViewState.fetchState.month,
42
+ profitAndLossClassesViewState.fetchState.quarter,
43
+ profitAndLossClassesViewState.fetchState.year,
44
+ ]);
45
+ const reportId = 'profit_and_loss_by_classes';
46
+ // Build class columns from the class hierarchy (top-level only)
47
+ const classColumns = buildClassColumns(profitAndLossClassesViewState.classHierarchy, profitAndLossClassesViewState.uiState.classesToFilterOut);
48
+ const sections = {};
49
+ const calculatedSections = {};
50
+ let reportCurrency = FALLBACK_REPORT_CURRENCY;
51
+ if (fetchState.fetchState === 'Completed' && selectedPeriod != null) {
52
+ // Get section reports using existing selector infrastructure
53
+ const sectionReports = {};
54
+ HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
55
+ sectionReports[sectionId] = getSectionClassesViewReport(accountState, classState, sectionsState, { reportId, sectionId }, filter);
56
+ });
57
+ reportCurrency =
58
+ profitAndLossClassesViewState.currency ?? FALLBACK_REPORT_CURRENCY;
59
+ // Pivot each section from class→account to account→class
60
+ HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
61
+ const sectionReport = sectionReports[sectionId];
62
+ if (sectionReport != null) {
63
+ sections[sectionId] = pivotSectionToHorizontal(sectionReport, classColumns, SECTION_TITLES[sectionId] ?? sectionId, reportCurrency);
64
+ }
65
+ });
66
+ // Calculate derived sections
67
+ const incomeSection = sections['income'];
68
+ const cogsSection = sections['cogs'];
69
+ const expensesSection = sections['expenses'];
70
+ const otherIncomeSection = sections['otherIncome'];
71
+ const otherExpensesSection = sections['otherExpenses'];
72
+ // Gross Profit = Income - COGS
73
+ if (incomeSection != null && cogsSection != null) {
74
+ calculatedSections['grossProfit'] = computeCalculatedSection(incomeSection.classTotals, cogsSection.classTotals, incomeSection.sectionTotal, cogsSection.sectionTotal, 'subtract', SECTION_TITLES['grossProfit']);
75
+ }
76
+ // EBIT = Gross Profit - Expenses
77
+ const grossProfit = calculatedSections['grossProfit'];
78
+ if (grossProfit != null && expensesSection != null) {
79
+ calculatedSections['earningsBeforeInterestAndTax'] =
80
+ computeCalculatedSection(grossProfit.classTotals, expensesSection.classTotals, grossProfit.sectionTotal, expensesSection.sectionTotal, 'subtract', SECTION_TITLES['earningsBeforeInterestAndTax']);
81
+ }
82
+ // Net Other Income = Other Income - Other Expenses
83
+ if (otherIncomeSection != null && otherExpensesSection != null) {
84
+ calculatedSections['netOtherIncome'] = computeCalculatedSection(otherIncomeSection.classTotals, otherExpensesSection.classTotals, otherIncomeSection.sectionTotal, otherExpensesSection.sectionTotal, 'subtract', SECTION_TITLES['netOtherIncome']);
85
+ }
86
+ // Net Income = EBIT + Net Other Income
87
+ const ebit = calculatedSections['earningsBeforeInterestAndTax'];
88
+ const netOtherIncome = calculatedSections['netOtherIncome'];
89
+ if (ebit != null && netOtherIncome != null) {
90
+ calculatedSections['netIncome'] = computeCalculatedSection(ebit.classTotals, netOtherIncome.classTotals, ebit.sectionTotal, netOtherIncome.sectionTotal, 'add', SECTION_TITLES['netIncome']);
91
+ }
92
+ }
93
+ // Build synthetic header COABalances for rendering class names as column headers
94
+ const headerBalances = buildHeaderBalances(classColumns, filter.timeframe, selectedPeriod, reportCurrency);
95
+ return {
96
+ reportId,
97
+ reportTitle: 'Profit and Loss by Class',
98
+ firstMonthOfFY: profitAndLossClassesViewState.firstMonthOfFY,
99
+ fetchState: fetchState.fetchState,
100
+ bookCloseDate: profitAndLossClassesViewState.bookCloseDate,
101
+ dataAvailable: profitAndLossClassesViewState.dataAvailable,
102
+ selectedPeriod,
103
+ classColumns,
104
+ sections,
105
+ calculatedSections,
106
+ idsInOrder: profitAndLossHorizontalIdsInOrder,
107
+ uiState: profitAndLossClassesViewState.uiState,
108
+ headerBalances,
109
+ };
110
+ };
111
+ /**
112
+ * Build column definitions from class hierarchy (top-level classes only).
113
+ */
114
+ function buildClassColumns(classHierarchy, classesToFilterOut) {
115
+ const filteredIds = new Set(classesToFilterOut.map((id) => id[0]));
116
+ return classHierarchy
117
+ .filter((c) => !filteredIds.has(c.classId[0]))
118
+ .map((c) => ({
119
+ classId: c.classId[0],
120
+ className: c.className,
121
+ nestedClassId: c.classId,
122
+ qboId: c.qboId,
123
+ }));
124
+ }
125
+ /**
126
+ * Pivot a section from class→account→balances to account→class→balance (single period).
127
+ */
128
+ function pivotSectionToHorizontal(section, classColumns, title, currency) {
129
+ // Map: accountId -> { accountName, classId -> balance }
130
+ const accountMap = new Map();
131
+ // Also track class totals
132
+ const classTotalMap = new Map();
133
+ classColumns.forEach((col) => classTotalMap.set(col.classId, 0));
134
+ // Iterate over each class in the section
135
+ section.classes.forEach((classReport) => {
136
+ const classId = classReport.id[0];
137
+ // Only process classes that are in our columns
138
+ if (!classTotalMap.has(classId)) {
139
+ return;
140
+ }
141
+ // Sum all sliced period balances (same slice as vertical columns; multi-period = range total)
142
+ const classBalance = sumBalancesInSlice(classReport.childrenBalancesTotal.balances);
143
+ classTotalMap.set(classId, classBalance);
144
+ // Iterate through accounts in this class
145
+ collectAccountsFromClass(classReport, classId, accountMap);
146
+ });
147
+ // Build account rows
148
+ const accounts = [];
149
+ accountMap.forEach((accountData, accountId) => {
150
+ const classBalances = classColumns.map((col) => ({
151
+ classId: col.classId,
152
+ balance: toAmountWC(accountData.classBalances.get(col.classId) ?? 0, currency),
153
+ }));
154
+ const rowTotal = classBalances.reduce((sum, cb) => sum + cb.balance.amount, 0);
155
+ accounts.push({
156
+ accountId,
157
+ accountName: accountData.accountName,
158
+ classBalances,
159
+ rowTotal: toAmountWC(rowTotal, currency),
160
+ });
161
+ });
162
+ // Build class totals
163
+ const classTotals = classColumns.map((col) => ({
164
+ classId: col.classId,
165
+ balance: toAmountWC(classTotalMap.get(col.classId) ?? 0, currency),
166
+ }));
167
+ const sectionTotal = classTotals.reduce((sum, ct) => sum + ct.balance.amount, 0);
168
+ return {
169
+ title,
170
+ accounts,
171
+ classTotals,
172
+ sectionTotal: toAmountWC(sectionTotal, currency),
173
+ };
174
+ }
175
+ /**
176
+ * Recursively collect account balances from a NestedClassReportV2 into accountMap.
177
+ */
178
+ function collectAccountsFromClass(classReport, classId, accountMap) {
179
+ // Process accounts directly on this class
180
+ classReport.class.accounts.forEach((nestedAccount) => {
181
+ collectAccountsFromNestedAccount(nestedAccount, classId, accountMap);
182
+ });
183
+ }
184
+ /**
185
+ * Recursively collect accounts from NestedAccountReport (handles sub-accounts).
186
+ */
187
+ function collectAccountsFromNestedAccount(nestedAccount, classId, accountMap) {
188
+ const accountId = nestedAccount.account.accountId;
189
+ const accountName = nestedAccount.account.accountName;
190
+ const balance = sumBalancesInSlice(nestedAccount.account.balancesInTimeframe.balances);
191
+ if (!accountMap.has(accountId)) {
192
+ accountMap.set(accountId, {
193
+ accountName,
194
+ classBalances: new Map(),
195
+ });
196
+ }
197
+ const accountData = accountMap.get(accountId);
198
+ if (accountData == null) {
199
+ return;
200
+ }
201
+ const existing = accountData.classBalances.get(classId) ?? 0;
202
+ accountData.classBalances.set(classId, existing + balance);
203
+ // Process sub-accounts
204
+ nestedAccount.children.forEach((child) => {
205
+ collectAccountsFromNestedAccount(child, classId, accountMap);
206
+ });
207
+ }
208
+ /**
209
+ * Total amount for the current report slice. `balances` is already narrowed by
210
+ * `getCOABalances` / `sliceCOABalances` to the selected range; summing matches
211
+ * multi-period selections and avoids mismatches when `thisPeriod` does not
212
+ * align with a row (e.g. slice fallback) or when several period rows are shown.
213
+ */
214
+ function sumBalancesInSlice(balances) {
215
+ let sum = 0;
216
+ for (const bal of balances) {
217
+ sum += bal.balance?.amount ?? 0;
218
+ }
219
+ return sum;
220
+ }
221
+ /**
222
+ * Compute a calculated section by adding or subtracting two sets of class totals.
223
+ */
224
+ function computeCalculatedSection(aTotals, bTotals, aTotal, bTotal, operation, title) {
225
+ const currency = {
226
+ currencyCode: aTotal.currencyCode,
227
+ currencySymbol: aTotal.currencySymbol,
228
+ };
229
+ const bTotalsMap = new Map(bTotals.map((b) => [b.classId, b.balance.amount]));
230
+ const classTotals = aTotals.map((a) => {
231
+ const bAmount = bTotalsMap.get(a.classId) ?? 0;
232
+ const resultAmount = operation === 'add'
233
+ ? a.balance.amount + bAmount
234
+ : a.balance.amount - bAmount;
235
+ return {
236
+ classId: a.classId,
237
+ balance: toAmountWC(resultAmount, currency),
238
+ };
239
+ });
240
+ const sectionTotalAmount = operation === 'add'
241
+ ? aTotal.amount + bTotal.amount
242
+ : aTotal.amount - bTotal.amount;
243
+ return {
244
+ title,
245
+ classTotals,
246
+ sectionTotal: toAmountWC(sectionTotalAmount, currency),
247
+ };
248
+ }
249
+ /**
250
+ * Build synthetic COABalance array for header rendering.
251
+ * One entry per class column + one for "Total".
252
+ */
253
+ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency) {
254
+ if (selectedPeriod == null) {
255
+ return [];
256
+ }
257
+ const { endDate, startDate } = selectedPeriod;
258
+ const balances = classColumns.map((col) => ({
259
+ balance: toAmountWC(0, currency),
260
+ balanceTimeFrame: timeframe,
261
+ endDate,
262
+ startDate,
263
+ type: 'default',
264
+ label: col.className,
265
+ }));
266
+ // Add a "Total" column
267
+ balances.push({
268
+ balance: toAmountWC(0, currency),
269
+ balanceTimeFrame: timeframe,
270
+ endDate,
271
+ startDate,
272
+ type: 'default',
273
+ label: 'Total',
274
+ });
275
+ return balances;
276
+ }
@@ -23,6 +23,7 @@ export const initialState = {
23
23
  nodeCollapseState: {},
24
24
  scrollPosition: undefined,
25
25
  accountViewMode: 'account_group',
26
+ classViewLayout: 'vertical',
26
27
  classesToFilterOut: [],
27
28
  },
28
29
  firstMonthOfFY: 1,
@@ -94,6 +95,9 @@ const profitAndLossClassesView = createSlice({
94
95
  updateAccountViewMode(draft, action) {
95
96
  draft.uiState.accountViewMode = action.payload.viewMode;
96
97
  },
98
+ updateClassViewLayout(draft, action) {
99
+ draft.uiState.classViewLayout = action.payload.classViewLayout;
100
+ },
97
101
  resetProfitAndLossClassesNodeCollapseState(draft) {
98
102
  draft.uiState.nodeCollapseState = {};
99
103
  },
@@ -102,10 +106,11 @@ const profitAndLossClassesView = createSlice({
102
106
  },
103
107
  },
104
108
  });
105
- export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
109
+ export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, updateClassViewLayout, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
106
110
  export default profitAndLossClassesView.reducer;
107
111
  const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
108
112
  const report = mapReportPayloadV2ToReportV2(pandLReport.report);
113
+ draft.currency = report.currency;
109
114
  draft.dataAvailable = report.dataAvailable;
110
115
  draft.firstMonthOfFY = report.firstMonthOfFY;
111
116
  draft.bookCloseDate = report.bookCloseDate;
@@ -1,6 +1,7 @@
1
1
  import { getDifferenceOfBalancesGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getDifferenceOfBalancesGroupedByPeriod';
2
2
  import { getSumOfBalancesByGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod';
3
3
  import { getCOABalances } from '../../commonStateTypes/coaBalance/coaBalance';
4
+ import { reduceFetchStateParallelTimeframes } from '../../commonStateTypes/reduceFetchState';
4
5
  import { getSectionClassesViewReport } from '../../entity/sectionClassesViewV2/sectionClassesViewSelector';
5
6
  import { ALL_PANDL_REPORT_VIEW_SECTION_IDS, } from './profitAndLossClassesViewSelectorTypes';
6
7
  export const profitAndLossIdsInOrder = [
@@ -15,7 +16,7 @@ export const profitAndLossIdsInOrder = [
15
16
  'netIncome',
16
17
  ];
17
18
  export const getProfitAndLossClassesView = (filter, accountState, classState, sectionsState, profitAndLossClassesViewState) => {
18
- const fetchState = reduceFetchState([
19
+ const fetchState = reduceFetchStateParallelTimeframes([
19
20
  profitAndLossClassesViewState.fetchState.month,
20
21
  profitAndLossClassesViewState.fetchState.quarter,
21
22
  profitAndLossClassesViewState.fetchState.year,
@@ -64,31 +65,3 @@ export const getProfitAndLossClassesView = (filter, accountState, classState, se
64
65
  idsInOrder: profitAndLossIdsInOrder,
65
66
  };
66
67
  };
67
- function reduceFetchState(fetchStateList) {
68
- const isAnyProgress = fetchStateList.reduce((prevValue, currentValue) => {
69
- return prevValue === true || currentValue.fetchState === 'In-Progress';
70
- }, false);
71
- const isAllCompleted = fetchStateList.reduce((prevValue, currentValue) => {
72
- return prevValue === true && currentValue.fetchState === 'Completed';
73
- }, true);
74
- const isAnyError = fetchStateList.reduce((prevValue, currentValue) => {
75
- return prevValue === true || currentValue.fetchState === 'Error';
76
- }, false);
77
- const error = fetchStateList.reduce((prevValue, currentValue) => {
78
- return prevValue ?? currentValue.error;
79
- }, undefined);
80
- let fetchState = 'Not-Started';
81
- if (isAnyProgress) {
82
- fetchState = 'In-Progress';
83
- }
84
- else if (isAllCompleted) {
85
- fetchState = 'Completed';
86
- }
87
- else if (isAnyError) {
88
- fetchState = 'Error';
89
- }
90
- return {
91
- fetchState,
92
- error,
93
- };
94
- }
@@ -24,11 +24,13 @@ export const fetchProfitAndLossForTimeframeClassesViewEpic = (actions$, _, zeniA
24
24
  .pipe(mergeMap((response) => {
25
25
  if (response.data != null && isSuccessResponse(response)) {
26
26
  const actions = [];
27
- actions.push(updateSectionClassesView(action.payload.timeframe, 'cogs', 'profit_and_loss_by_classes', response.data.report.cogs, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
28
- actions.push(updateSectionClassesView(action.payload.timeframe, 'expenses', 'profit_and_loss_by_classes', response.data.report.expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
29
- actions.push(updateSectionClassesView(action.payload.timeframe, 'income', 'profit_and_loss_by_classes', response.data.report.income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
30
- actions.push(updateSectionClassesView(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', response.data.report.other_expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
31
- actions.push(updateSectionClassesView(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', response.data.report.other_income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
27
+ const report = response.data.report;
28
+ const currency = report.currency;
29
+ actions.push(updateSectionClassesView(action.payload.timeframe, 'cogs', 'profit_and_loss_by_classes', report.cogs, report.classes, report.accounts, currency));
30
+ actions.push(updateSectionClassesView(action.payload.timeframe, 'expenses', 'profit_and_loss_by_classes', report.expenses, report.classes, report.accounts, currency));
31
+ actions.push(updateSectionClassesView(action.payload.timeframe, 'income', 'profit_and_loss_by_classes', report.income, report.classes, report.accounts, currency));
32
+ actions.push(updateSectionClassesView(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', report.other_expenses, report.classes, report.accounts, currency));
33
+ actions.push(updateSectionClassesView(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', report.other_income, report.classes, report.accounts, currency));
32
34
  actions.push(updateProfitAndLossForTimeframeClassesView({
33
35
  timeframe: action.payload.timeframe,
34
36
  report: response.data,
@@ -1,9 +1,8 @@
1
1
  import { from, of } from 'rxjs';
2
2
  import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { getJEScheduleTransactionDetailKeyPayload, } from '../../../../entity/jeSchedules/jeSchedulesPayload';
3
4
  import { updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
4
- import { toTransactionType } from '../../../../entity/transaction/stateTypes/transactionType';
5
5
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
6
- import { getZeniTransactionDetailKey } from '../../../transactionDetail/transactionDetailState';
7
6
  import { createNewSchedules, fetchScheduleDetails, initializeScheduleDetailLocalData, saveScheduleDetailsSuccessOrFailure, updateScheduleDetailsFailure, updateScheduleDetailsSuccess, updateSelectedJEScheduleKey, } from '../scheduleDetailReducer';
8
7
  export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchScheduleDetails.match), mergeMap((action) => {
9
8
  const updateActions = [];
@@ -24,11 +23,7 @@ export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.
24
23
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/${selectedJeScheduleDetailId}?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
25
24
  .pipe(mergeMap((response) => {
26
25
  if (isSuccessResponse(response) && response.data != null) {
27
- const transactionData = response.data.je_schedules[0].base_transaction;
28
- const selectedJEScheduleKey = getZeniTransactionDetailKey({
29
- id: transactionData.transaction_id,
30
- type: toTransactionType(transactionData.transaction_type),
31
- });
26
+ const selectedJEScheduleKey = getJEScheduleTransactionDetailKeyPayload(response.data.je_schedules[0].base_transaction);
32
27
  updateActions.push(updateJESchedules(response.data.je_schedules), updateSelectedJEScheduleKey({ selectedJEScheduleKey }), updateJESchedulesDetails(response.data.je_schedules, response.data.scheduled_journal_entries), saveScheduleDetailsSuccessOrFailure('Not-Started'), initializeScheduleDetailLocalData(scheduleType, selectedJEScheduleKey, selectedJeScheduleDetailId), updateScheduleDetailsSuccess());
33
28
  if (response.data.je_schedules[0].status.code === 'draft' &&
34
29
  isCompleteJEScheduleFormDataPresent(response.data.je_schedules[0])) {
@@ -1,7 +1,5 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { getJEScheduleKey, } from '../../../entity/jeSchedules/jeSchedulesPayload';
3
- import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
4
- import { getZeniTransactionDetailKey } from '../../transactionDetail/transactionDetailState';
2
+ import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
3
  import { getDefaultSelectedTimeframeForScheduleType } from './scheduleListHelper';
6
4
  import { getScheduleListKey, } from './scheduleListTypes';
7
5
  export const initialUIState = {
@@ -379,10 +377,7 @@ export default scheduleListView.reducer;
379
377
  function doUpdateScheduleList(draft, payload, scheduleType, selectedTimeframe, selectedCategoryId) {
380
378
  if (scheduleType !== 'accrued_expenses') {
381
379
  const state = getState(draft, scheduleType);
382
- const jeScheduleTransactionKeys = payload.map((schedules) => {
383
- const transactionID = toTransactionID(schedules.base_transaction);
384
- return getZeniTransactionDetailKey(transactionID);
385
- });
380
+ const jeScheduleTransactionKeys = payload.map((schedules) => getJEScheduleTransactionDetailKeyPayload(schedules.base_transaction));
386
381
  state.selectedCategoryId = selectedCategoryId;
387
382
  state.selectedTimeframe = selectedTimeframe;
388
383
  const key = getScheduleListKey(selectedCategoryId, selectedTimeframe);
package/lib/index.d.ts CHANGED
@@ -24,7 +24,7 @@ import { getFYMonths } from './commonStateTypes/fiscalYearHelpers/getFYMonths';
24
24
  import { getFYQuarterAndYear, getLastMonthOfFYQuarter, getLastMonthOfFYYear } from './commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear';
25
25
  import { getStartOfAndEndOfTimeframeForFY } from './commonStateTypes/fiscalYearHelpers/getStartOfAndEndOfTimeframeFY';
26
26
  import { COTLineItemTracking, COTRecommendationTracking, COTTransactionTracking, COTTransactionTrackingByTransactionId, Recommendation, RecommendationWithCOT, TransactionLineRecommendationFieldTypes } from './commonStateTypes/recommendationBase';
27
- import { isAllFetchCompleted, isAnyFetchInProgress, reduceAllFetchState, reduceAnyCompletedFetchState, reduceAnyFetchState, reduceFetchState } from './commonStateTypes/reduceFetchState';
27
+ import { isAllFetchCompleted, isAnyFetchInProgress, reduceAllFetchState, reduceAnyCompletedFetchState, reduceAnyFetchState, reduceFetchState, reduceFetchStateParallelTimeframes } from './commonStateTypes/reduceFetchState';
28
28
  import { toReimbursementTypeCode } from './commonStateTypes/reimbursementTypeCode';
29
29
  import { ClassesViewSelectorReportV2 } from './commonStateTypes/selectorTypes/classesViewSelectorReport';
30
30
  import { COABalancesSliceOrder, CalculatedSection, EntityOrder, Section, SectionWithAccountOnly, TransactionsOrder } from './commonStateTypes/selectorTypes/selectorTypes';
@@ -91,7 +91,7 @@ import { TrendChangeType } from './entity/insights/insightPayload';
91
91
  import { Insight } from './entity/insights/insightState';
92
92
  import { InsightSummary } from './entity/insights/insightSummary';
93
93
  import { JEAccruedSchedule, JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
94
- import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
94
+ import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTransactionID, ScheduleTypes, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
95
95
  import { Merchant } from './entity/merchant/merchant';
96
96
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthCloseCheckMetrics, MonthEndAuditSummary, MonthEndCloseCheck, MonthEndCloseCheckFrequency } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
97
97
  import { updateCommentsNotifications, updateCommentsNotificationsStatuses } from './entity/notification/notificationReducer';
@@ -346,10 +346,12 @@ import { PeopleViewSortKey } from './view/people/peopleTypes';
346
346
  import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState } from './view/profitAndLoss/profitAndLossReducer';
347
347
  import { ProfitAndLossReport, getPandLReportFetchState, getProfitAndLossReport } from './view/profitAndLoss/profitAndLossSelector';
348
348
  import { ProfitAndLossState, ProfitAndLossUIState } from './view/profitAndLoss/profitAndLossState';
349
- import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
349
+ import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateClassViewLayout, updateProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
350
+ import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
351
+ import { ClassColumnDefinition, HorizontalAccountRow, HorizontalCalculatedSection, HorizontalClassBalance, HorizontalSectionReport, ProfitAndLossByClassHorizontalReport } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
350
352
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
351
353
  import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID, ProfitAndLossClassesViewReport, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
352
- import { ProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
354
+ import { ClassViewLayout, ProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
353
355
  import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
354
356
  import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
355
357
  import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
@@ -664,7 +666,7 @@ export { fetchDashboard, getDashboard, DashboardReport, updateTreasuryVideoClose
664
666
  export { updateDashboardLayout };
665
667
  export { PandLWithForecastView, getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
666
668
  export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, ProfitAndLossState, ProfitAndLossUIState, getProfitAndLossReport, ProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
667
- export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
669
+ export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, getProfitAndLossClassesHorizontalView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, ClassViewLayout, ProfitAndLossByClassHorizontalReport, ClassColumnDefinition, HorizontalAccountRow, HorizontalClassBalance, HorizontalSectionReport, HorizontalCalculatedSection, };
668
670
  export { AccountingProviderAttachmentSelector, getAccountingProviderAttachment };
669
671
  export { fetchUserListByType, getUserList, UserListSelectorView };
670
672
  export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, PeopleSelectorView, PeopleLocalDataView, Person, getPeople, getPeopleLocalData, PeopleState, PersonUpdateType, PeoplePageMode, ZeniPersonUserRoleType, PeopleUIState, PeopleLocalData, initializeEditPerson, };
@@ -780,7 +782,7 @@ export { RemiDetailLocalData, AutoFields, OutofPocketReimbursementLineWithRecomm
780
782
  export { Merchant };
781
783
  export { fetchEditRemiDetailPage, fetchRecommendationsAndUpdateMerchantRecommendations, fetchRemiAndInitializeLocalStore, initializeRemiToLocalStore, saveRemiUpdatesToLocalStore, fetchCurrencyConversionValue, discardRemiUpdatesInLocalStore, removeFileFromRemiUpdatesInLocalStore, saveRemiDetail, saveRemiSuccessOrFailure, parseReceiptsToRemi, clearEditRemiViewDetail, updateAddRemiAutoFields, updateUploadFetchState, updateTentativeMerchantNames, clearTentativeMerchantName, updateReimbursementType, updateHomeCurrencyConversion, clearAddRemiAutoFields, };
782
784
  export { AnimationFileName };
783
- export { reduceFetchState, reduceAnyFetchState, reduceAllFetchState, reduceAnyCompletedFetchState, isAnyFetchInProgress, isAllFetchCompleted, SortOrder, ALL_FILE_TYPES, FileType, toFileTypeStrict, };
785
+ export { reduceFetchState, reduceFetchStateParallelTimeframes, reduceAnyFetchState, reduceAllFetchState, reduceAnyCompletedFetchState, isAnyFetchInProgress, isAllFetchCompleted, SortOrder, ALL_FILE_TYPES, FileType, toFileTypeStrict, };
784
786
  export { getNextNthWorkingDay, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
785
787
  export { CustomerRatingCodeType, TeamRatingCodeType };
786
788
  export { CustomerSatisfactionInfo };
@@ -828,7 +830,7 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
828
830
  export { LinkBillExpenseKey };
829
831
  export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
830
832
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
831
- export { JEScheduleKey, JEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
833
+ export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
832
834
  export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
833
835
  export { ReviewStatus, VendorTransactionAttachment, VendorTransactionAttachmentPayload, VendorFirstReviewViewSelectorView, VendorFirstReviewViewLocalData, VendorFirstReviewSelectorView, VendorFirstReviewSelectorAttachmentView, VendorFirstReviewViewUIState, VendorFirstReviewViewColumnKey, GlobalMerchantAutoCompleteView, VendorReviewRowCurrentSelection, toVendorFirstReviewViewColumnKeyType, RecommendedNonExistingGlobalMerchant, getGlobalMerchantAutoCompleteResults, VendorReviewRecommendationViewState, GlobalMerchantType, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, GlobalVendorReviewRowCurrentSelection, FirstReviewPageCurrentSelectionByColumn, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, FirstReviewVendorDetailSelectorView, VendorViewLocalData, };
834
836
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, GlobalMerchantViewSelectorView, GlobalMerchantViewState, NewGlobalMerchantData, NewGlobalMerchantCurrentSelection, };