@zeniai/client-epic-state 4.20.3-betaNB3 → 4.20.3-betaNB4

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 (82) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  3. package/lib/entity/account/accountPayload.d.ts +2 -0
  4. package/lib/entity/account/accountReducer.d.ts +5 -2
  5. package/lib/entity/account/accountReducer.js +7 -2
  6. package/lib/entity/account/accountState.d.ts +1 -1
  7. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  8. package/lib/entity/class/classReducer.d.ts +4 -4
  9. package/lib/entity/class/classState.d.ts +1 -1
  10. package/lib/entity/forecast/forecastState.d.ts +1 -1
  11. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  12. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  13. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  14. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  15. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  16. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  17. package/lib/entity/tenant/tenantReducer.js +8 -2
  18. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +6 -0
  19. package/lib/entity/transaction/payloadTypes/transactionPayload.js +62 -0
  20. package/lib/entity/transaction/stateTypes/transaction.d.ts +6 -0
  21. package/lib/epic.d.ts +10 -7
  22. package/lib/epic.js +10 -7
  23. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  24. package/lib/esm/entity/account/accountReducer.js +6 -1
  25. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  26. package/lib/esm/entity/tenant/tenantReducer.js +7 -1
  27. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +62 -0
  28. package/lib/esm/epic.js +10 -7
  29. package/lib/esm/index.js +6 -6
  30. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  31. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  32. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  33. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +44 -0
  34. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  35. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +44 -0
  36. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -1
  37. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  38. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  39. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +114 -0
  40. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +10 -6
  41. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -0
  42. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +4 -2
  43. package/lib/index.d.ts +6 -6
  44. package/lib/index.js +38 -32
  45. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  46. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  47. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  48. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  49. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  50. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  51. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  52. package/lib/view/companyView/companyViewReducer.js +28 -2
  53. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  54. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  55. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  56. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  57. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  58. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +8 -0
  59. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +48 -0
  60. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  61. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +9 -0
  62. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +48 -0
  63. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  64. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  65. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -1
  66. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  67. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  68. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  69. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  70. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +114 -0
  71. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +9 -5
  72. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +3 -0
  73. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
  74. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  75. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  76. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  77. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +4 -2
  78. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  79. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  80. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  81. package/lib/view/topEx/topExSelector.d.ts +1 -1
  82. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
4
+ exports.updateNodeCollapseState = exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.includeAccountInReconciliationFailure = exports.includeAccountInReconciliationSuccess = exports.includeAccountInReconciliation = exports.excludeAccountFromReconciliationFailure = exports.excludeAccountFromReconciliationSuccess = exports.excludeAccountFromReconciliation = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
7
7
  const accountState_1 = require("../../../entity/account/accountState");
@@ -41,7 +41,15 @@ exports.initialReconciliationTabsState = {
41
41
  },
42
42
  };
43
43
  exports.initialActionFetchState = {
44
+ excludeAccountFetch: {
45
+ fetchState: 'Not-Started',
46
+ error: undefined,
47
+ },
44
48
  excludeFetchById: {},
49
+ includeAccountFetch: {
50
+ fetchState: 'Not-Started',
51
+ error: undefined,
52
+ },
45
53
  reconcileFetch: {
46
54
  fetchState: 'Not-Started',
47
55
  error: undefined,
@@ -55,6 +63,7 @@ exports.initialActionFetchState = {
55
63
  exports.initialState = {
56
64
  accountReconciliationRecordsBySelectedPeriod: {},
57
65
  accountConnectionStatusByAccountID: {},
66
+ excludedAccountExclusionInfo: {},
58
67
  fetchState: 'Not-Started',
59
68
  error: undefined,
60
69
  selectedTab: 'review',
@@ -64,10 +73,12 @@ exports.initialState = {
64
73
  selectedAccountId: undefined,
65
74
  statementUploadChosen: false,
66
75
  reconListUIState: {
76
+ nodeCollapseState: {},
67
77
  scrollPosition: {
68
78
  scrollTop: 0,
69
79
  },
70
80
  },
81
+ excludedAccountIDs: [],
71
82
  };
72
83
  // Create slice with reducers
73
84
  const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
@@ -136,7 +147,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
136
147
  fetchReconciliationSuccess: {
137
148
  reducer(draft, action) {
138
149
  if (action.payload.accountId == null) {
139
- updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
150
+ updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? []);
140
151
  }
141
152
  else if (action.payload.reconciliation.reconciliation.length > 0 &&
142
153
  action.payload.reconciliation.accounts.length > 0) {
@@ -348,6 +359,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
348
359
  updateReconListScrollPosition: (draft, action) => {
349
360
  draft.reconListUIState.scrollPosition = action.payload.scrollPosition;
350
361
  },
362
+ updateNodeCollapseState: (draft, action) => {
363
+ draft.reconListUIState.nodeCollapseState[action.payload.nodeId] =
364
+ action.payload.collapsed;
365
+ },
351
366
  setConnectionInProgressForAccount: (draft, action) => {
352
367
  if (draft.accountConnectionStatusByAccountID[action.payload.accountId] ==
353
368
  null) {
@@ -425,6 +440,85 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
425
440
  ...localData,
426
441
  };
427
442
  },
443
+ excludeAccountFromReconciliation: {
444
+ reducer(draft) {
445
+ draft.actionFetchState.excludeAccountFetch = {
446
+ fetchState: 'In-Progress',
447
+ error: undefined,
448
+ };
449
+ },
450
+ prepare(payload) {
451
+ return { payload };
452
+ },
453
+ },
454
+ excludeAccountFromReconciliationSuccess: (draft, action) => {
455
+ draft.actionFetchState.excludeAccountFetch = {
456
+ fetchState: 'Completed',
457
+ error: undefined,
458
+ };
459
+ const { account, selectedPeriod } = action.payload;
460
+ if (account != null) {
461
+ if (!draft.excludedAccountIDs.includes(account.account_id)) {
462
+ draft.excludedAccountIDs.push(account.account_id);
463
+ }
464
+ updateExcludedAccountExclusionInfo(draft, account);
465
+ const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
466
+ if (draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId]
467
+ ?.accountIDs != null) {
468
+ draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
469
+ }
470
+ }
471
+ },
472
+ excludeAccountFromReconciliationFailure: (draft, action) => {
473
+ draft.actionFetchState.excludeAccountFetch = {
474
+ fetchState: 'Error',
475
+ error: action.payload.error,
476
+ };
477
+ },
478
+ includeAccountInReconciliation: {
479
+ reducer(draft) {
480
+ draft.actionFetchState.includeAccountFetch = {
481
+ fetchState: 'In-Progress',
482
+ error: undefined,
483
+ };
484
+ },
485
+ prepare(payload) {
486
+ return { payload };
487
+ },
488
+ },
489
+ includeAccountInReconciliationSuccess: (draft, action) => {
490
+ draft.actionFetchState.includeAccountFetch = {
491
+ fetchState: 'Completed',
492
+ error: undefined,
493
+ };
494
+ const { reconciliation, selectedPeriod } = action.payload;
495
+ if (reconciliation == null) {
496
+ return;
497
+ }
498
+ const accountId = reconciliation.account_id;
499
+ draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
500
+ delete draft.excludedAccountExclusionInfo[accountId];
501
+ const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
502
+ const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
503
+ if (accountReconciliationRecords != null) {
504
+ if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
505
+ accountReconciliationRecords.accountIDs.push(accountId);
506
+ }
507
+ // put this in a function
508
+ updateReconciliationByAccountIDOnIncludeAccount(draft, accountId, reconciliation, monthYearPeriodId);
509
+ }
510
+ draft.accountConnectionStatusByAccountID[accountId] = {
511
+ status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
512
+ connectionInProgress: false,
513
+ paymentAccountId: undefined,
514
+ };
515
+ },
516
+ includeAccountInReconciliationFailure: (draft, action) => {
517
+ draft.actionFetchState.includeAccountFetch = {
518
+ fetchState: 'Error',
519
+ error: action.payload.error,
520
+ };
521
+ },
428
522
  updateStatementUploadChosen: (draft, action) => {
429
523
  draft.statementUploadChosen = action.payload.statementUploadChosen;
430
524
  },
@@ -434,10 +528,38 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
434
528
  },
435
529
  });
436
530
  // Export actions
437
- _a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen;
531
+ _a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.excludeAccountFromReconciliation = _a.excludeAccountFromReconciliation, exports.excludeAccountFromReconciliationSuccess = _a.excludeAccountFromReconciliationSuccess, exports.excludeAccountFromReconciliationFailure = _a.excludeAccountFromReconciliationFailure, exports.includeAccountInReconciliation = _a.includeAccountInReconciliation, exports.includeAccountInReconciliationSuccess = _a.includeAccountInReconciliationSuccess, exports.includeAccountInReconciliationFailure = _a.includeAccountInReconciliationFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen, exports.updateNodeCollapseState = _a.updateNodeCollapseState;
438
532
  // Export reducer
439
533
  exports.default = expenseAutomationReconciliationView.reducer;
440
- function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
534
+ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground, excludedAccounts) {
535
+ draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
536
+ draft.excludedAccountExclusionInfo = {};
537
+ excludedAccounts.forEach((ea) => {
538
+ const { exclusion_info } = ea;
539
+ draft.excludedAccountExclusionInfo[ea.account_id] = {
540
+ bankBalance: exclusion_info.bank_balance != null
541
+ ? {
542
+ amount: exclusion_info.bank_balance,
543
+ currencyCode: ea.currency_code ?? 'USD',
544
+ currencySymbol: ea.currency_symbol ?? '$',
545
+ }
546
+ : undefined,
547
+ clearedBalance: exclusion_info.cleared_balance != null
548
+ ? {
549
+ amount: exclusion_info.cleared_balance,
550
+ currencyCode: ea.currency_code ?? 'USD',
551
+ currencySymbol: ea.currency_symbol ?? '$',
552
+ }
553
+ : undefined,
554
+ variance: exclusion_info.variance != null
555
+ ? {
556
+ amount: exclusion_info.variance,
557
+ currencyCode: ea.currency_code ?? 'USD',
558
+ currencySymbol: ea.currency_symbol ?? '$',
559
+ }
560
+ : undefined,
561
+ };
562
+ });
441
563
  draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
442
564
  accountIDs: [],
443
565
  reconciliationByAccountID: {},
@@ -475,6 +597,9 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
475
597
  ? (0, accountState_1.toReconciliationAccountSource)(account.reconciliation_source)
476
598
  : undefined,
477
599
  },
600
+ accountDetectionReason: account?.detection_info != null && account.detection_reason != null
601
+ ? account.detection_reason
602
+ : undefined,
478
603
  };
479
604
  accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
480
605
  });
@@ -520,3 +645,42 @@ function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accoun
520
645
  };
521
646
  }
522
647
  }
648
+ const updateExcludedAccountExclusionInfo = (draft, account) => {
649
+ draft.excludedAccountExclusionInfo[account.account_id] = {
650
+ bankBalance: account.bank_balance != null
651
+ ? {
652
+ amount: account.bank_balance,
653
+ currencyCode: account.currency_code ?? 'USD',
654
+ currencySymbol: account.currency_symbol ?? '$',
655
+ }
656
+ : undefined,
657
+ clearedBalance: account.cleared_balance != null
658
+ ? {
659
+ amount: account.cleared_balance,
660
+ currencyCode: account.currency_code ?? 'USD',
661
+ currencySymbol: account.currency_symbol ?? '$',
662
+ }
663
+ : undefined,
664
+ variance: account.variance != null
665
+ ? {
666
+ amount: account.variance,
667
+ currencyCode: account.currency_code ?? 'USD',
668
+ currencySymbol: account.currency_symbol ?? '$',
669
+ }
670
+ : undefined,
671
+ };
672
+ };
673
+ const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, reconciliation, monthYearPeriodId) => {
674
+ draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].reconciliationByAccountID[accountId] = {
675
+ accountId,
676
+ reconciliationId: reconciliation.reconciliation_id ?? undefined,
677
+ transactionFetchState: { fetchState: 'Not-Started', error: undefined },
678
+ refreshStatus: { fetchState: 'Not-Started', error: undefined },
679
+ statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
680
+ statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
681
+ statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
682
+ statementParseInProgress: reconciliation.bank_status.code === 'parsing',
683
+ localData: {},
684
+ accountDetectionReason: undefined,
685
+ };
686
+ };
@@ -11,7 +11,7 @@ import { Vendor } from '../../../entity/vendor/vendorState';
11
11
  import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
12
12
  import { AccountReconciliationLocalData, ActionFetchStates, ReconListUIState, ReconciliationTabsState, ReconciliationViewTabType } from '../types/reconciliationViewState';
13
13
  export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
14
- declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
14
+ export declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
15
15
  export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
16
16
  export interface ExpenseAutomationReconciliationViewSelector {
17
17
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
@@ -24,7 +24,12 @@ export interface ExpenseAutomationReconciliationViewSelector {
24
24
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
25
25
  completionStatus: CompletionStatusType;
26
26
  creditCards: AccountBase[];
27
+ excludeAccountFetchState: FetchStateAndError;
28
+ excludedAccountIDs: ID[];
29
+ excludedAccountReconciliationByAccountID: Record<ID, AccountReconciliationByAccount>;
30
+ excludedAccountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
27
31
  fetchStatus: FetchStateAndError;
32
+ includeAccountFetchState: FetchStateAndError;
28
33
  monthYearPeriod: MonthYearPeriod;
29
34
  plaidConnectionDetails: PlaidConnectionDetails;
30
35
  reconciliationTabsState: ReconciliationTabsState;
@@ -57,6 +62,6 @@ export interface AccountReconciliationByAccount {
57
62
  statementUpdateStatus: FetchStateAndError;
58
63
  statementUploadStatus: FetchStateAndError;
59
64
  transactionFetchState: FetchStateAndError;
65
+ accountDetectionReason?: string;
60
66
  paymentAccountId?: ID;
61
67
  }
62
- export {};
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
3
+ exports.toAccountReconSectionID = exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_ACCOUNT_RECON_SECTION_IDS = ['assets', 'liabilities'];
6
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
6
  const toAccountReconSectionID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_RECON_SECTION_IDS);
7
+ exports.toAccountReconSectionID = toAccountReconSectionID;
@@ -15,6 +15,7 @@ const accountSelector_1 = require("../../../entity/account/accountSelector");
15
15
  const accountReconSelector_1 = require("../../../entity/accountRecon/accountReconSelector");
16
16
  const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
17
17
  const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
18
+ const zeniDayJS_1 = require("../../../zeniDayJS");
18
19
  const accountListSelector_1 = require("../../accountList/accountListSelector");
19
20
  const classListSelector_1 = require("../../classList/classListSelector");
20
21
  const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
@@ -96,6 +97,30 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
96
97
  totalVariancePercentage: undefined,
97
98
  },
98
99
  },
100
+ excludedAccountReconciliationByAccountID: {},
101
+ excludedAccountReconciliationBySectionID: {
102
+ assets: {
103
+ sectionId: 'assets',
104
+ accountIDs: [],
105
+ totalBankBalance: undefined,
106
+ totalClearedBalance: undefined,
107
+ totalReconciledBalance: undefined,
108
+ totalVariance: undefined,
109
+ totalVariancePercentage: undefined,
110
+ },
111
+ liabilities: {
112
+ sectionId: 'liabilities',
113
+ accountIDs: [],
114
+ totalBankBalance: undefined,
115
+ totalClearedBalance: undefined,
116
+ totalReconciledBalance: undefined,
117
+ totalVariance: undefined,
118
+ totalVariancePercentage: undefined,
119
+ },
120
+ },
121
+ excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
122
+ includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
123
+ excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
99
124
  };
100
125
  }
101
126
  const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
@@ -233,6 +258,8 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
233
258
  .transactionFetchState,
234
259
  accountListState.byReportId.accountList,
235
260
  ]),
261
+ accountDetectionReason: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
262
+ .accountDetectionReason,
236
263
  };
237
264
  });
238
265
  const accountReconciliationBySectionID = {
@@ -255,6 +282,88 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
255
282
  totalVariancePercentage: liabilityTotals.variancePercentage,
256
283
  },
257
284
  };
285
+ const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
286
+ const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
287
+ const excludedAssetAccountIDs = [];
288
+ const excludedLiabilityAccountIDs = [];
289
+ reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
290
+ const isAsset = bankAccountIdSet.has(accountID);
291
+ const isLiability = creditCardIdSet.has(accountID);
292
+ if (!isAsset && !isLiability) {
293
+ return;
294
+ }
295
+ if (isAsset) {
296
+ excludedAssetAccountIDs.push(accountID);
297
+ }
298
+ else {
299
+ excludedLiabilityAccountIDs.push(accountID);
300
+ }
301
+ });
302
+ const excludedAccountReconciliationBySectionID = {
303
+ assets: {
304
+ sectionId: 'assets',
305
+ accountIDs: excludedAssetAccountIDs,
306
+ },
307
+ liabilities: {
308
+ sectionId: 'liabilities',
309
+ accountIDs: excludedLiabilityAccountIDs,
310
+ },
311
+ };
312
+ const excludedAccountReconciliationByAccountID = {};
313
+ const accountsInState = Object.values(accountState.accountsByKey);
314
+ const accountsInStateMap = new Map(accountsInState.map((a) => [a.accountId, a]));
315
+ reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
316
+ const account = accountsInStateMap.get(excludedAccountID);
317
+ const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
318
+ if (account != null) {
319
+ excludedAccountReconciliationByAccountID[excludedAccountID] = {
320
+ refreshStatus: { fetchState: 'Not-Started' },
321
+ statementUpdateStatus: { fetchState: 'Not-Started' },
322
+ statementUploadStatus: { fetchState: 'Not-Started' },
323
+ statementDeleteStatus: { fetchState: 'Not-Started' },
324
+ localData: {},
325
+ connectionInProgress: false,
326
+ statementParseInProgress: false,
327
+ accountConnectionStatus: 'not_connected',
328
+ transactionFetchState: { fetchState: 'Not-Started' },
329
+ accountReconEntity: {
330
+ account: {
331
+ accountId: account.accountId,
332
+ accountName: account.accountName,
333
+ accountType: account.accountType,
334
+ accountSubType: account.accountSubType,
335
+ accountDescription: account.accountDescription,
336
+ qboId: account.qboId,
337
+ coaId: account.coaId,
338
+ labels: account.labels,
339
+ },
340
+ currency: {
341
+ currencyCode: exclusionInfo?.bankBalance?.currencyCode ??
342
+ exclusionInfo?.clearedBalance?.currencyCode ??
343
+ 'USD',
344
+ currencySymbol: exclusionInfo?.bankBalance?.currencySymbol ??
345
+ exclusionInfo?.clearedBalance?.currencySymbol ??
346
+ '$',
347
+ },
348
+ startDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
349
+ endDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
350
+ statementStatus: { code: 'not_found', label: 'Not Found' },
351
+ transactionsToReconcile: [],
352
+ transactionsToReview: [],
353
+ balance: exclusionInfo?.bankBalance,
354
+ clearedBalance: exclusionInfo?.clearedBalance,
355
+ variance: exclusionInfo?.variance,
356
+ variancePercentage: exclusionInfo?.variance != null &&
357
+ exclusionInfo?.bankBalance != null &&
358
+ exclusionInfo?.bankBalance.amount !== 0
359
+ ? Math.abs((exclusionInfo.variance.amount /
360
+ exclusionInfo.bankBalance.amount) *
361
+ 100)
362
+ : undefined,
363
+ },
364
+ };
365
+ }
366
+ });
258
367
  const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
259
368
  const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
260
369
  const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
@@ -315,6 +424,11 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
315
424
  allClassList: allClasses,
316
425
  reviewTabSelectedVendorByTransactionId,
317
426
  reconListUIState: reconciliationViewState.reconListUIState,
427
+ excludedAccountReconciliationBySectionID,
428
+ excludedAccountReconciliationByAccountID,
429
+ excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
430
+ includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
431
+ excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
318
432
  };
319
433
  });
320
434
  const isAccountReconReport = (reportId) => {
@@ -50,12 +50,16 @@ function getExpenseAutomationTransactionView(state) {
50
50
  const monthEndFetchState = monthYearPeriodId != null
51
51
  ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
52
52
  : { fetchState: 'Not-Started', error: undefined };
53
+ const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
54
+ const allFetchStateList = [
55
+ accountList,
56
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
57
+ ];
58
+ if (isAccountingClassesEnabled) {
59
+ allFetchStateList.push(classList);
60
+ }
53
61
  const fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
54
- (0, reduceFetchState_1.reduceAllFetchState)([
55
- accountList,
56
- classList,
57
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
58
- ]),
62
+ (0, reduceFetchState_1.reduceAllFetchState)(allFetchStateList),
59
63
  monthEndFetchState,
60
64
  ]);
61
65
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
@@ -8,12 +8,15 @@ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSched
8
8
  import { VendorBase } from '../../../entity/vendor/vendorState';
9
9
  export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
10
10
  export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
11
+ export declare const toJEScheduleMainTab: (v: string) => "completed" | "pending_review" | "ongoing";
12
+ export type JEScheduleMainTab = ReturnType<typeof toJEScheduleMainTab>;
11
13
  export interface JESchedulesViewUIState {
12
14
  scrollPosition: {
13
15
  scrollTop: number;
14
16
  scrollLeft?: number;
15
17
  } | undefined;
16
18
  searchString: string;
19
+ selectedMainTab: JEScheduleMainTab;
17
20
  sortKey: JEScheduleSortKey;
18
21
  sortOrder: SortOrder;
19
22
  totalCount: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJEScheduleSortKey = void 0;
3
+ exports.toJEScheduleMainTab = exports.toJEScheduleSortKey = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  const JE_SCHEDULE_SORT_KEYS = [
6
6
  'vendor',
@@ -20,3 +20,10 @@ const JE_SCHEDULE_SORT_KEYS = [
20
20
  ];
21
21
  const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
22
22
  exports.toJEScheduleSortKey = toJEScheduleSortKey;
23
+ const JE_SCHEDULE_MAIN_TABS = [
24
+ 'pending_review',
25
+ 'ongoing',
26
+ 'completed',
27
+ ];
28
+ const toJEScheduleMainTab = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_MAIN_TABS);
29
+ exports.toJEScheduleMainTab = toJEScheduleMainTab;
@@ -74,13 +74,24 @@ export interface ReconciliationReviewTabLocalData {
74
74
  matchedTransactionId?: ID;
75
75
  vendor?: VendorBase;
76
76
  }
77
+ export interface ExcludeAccountFromReconciliationPayload {
78
+ accountId: ID;
79
+ }
80
+ export interface ExclusionInfo {
81
+ bankBalance: Amount | undefined;
82
+ clearedBalance: Amount | undefined;
83
+ variance: Amount | undefined;
84
+ }
77
85
  export interface ActionFetchStates {
86
+ excludeAccountFetch: FetchStateAndError;
78
87
  excludeFetchById: Record<ID, FetchStateAndError>;
88
+ includeAccountFetch: FetchStateAndError;
79
89
  reconcileFetch: FetchStateAndError;
80
90
  saveForLaterFetch: FetchStateAndError;
81
91
  saveReconciliationReviewFetch: Record<ID, FetchStateAndError>;
82
92
  }
83
93
  export interface ReconListUIState {
94
+ nodeCollapseState: Record<ID, boolean>;
84
95
  scrollPosition: {
85
96
  scrollTop: number;
86
97
  scrollLeft?: number;
@@ -90,6 +101,8 @@ export interface ReconciliationViewState extends FetchStateAndError {
90
101
  accountConnectionStatusByAccountID: Record<ID, BankConnectionStatus>;
91
102
  accountReconciliationRecordsBySelectedPeriod: Record<MonthYearPeriodId, AccountReconciliationRecords>;
92
103
  actionFetchState: ActionFetchStates;
104
+ excludedAccountExclusionInfo: Record<ID, ExclusionInfo>;
105
+ excludedAccountIDs: ID[];
93
106
  reconListUIState: ReconListUIState;
94
107
  reconTabsState: ReconciliationTabsState;
95
108
  refreshStatus: FetchStateAndError;
@@ -119,6 +132,7 @@ export interface AccountReconciliationDataWithTransactionFetchState {
119
132
  statementUpdateStatus: FetchStateAndError;
120
133
  statementUploadStatus: FetchStateAndError;
121
134
  transactionFetchState: FetchStateAndError;
135
+ accountDetectionReason?: string;
122
136
  reconciliationId?: ID;
123
137
  }
124
138
  export {};
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
17
17
  firstMonthOfFY: Month;
18
18
  maxNumOfPeriodsToHighlight: number;
19
19
  thisPeriod: TimeframeTick;
20
- }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
+ }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
21
  additionalBalances: COABalanceType[];
22
22
  coaBalances: COABalance[];
23
23
  firstMonthOfFY: Month;
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
4
4
  import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
5
5
  export declare const initialState: GlobalMerchantViewState;
6
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | undefined], {
6
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | undefined], {
7
7
  merchantId: string | undefined;
8
- context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | undefined;
8
+ context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | undefined;
9
9
  }, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  merchantId: ID;
11
11
  }, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -126,10 +126,12 @@ function buildClassColumns(classHierarchy, classesToFilterOut) {
126
126
  qboId: c.qboId,
127
127
  }))
128
128
  .sort((a, b) => {
129
- if (a.classId === exports.NOT_SPECIFIED_CLASS_ID) {
129
+ const aIsNotSpecified = a.classId === exports.NOT_SPECIFIED_CLASS_ID;
130
+ const bIsNotSpecified = b.classId === exports.NOT_SPECIFIED_CLASS_ID;
131
+ if (aIsNotSpecified && !bIsNotSpecified) {
130
132
  return 1;
131
133
  }
132
- if (b.classId === exports.NOT_SPECIFIED_CLASS_ID) {
134
+ if (!aIsNotSpecified && bIsNotSpecified) {
133
135
  return -1;
134
136
  }
135
137
  return a.className.localeCompare(b.className, [], {
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getReimbursementCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;