@zeniai/client-epic-state 4.19.99-betaSS4 → 4.19.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +7 -8
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -12
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +63 -144
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/index.d.ts +10 -13
- package/lib/index.js +32 -42
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -11
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +63 -144
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/package.json +1 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.
|
|
4
|
+
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
|
|
7
7
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
@@ -48,8 +48,6 @@ exports.initialState = {
|
|
|
48
48
|
uiState: {
|
|
49
49
|
searchString: '',
|
|
50
50
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
51
|
-
sortKey: 'startMonth',
|
|
52
|
-
sortOrder: 'descending',
|
|
53
51
|
totalCount: 0,
|
|
54
52
|
limit: 10,
|
|
55
53
|
},
|
|
@@ -371,26 +369,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
371
369
|
clearJeAccountSettingsLocalData(draft) {
|
|
372
370
|
draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
|
|
373
371
|
},
|
|
374
|
-
updateJESchedulesUIState(draft, action) {
|
|
375
|
-
if (action.payload.sortKey != null) {
|
|
376
|
-
draft.uiState.sortKey = action.payload.sortKey;
|
|
377
|
-
}
|
|
378
|
-
if (action.payload.sortOrder != null) {
|
|
379
|
-
draft.uiState.sortOrder = action.payload.sortOrder;
|
|
380
|
-
}
|
|
381
|
-
if (action.payload.searchString != null) {
|
|
382
|
-
draft.uiState.searchString = action.payload.searchString;
|
|
383
|
-
}
|
|
384
|
-
if (action.payload.scrollPosition != null) {
|
|
385
|
-
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
372
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
389
373
|
Object.assign(draft, exports.initialState);
|
|
390
374
|
},
|
|
391
375
|
},
|
|
392
376
|
});
|
|
393
|
-
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.
|
|
377
|
+
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
|
|
394
378
|
exports.default = expenseAutomationJESchedulesView.reducer;
|
|
395
379
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
396
380
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
|
|
@@ -18,12 +18,10 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
|
18
18
|
allDepreciationAccountList: AccountBase[];
|
|
19
19
|
allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
20
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
21
|
-
completedSchedules: JEScheduledTransaction[];
|
|
22
21
|
completionStatus: CompletionStatusType;
|
|
23
22
|
draftSchedules: JEScheduledTransaction[];
|
|
24
23
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
25
24
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
26
|
-
ongoingSchedules: JEScheduledTransaction[];
|
|
27
25
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
28
26
|
refreshStatus: FetchStateAndError;
|
|
29
27
|
resolveSchedules: JEScheduledTransactionWithFailedEntries[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExpenseAutomationFluxAnalysisView = getExpenseAutomationFluxAnalysisView;
|
|
4
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
5
4
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
6
5
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
7
6
|
const classSelector_1 = require("../../../entity/class/classSelector");
|
|
@@ -10,7 +9,7 @@ const userSelector_1 = require("../../../entity/user/userSelector");
|
|
|
10
9
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
11
10
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
12
11
|
function getExpenseAutomationFluxAnalysisView(state) {
|
|
13
|
-
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState
|
|
12
|
+
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState } = state;
|
|
14
13
|
const { fetchState, error, refreshStatus, uiState, reviewOperatingExpenseIdsByPeriod, selectedSectionIdsByPeriod, groupsBySelectedPeriod, fluxAnalysisEntities, bulkReviewStatus, currency, totalBalancesAndVariance, } = expenseAutomationFluxAnalysisViewState;
|
|
15
14
|
const fetchStateAndError = {
|
|
16
15
|
fetchState,
|
|
@@ -95,17 +94,10 @@ function getExpenseAutomationFluxAnalysisView(state) {
|
|
|
95
94
|
},
|
|
96
95
|
};
|
|
97
96
|
const completionStatus = fluxCompletionStatus != null ? fluxCompletionStatus : 'incomplete';
|
|
98
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
99
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
100
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
101
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
102
|
-
fetchStateAndError,
|
|
103
|
-
monthEndFetchState,
|
|
104
|
-
]);
|
|
105
97
|
return {
|
|
106
98
|
sections,
|
|
107
99
|
totalBalancesAndVariance,
|
|
108
|
-
fetchStatus:
|
|
100
|
+
fetchStatus: fetchStateAndError,
|
|
109
101
|
bulkReviewStatus,
|
|
110
102
|
reviewOperatingExpensesIds,
|
|
111
103
|
selectedSectionIds,
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
11
9
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
12
10
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -18,48 +16,10 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
|
|
|
18
16
|
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
19
17
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
20
18
|
const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
|
|
21
|
-
function getJEScheduleSortAccessor(sortKey) {
|
|
22
|
-
switch (sortKey) {
|
|
23
|
-
case 'vendor':
|
|
24
|
-
return (s) => s.vendor.name?.toLowerCase();
|
|
25
|
-
case 'category':
|
|
26
|
-
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
27
|
-
case 'class':
|
|
28
|
-
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
29
|
-
case 'depCategory':
|
|
30
|
-
return (s) => s.jeCredit.account?.accountName?.toLowerCase();
|
|
31
|
-
case 'scheduleCategory':
|
|
32
|
-
return (s) => s.jeScheduleType;
|
|
33
|
-
case 'startMonth':
|
|
34
|
-
return (s) => s.startDate?.valueOf();
|
|
35
|
-
case 'type':
|
|
36
|
-
return (s) => s.baseTransaction.typeOfTransaction;
|
|
37
|
-
case 'amortizationPeriod':
|
|
38
|
-
return (s) => s.period;
|
|
39
|
-
case 'jePostingDate':
|
|
40
|
-
return (s) => s.dayOfPostingDate;
|
|
41
|
-
case 'remainingMonths':
|
|
42
|
-
return (s) => s.period;
|
|
43
|
-
case 'runningBalance':
|
|
44
|
-
return (s) => s.balanceAsOfToday?.amount;
|
|
45
|
-
case 'totalAmount':
|
|
46
|
-
return (s) => s.baseTransaction.amount.amount;
|
|
47
|
-
case 'transactionDate':
|
|
48
|
-
return (s) => s.baseTransaction.date.valueOf();
|
|
49
|
-
case 'memo':
|
|
50
|
-
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
51
|
-
default:
|
|
52
|
-
return (s) => s.startDate?.valueOf();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
56
|
-
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
57
|
-
return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
58
|
-
}
|
|
59
19
|
function getExpenseAutomationJESchedulesView(state) {
|
|
60
20
|
const jeScheduledTransaction = [];
|
|
61
21
|
const failedJeScheduledTransaction = [];
|
|
62
|
-
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState,
|
|
22
|
+
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
63
23
|
const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
|
|
64
24
|
const accountSettingsView = (0, jeAccountSettingsViewSelector_1.getJEAccountSettingsView)(state);
|
|
65
25
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
@@ -105,33 +65,18 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
105
65
|
const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
|
|
106
66
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
107
67
|
});
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
111
|
-
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
112
|
-
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
113
|
-
const unsortedResolveSchedules = [];
|
|
68
|
+
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
69
|
+
const resolveSchedules = [];
|
|
114
70
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
115
71
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
116
|
-
|
|
117
|
-
...schedule,
|
|
118
|
-
scheduledJournalEntry: journalEntry,
|
|
119
|
-
});
|
|
72
|
+
resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
|
|
120
73
|
});
|
|
121
74
|
});
|
|
122
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
123
75
|
const allSteps = monthYearPeriodId != null
|
|
124
76
|
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
125
77
|
: [];
|
|
126
78
|
const jeCompletionStatus = allSteps.find((step) => step.step === 'je_schedules')?.completionStatus;
|
|
127
79
|
const completionStatus = jeCompletionStatus != null ? jeCompletionStatus : 'incomplete';
|
|
128
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
129
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
130
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
131
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
132
|
-
{ fetchState, error },
|
|
133
|
-
monthEndFetchState,
|
|
134
|
-
]);
|
|
135
80
|
return {
|
|
136
81
|
uncategorizedAccounts,
|
|
137
82
|
allDepreciationAccountList: filteredDepAccounts,
|
|
@@ -140,17 +85,15 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
140
85
|
allAccountList: filteredAccounts,
|
|
141
86
|
accountListNestedAccountHierarchy,
|
|
142
87
|
allClassList: allClasses,
|
|
143
|
-
completedSchedules,
|
|
144
88
|
draftSchedules,
|
|
145
|
-
ongoingSchedules,
|
|
146
89
|
resolveSchedules: resolveSchedules,
|
|
147
90
|
accountSettingsView,
|
|
148
91
|
postStatusById: postStatusById,
|
|
149
92
|
ignoreStatusById: ignoreStatusById,
|
|
150
|
-
fetchState:
|
|
93
|
+
fetchState: fetchState,
|
|
151
94
|
jeScheduleLocalDataById: jeScheduleLocalDataById,
|
|
152
95
|
uiState: uiState,
|
|
153
|
-
error:
|
|
96
|
+
error: error,
|
|
154
97
|
refreshStatus,
|
|
155
98
|
completionStatus,
|
|
156
99
|
};
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationMissingReceiptsView = getExpenseAutomationMissingReceiptsView;
|
|
7
7
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
8
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
9
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
10
9
|
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
11
10
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
@@ -14,7 +13,7 @@ const missingReceiptsViewReducer_1 = require("../reducers/missingReceiptsViewRed
|
|
|
14
13
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
15
14
|
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
16
15
|
function getExpenseAutomationMissingReceiptsView(state) {
|
|
17
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
16
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
17
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
19
18
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
20
19
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -43,7 +42,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
43
42
|
transaction.lines.length > 0 &&
|
|
44
43
|
transaction.lines[0]
|
|
45
44
|
?.class != null
|
|
46
|
-
? transaction.lines[0].class
|
|
45
|
+
? transaction.lines[0].class.className.toLowerCase()
|
|
47
46
|
: null;
|
|
48
47
|
case 'vendor':
|
|
49
48
|
default:
|
|
@@ -182,16 +181,9 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
182
181
|
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
183
182
|
};
|
|
184
183
|
});
|
|
185
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
186
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
187
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
188
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
189
|
-
{ fetchState, error },
|
|
190
|
-
monthEndFetchState,
|
|
191
|
-
]);
|
|
192
184
|
return {
|
|
193
|
-
fetchState
|
|
194
|
-
error
|
|
185
|
+
fetchState,
|
|
186
|
+
error,
|
|
195
187
|
uploadReceiptStatusById,
|
|
196
188
|
uiState,
|
|
197
189
|
refreshStatus,
|
|
@@ -19,7 +19,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
19
19
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
20
20
|
const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
|
|
21
21
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
22
|
-
exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state
|
|
22
|
+
exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState) => {
|
|
23
23
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
24
24
|
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
25
25
|
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
@@ -41,13 +41,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
41
41
|
}
|
|
42
42
|
return acc;
|
|
43
43
|
}, []);
|
|
44
|
-
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
45
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
46
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
|
|
47
|
-
fetchState: 'Not-Started',
|
|
48
|
-
error: undefined,
|
|
49
|
-
})
|
|
50
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
51
44
|
if (accountReconForMonthYearPeriod == null) {
|
|
52
45
|
return {
|
|
53
46
|
bankAccounts: [],
|
|
@@ -57,13 +50,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
57
50
|
classListNestedAccountHierarchy: [],
|
|
58
51
|
allAccountList: [],
|
|
59
52
|
allClassList: [],
|
|
60
|
-
fetchStatus:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
monthEndFetchState,
|
|
66
|
-
]),
|
|
53
|
+
fetchStatus: {
|
|
54
|
+
fetchState: reconciliationViewState.fetchState,
|
|
55
|
+
error: reconciliationViewState.error,
|
|
56
|
+
},
|
|
67
57
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
68
58
|
.plaidConnectionDetails,
|
|
69
59
|
completionStatus: 'incomplete',
|
|
@@ -286,13 +276,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
286
276
|
bankAccounts: uniqueBankAccounts,
|
|
287
277
|
creditCards: uniqueCreditCards,
|
|
288
278
|
accountReconciliationsByAccountID: reconList,
|
|
289
|
-
fetchStatus:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
monthEndFetchState,
|
|
295
|
-
]),
|
|
279
|
+
fetchStatus: {
|
|
280
|
+
fetchState: reconciliationViewState.fetchState,
|
|
281
|
+
error: reconciliationViewState.error,
|
|
282
|
+
},
|
|
296
283
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
297
284
|
.plaidConnectionDetails,
|
|
298
285
|
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
@@ -14,7 +14,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
14
14
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
15
15
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
16
16
|
function getExpenseAutomationTransactionView(state) {
|
|
17
|
-
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
17
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
18
|
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
19
19
|
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
20
20
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
|
|
@@ -47,16 +47,10 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
47
47
|
.filter((transaction) => transaction != null);
|
|
48
48
|
const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
|
|
49
49
|
const transactionsWithCOT = transactions.map((transaction) => (0, transactionHelper_1.getTransactionWithCOT)(transaction));
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(0, reduceFetchState_1.reduceAllFetchState)([
|
|
55
|
-
accountList,
|
|
56
|
-
classList,
|
|
57
|
-
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
58
|
-
]),
|
|
59
|
-
monthEndFetchState,
|
|
50
|
+
const fetchStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
51
|
+
accountList,
|
|
52
|
+
classList,
|
|
53
|
+
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
60
54
|
]);
|
|
61
55
|
const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
|
|
62
56
|
.uiState.totalCount;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
|
-
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
4
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
6
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
7
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
|
|
10
|
-
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
8
|
export interface JESchedulesViewUIState {
|
|
12
9
|
scrollPosition: {
|
|
13
10
|
scrollTop: number;
|
|
14
11
|
scrollLeft?: number;
|
|
15
12
|
} | undefined;
|
|
16
13
|
searchString: string;
|
|
17
|
-
sortKey: JEScheduleSortKey;
|
|
18
|
-
sortOrder: SortOrder;
|
|
19
14
|
totalCount: number;
|
|
20
15
|
limit?: number;
|
|
21
16
|
}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJEScheduleSortKey = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
|
-
'vendor',
|
|
7
|
-
'category',
|
|
8
|
-
'class',
|
|
9
|
-
'depCategory',
|
|
10
|
-
'scheduleCategory',
|
|
11
|
-
'startMonth',
|
|
12
|
-
'type',
|
|
13
|
-
'amortizationPeriod',
|
|
14
|
-
'jePostingDate',
|
|
15
|
-
'remainingMonths',
|
|
16
|
-
'runningBalance',
|
|
17
|
-
'totalAmount',
|
|
18
|
-
'transactionDate',
|
|
19
|
-
'memo',
|
|
20
|
-
];
|
|
21
|
-
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
22
|
-
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|
|
@@ -52,11 +52,16 @@ const getProfitAndLossClassesHorizontalView = (filter, accountState, classState,
|
|
|
52
52
|
const calculatedSections = {};
|
|
53
53
|
let reportCurrency = currencyHelper_1.defaultCustomerCurrency;
|
|
54
54
|
if (fetchState.fetchState === 'Completed' && selectedPeriod != null) {
|
|
55
|
+
// Get section reports using existing selector infrastructure
|
|
56
|
+
const sectionReports = {};
|
|
57
|
+
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
58
|
+
sectionReports[sectionId] = (0, sectionClassesViewSelector_1.getSectionClassesViewReport)(accountState, classState, sectionsState, { reportId, sectionId }, filter);
|
|
59
|
+
});
|
|
55
60
|
reportCurrency =
|
|
56
61
|
profitAndLossClassesViewState.currency ?? currencyHelper_1.defaultCustomerCurrency;
|
|
57
|
-
//
|
|
62
|
+
// Pivot each section from class→account to account→class
|
|
58
63
|
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
59
|
-
const sectionReport =
|
|
64
|
+
const sectionReport = sectionReports[sectionId];
|
|
60
65
|
if (sectionReport != null) {
|
|
61
66
|
sections[sectionId] = pivotSectionToHorizontal(sectionReport, classColumns, SECTION_TITLES[sectionId] ?? sectionId, reportCurrency);
|
|
62
67
|
}
|
|
@@ -260,7 +265,7 @@ function sumBalancesInSlice(balances) {
|
|
|
260
265
|
if (balances.length === 0) {
|
|
261
266
|
return 0;
|
|
262
267
|
}
|
|
263
|
-
const summed = (0, getSummationBalance_1.getSummationFreeRangeTotalBalance)(balances);
|
|
268
|
+
const summed = (0, getSummationBalance_1.getSummationFreeRangeTotalBalance)([...balances]);
|
|
264
269
|
return summed?.balance.amount ?? 0;
|
|
265
270
|
}
|
|
266
271
|
/**
|