@zeniai/client-epic-state 4.19.86-betaSS2 → 4.19.87-beta0ND

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 (53) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -35
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -44
  3. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -2
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -13
  6. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -44
  7. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  8. package/lib/esm/index.js +6 -6
  9. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  10. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -46
  11. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -15
  12. package/lib/esm/view/financeStatement/financeStatementSelector.js +5 -0
  13. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +282 -0
  14. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +1 -0
  15. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +5 -1
  16. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  17. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  18. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  19. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  20. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  21. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  22. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  23. package/lib/index.d.ts +10 -9
  24. package/lib/index.js +28 -28
  25. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  26. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  27. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  28. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  29. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -46
  30. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  31. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -17
  32. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  33. package/lib/view/financeStatement/financeStatementSelector.js +5 -0
  34. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +13 -0
  35. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +286 -0
  36. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +56 -0
  37. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +2 -0
  38. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +4 -2
  39. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -2
  40. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +2 -0
  41. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  42. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  43. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  44. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  45. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  46. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  47. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  48. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  49. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  50. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  51. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  52. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  53. package/package.json +1 -1
@@ -13,39 +13,6 @@ export interface JEScheduleOtherAttributesPayload {
13
13
  asset_id?: string | null;
14
14
  starting_balance?: number | null;
15
15
  }
16
- export interface JEScheduleAISummaryFieldPayload {
17
- confidence: number;
18
- reasoning: string;
19
- predicted_value?: number | string;
20
- }
21
- export interface JEScheduleAISummariesPayload {
22
- credit_account?: JEScheduleAISummaryFieldPayload;
23
- credit_accounting_class?: JEScheduleAISummaryFieldPayload;
24
- debit_account?: JEScheduleAISummaryFieldPayload;
25
- debit_accounting_class?: JEScheduleAISummaryFieldPayload;
26
- period?: JEScheduleAISummaryFieldPayload;
27
- posting_date?: JEScheduleAISummaryFieldPayload;
28
- }
29
- export interface JEScheduleRecommendationsPayload {
30
- amortization_days?: number | null;
31
- amortization_months_estimate?: number | null;
32
- credit_account_confidence?: number;
33
- credit_account_id?: string | null;
34
- credit_accounting_class_id?: string | null;
35
- credit_class_confidence?: number;
36
- debit_account_confidence?: number;
37
- debit_account_id?: string | null;
38
- debit_accounting_class_id?: string | null;
39
- debit_class_confidence?: number;
40
- end_date?: string | null;
41
- je_schedule_type?: string | null;
42
- period?: number | null;
43
- period_confidence?: number;
44
- posting_date?: string | null;
45
- similar_transactions?: unknown[];
46
- start_date?: string | null;
47
- starting_month?: string | null;
48
- }
49
16
  export interface JEScheduledTransactionPayload {
50
17
  balance: number | null;
51
18
  base_transaction: ScheduleTransactionPayload;
@@ -68,9 +35,7 @@ export interface JEScheduledTransactionPayload {
68
35
  status: StatusCodeWithLabelPayload;
69
36
  updated_by: UserPayload;
70
37
  vendor: VendorPayload;
71
- ai_summaries?: JEScheduleAISummariesPayload;
72
38
  end_date?: string | null;
73
- recommendations?: JEScheduleRecommendationsPayload;
74
39
  updated_at?: string | null;
75
40
  }
76
41
  export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTransactionPayload, 'base_transaction' | 'je_schedule_id' | 'je_schedule_type'> {
@@ -144,49 +144,6 @@ function toJEScheduleOtherAttributes(payload) {
144
144
  assetId: payload.asset_id ?? undefined,
145
145
  };
146
146
  }
147
- function toJEScheduleAIRecommendations(payload) {
148
- if (payload == null) {
149
- return undefined;
150
- }
151
- const result = {};
152
- if (payload.debit_account != null) {
153
- result.debitAccount = {
154
- confidence: payload.debit_account.confidence,
155
- reasoning: payload.debit_account.reasoning,
156
- };
157
- }
158
- if (payload.credit_account != null) {
159
- result.creditAccount = {
160
- confidence: payload.credit_account.confidence,
161
- reasoning: payload.credit_account.reasoning,
162
- };
163
- }
164
- if (payload.debit_accounting_class != null) {
165
- result.debitClass = {
166
- confidence: payload.debit_accounting_class.confidence,
167
- reasoning: payload.debit_accounting_class.reasoning,
168
- };
169
- }
170
- if (payload.credit_accounting_class != null) {
171
- result.creditClass = {
172
- confidence: payload.credit_accounting_class.confidence,
173
- reasoning: payload.credit_accounting_class.reasoning,
174
- };
175
- }
176
- if (payload.period != null) {
177
- result.period = {
178
- confidence: payload.period.confidence,
179
- reasoning: payload.period.reasoning,
180
- };
181
- }
182
- if (payload.posting_date != null) {
183
- result.postingDate = {
184
- confidence: payload.posting_date.confidence,
185
- reasoning: payload.posting_date.reasoning,
186
- };
187
- }
188
- return Object.keys(result).length > 0 ? result : undefined;
189
- }
190
147
  function toJEScheduledTransaction(payload) {
191
148
  return {
192
149
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -228,7 +185,6 @@ function toJEScheduledTransaction(payload) {
228
185
  ? toJEScheduleOtherAttributes(payload.other_attributes)
229
186
  : {},
230
187
  scheduledJournalEntry: [],
231
- aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
232
188
  };
233
189
  }
234
190
  function toJEAccruedScheduledTransaction(payload) {
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
9
9
  import { TransactionID } from '../transaction/stateTypes/transaction';
10
10
  import { User } from '../user/userState';
11
11
  import { Vendor } from '../vendor/vendorState';
12
- import { JEScheduleAIRecommendations, JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
12
+ import { JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
13
13
  import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
14
14
  export interface ScheduledJournalEntry {
15
15
  error: JournalEntryErrorCodeType[];
@@ -59,7 +59,6 @@ export interface JEScheduledTransaction {
59
59
  scheduledJournalEntry: ScheduledJournalEntry[];
60
60
  status: ScheduleStatus;
61
61
  vendor: Vendor;
62
- aiRecommendations?: JEScheduleAIRecommendations;
63
62
  balanceAsOfToday?: Amount;
64
63
  dayOfPostingDate?: ScheduleDaysOfMonth;
65
64
  endDate?: ZeniDate;
@@ -77,7 +77,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
77
77
  const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
78
78
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
79
79
  const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
80
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
80
+ const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
81
81
  const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
82
82
  if (vendorDetails == null) {
83
83
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -134,7 +134,6 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
134
134
  account: accountDebit,
135
135
  },
136
136
  scheduledJournalEntry,
137
- aiRecommendations,
138
137
  };
139
138
  };
140
139
  exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
@@ -13,18 +13,6 @@ export interface ScheduleJournalStatusCode {
13
13
  code: ScheduleJournalEntryStatusCodeType;
14
14
  label: string;
15
15
  }
16
- export interface JEScheduleFieldRecommendation {
17
- confidence: number;
18
- reasoning: string;
19
- }
20
- export interface JEScheduleAIRecommendations {
21
- creditAccount?: JEScheduleFieldRecommendation;
22
- creditClass?: JEScheduleFieldRecommendation;
23
- debitAccount?: JEScheduleFieldRecommendation;
24
- debitClass?: JEScheduleFieldRecommendation;
25
- period?: JEScheduleFieldRecommendation;
26
- postingDate?: JEScheduleFieldRecommendation;
27
- }
28
16
  export interface JEScheduleOtherAttributes {
29
17
  assetId?: string;
30
18
  startingBalance?: Amount;
@@ -69,7 +57,6 @@ export interface JEScheduledTransactionState {
69
57
  scheduledJournalEntry: ScheduledJournalEntryState[];
70
58
  status: ScheduleStatus;
71
59
  vendorId: ID;
72
- aiRecommendations?: JEScheduleAIRecommendations;
73
60
  balanceAsOfToday?: number;
74
61
  dayOfPostingDate?: ScheduleDaysOfMonth;
75
62
  endDate?: ZeniDate;
@@ -134,49 +134,6 @@ function toJEScheduleOtherAttributes(payload) {
134
134
  assetId: payload.asset_id ?? undefined,
135
135
  };
136
136
  }
137
- function toJEScheduleAIRecommendations(payload) {
138
- if (payload == null) {
139
- return undefined;
140
- }
141
- const result = {};
142
- if (payload.debit_account != null) {
143
- result.debitAccount = {
144
- confidence: payload.debit_account.confidence,
145
- reasoning: payload.debit_account.reasoning,
146
- };
147
- }
148
- if (payload.credit_account != null) {
149
- result.creditAccount = {
150
- confidence: payload.credit_account.confidence,
151
- reasoning: payload.credit_account.reasoning,
152
- };
153
- }
154
- if (payload.debit_accounting_class != null) {
155
- result.debitClass = {
156
- confidence: payload.debit_accounting_class.confidence,
157
- reasoning: payload.debit_accounting_class.reasoning,
158
- };
159
- }
160
- if (payload.credit_accounting_class != null) {
161
- result.creditClass = {
162
- confidence: payload.credit_accounting_class.confidence,
163
- reasoning: payload.credit_accounting_class.reasoning,
164
- };
165
- }
166
- if (payload.period != null) {
167
- result.period = {
168
- confidence: payload.period.confidence,
169
- reasoning: payload.period.reasoning,
170
- };
171
- }
172
- if (payload.posting_date != null) {
173
- result.postingDate = {
174
- confidence: payload.posting_date.confidence,
175
- reasoning: payload.posting_date.reasoning,
176
- };
177
- }
178
- return Object.keys(result).length > 0 ? result : undefined;
179
- }
180
137
  export function toJEScheduledTransaction(payload) {
181
138
  return {
182
139
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -218,7 +175,6 @@ export function toJEScheduledTransaction(payload) {
218
175
  ? toJEScheduleOtherAttributes(payload.other_attributes)
219
176
  : {},
220
177
  scheduledJournalEntry: [],
221
- aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
222
178
  };
223
179
  }
224
180
  export function toJEAccruedScheduledTransaction(payload) {
@@ -70,7 +70,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
70
70
  export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
71
71
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
72
72
  const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
73
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
73
+ const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
74
74
  const vendorDetails = getVendorByVendorId(vendorState, vendorId);
75
75
  if (vendorDetails == null) {
76
76
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -127,6 +127,5 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
127
127
  account: accountDebit,
128
128
  },
129
129
  scheduledJournalEntry,
130
- aiRecommendations,
131
130
  };
132
131
  };
package/lib/esm/index.js CHANGED
@@ -162,14 +162,13 @@ import { toExpenseAutomationViewType, } from './view/expenseAutomationView/expen
162
162
  import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardCreditType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, } from './view/expenseAutomationView/helpers/reconciliationHelpers';
163
163
  import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
164
164
  import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
165
- import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
165
+ import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
166
166
  import { fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
167
167
  import { deleteAccountStatement, fetchReconciliation as fetchReconciliationView, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
168
168
  import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
169
169
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
170
170
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
171
171
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
172
- import { toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
173
172
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
174
173
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
175
174
  import { toTransactionsTabKey as toExpenseAutomationTransactionsTabKey, toTransactionsSortKey, } from './view/expenseAutomationView/types/transactionsViewState';
@@ -217,7 +216,8 @@ import { changeZeniPersonRoles, deletePerson, fetchAllPeopleRequiredViews, fetch
217
216
  import { getPeople, getPeopleLocalData } from './view/people/peopleSelector';
218
217
  import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, } from './view/profitAndLoss/profitAndLossReducer';
219
218
  import { getPandLReportFetchState, getProfitAndLossReport, } from './view/profitAndLoss/profitAndLossSelector';
220
- import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
219
+ import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateClassViewLayout, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
220
+ import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
221
221
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
222
222
  import { isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
223
223
  import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
@@ -416,7 +416,7 @@ export { newBalancesFilterClassesView };
416
416
  export { toCOABalanceTypeStrict, toCOABalanceType as toCOABlanaceType, isCalculatedBalanceType, };
417
417
  export { stringToUnion, stringToUnionStrict };
418
418
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
419
- export { toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
419
+ export { getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
420
420
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
421
421
  export { TOP_EX_TIME_PERIODS };
422
422
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
@@ -447,7 +447,7 @@ export { fetchDashboard, getDashboard, updateTreasuryVideoClosed, };
447
447
  export { updateDashboardLayout };
448
448
  export { getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
449
449
  export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, getProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
450
- export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, getProfitAndLossClassesView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
450
+ export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, getProfitAndLossClassesView, getProfitAndLossClassesHorizontalView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
451
451
  export { getAccountingProviderAttachment };
452
452
  export { fetchUserListByType, getUserList };
453
453
  export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, getPeople, getPeopleLocalData, initializeEditPerson, };
@@ -572,7 +572,7 @@ export { updateChargeCardTransactionAttachments, attachmentFilePathToAttachment,
572
572
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
573
573
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
574
574
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
575
- export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
575
+ export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
576
576
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
577
577
  export { ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
578
578
  export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
@@ -46,8 +46,6 @@ export const initialState = {
46
46
  uiState: {
47
47
  searchString: '',
48
48
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
49
- sortKey: 'startMonth',
50
- sortOrder: 'descending',
51
49
  totalCount: 0,
52
50
  limit: 10,
53
51
  },
@@ -375,26 +373,12 @@ const expenseAutomationJESchedulesView = createSlice({
375
373
  clearJeAccountSettingsLocalData(draft) {
376
374
  draft.accountSettings.localData = accountSettingsInitialState.localData;
377
375
  },
378
- updateJESchedulesUIState(draft, action) {
379
- if (action.payload.sortKey != null) {
380
- draft.uiState.sortKey = action.payload.sortKey;
381
- }
382
- if (action.payload.sortOrder != null) {
383
- draft.uiState.sortOrder = action.payload.sortOrder;
384
- }
385
- if (action.payload.searchString != null) {
386
- draft.uiState.searchString = action.payload.searchString;
387
- }
388
- if (action.payload.scrollPosition != null) {
389
- draft.uiState.scrollPosition = action.payload.scrollPosition;
390
- }
391
- },
392
376
  clearExpenseAutomationJESchedulesView(draft) {
393
377
  Object.assign(draft, initialState);
394
378
  },
395
379
  },
396
380
  });
397
- export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
381
+ export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
398
382
  export default expenseAutomationJESchedulesView.reducer;
399
383
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
400
384
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = mapAccountTypeRecommendationPayloadToAccountRecommendationByType(payload);
@@ -1,5 +1,4 @@
1
1
  import omit from 'lodash/omit';
2
- import orderBy from 'lodash/orderBy';
3
2
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
3
  import { getAccountIdsForTypes } from '../../../entity/account/accountSelector';
5
4
  import { getJEScheduledTransactionByJEScheduleTransactionKey, } from '../../../entity/jeSchedules/jeSchedulesSelector';
@@ -11,38 +10,6 @@ import { filterNestedAccountHierarchyById } from '../../scheduleView/scheduleDet
11
10
  import { getAccountLabelForScheduleType, getAccountsTypesForScheduleList, } from '../../scheduleView/scheduleListView/scheduleListHelper';
12
11
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
13
12
  import { getJEAccountSettingsView } from './jeAccountSettingsViewSelector';
14
- function getJEScheduleSortAccessor(sortKey) {
15
- switch (sortKey) {
16
- case 'vendor':
17
- return (s) => s.vendor.name?.toLowerCase();
18
- case 'category':
19
- return (s) => s.jeDebit.account?.accountName?.toLowerCase();
20
- case 'class':
21
- return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
22
- case 'scheduleCategory':
23
- return (s) => s.jeScheduleType;
24
- case 'startMonth':
25
- return (s) => s.startDate?.valueOf();
26
- case 'type':
27
- return (s) => s.baseTransaction.typeOfTransaction;
28
- case 'amortizationPeriod':
29
- return (s) => s.period;
30
- case 'jePostingDate':
31
- return (s) => s.dayOfPostingDate;
32
- case 'remainingMonths':
33
- return (s) => s.period;
34
- case 'runningBalance':
35
- return (s) => s.balanceAsOfToday?.amount;
36
- case 'totalAmount':
37
- return (s) => s.baseTransaction.amount.amount;
38
- default:
39
- return (s) => s.startDate?.valueOf();
40
- }
41
- }
42
- function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
43
- const accessor = getJEScheduleSortAccessor(sortKey);
44
- return orderBy(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
45
- }
46
13
  export function getExpenseAutomationJESchedulesView(state) {
47
14
  const jeScheduledTransaction = [];
48
15
  const failedJeScheduledTransaction = [];
@@ -92,21 +59,13 @@ export function getExpenseAutomationJESchedulesView(state) {
92
59
  const jeScheduleDetails = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleKey, state);
93
60
  failedJeScheduledTransaction.push(jeScheduleDetails);
94
61
  });
95
- const { sortKey, sortOrder } = uiState;
96
- const draftSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft'), sortKey, sortOrder);
97
- const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
98
- const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
99
- schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
100
- const unsortedResolveSchedules = [];
62
+ const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
63
+ const resolveSchedules = [];
101
64
  failedJeScheduledTransaction.forEach((schedule) => {
102
65
  schedule.scheduledJournalEntry.forEach((journalEntry) => {
103
- unsortedResolveSchedules.push({
104
- ...schedule,
105
- scheduledJournalEntry: journalEntry,
106
- });
66
+ resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
107
67
  });
108
68
  });
109
- const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
110
69
  const allSteps = monthYearPeriodId != null
111
70
  ? getAllSteps(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
112
71
  : [];
@@ -120,9 +79,7 @@ export function getExpenseAutomationJESchedulesView(state) {
120
79
  allAccountList: filteredAccounts,
121
80
  accountListNestedAccountHierarchy,
122
81
  allClassList: allClasses,
123
- completedSchedules,
124
82
  draftSchedules,
125
- ongoingSchedules,
126
83
  resolveSchedules: resolveSchedules,
127
84
  accountSettingsView,
128
85
  postStatusById: postStatusById,
@@ -1,15 +1 @@
1
- import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- const JE_SCHEDULE_SORT_KEYS = [
3
- 'vendor',
4
- 'category',
5
- 'class',
6
- 'scheduleCategory',
7
- 'startMonth',
8
- 'type',
9
- 'amortizationPeriod',
10
- 'jePostingDate',
11
- 'remainingMonths',
12
- 'runningBalance',
13
- 'totalAmount',
14
- ];
15
- export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
1
+ export {};
@@ -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 = [
@@ -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 = profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
65
+ ? getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, thisPeriod)
66
+ : getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, 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,