@zeniai/client-epic-state 4.15.41 → 4.15.43
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/README.md +1 -19
- package/lib/commonPayloadTypes/recommendationPayload.d.ts +0 -1
- package/lib/commonStateTypes/common.d.ts +1 -1
- package/lib/commonStateTypes/fiscalYearHelpers/getFYMonths.d.ts +2 -2
- package/lib/commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear.d.ts +2 -2
- package/lib/commonStateTypes/timePeriod.d.ts +7 -7
- package/lib/commonStateTypes/timePeriod.js +2 -2
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/configureStore.js +1 -2
- package/lib/entity/account/accountSelector.d.ts +3 -3
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -22
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/approvalRule/approvalRuleState.d.ts +2 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyReducer.js +1 -0
- package/lib/entity/customer/customerPayload.d.ts +1 -1
- package/lib/entity/customer/customerPayload.js +6 -16
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -2
- package/lib/entity/notification/types/notificationTypes.d.ts +2 -2
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.js +0 -4
- package/lib/entity/task/taskState.d.ts +3 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -4
- package/lib/entity/tenant/clearAllEpic.js +0 -4
- package/lib/entity/tenant/tenantReducer.d.ts +2 -2
- package/lib/entity/tenant/tenantReducer.js +1 -0
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +2 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -9
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +1 -9
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -24
- package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
- package/lib/entity/transaction/stateTypes/transaction.d.ts +1 -3
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
- package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +0 -5
- package/lib/entity/transaction/stateTypes/vendorTransaction.js +1 -5
- package/lib/entity/transaction/toSupportedTransaction.js +1 -6
- package/lib/entity/transaction/transactionReducer.d.ts +0 -17
- package/lib/entity/transaction/transactionReducer.js +2 -47
- package/lib/entity/transaction/transactionSelector.d.ts +0 -2
- package/lib/entity/transaction/transactionSelector.js +0 -5
- package/lib/entity/transaction/transactionState.d.ts +4 -6
- package/lib/entity/vendorExpense/vendorExpenseReducer.js +1 -0
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/epic.d.ts +1 -6
- package/lib/epic.js +1 -6
- package/lib/index.d.ts +12 -20
- package/lib/index.js +27 -56
- package/lib/init.d.ts +1 -2
- package/lib/init.js +2 -9
- package/lib/reducer.d.ts +1 -7
- package/lib/reducer.js +0 -6
- package/lib/view/accountList/accountListReducer.js +3 -1
- package/lib/view/accountMappingView/accountMappingReducer.js +1 -0
- package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +2 -1
- package/lib/view/auditReportView/auditReportViewReducer.d.ts +2 -2
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/balanceSheet/balanceSheetReducer.js +6 -1
- package/lib/view/bankAccountView/bankAccountViewReducer.js +1 -0
- package/lib/view/billPayCard/billPayCardSelector.d.ts +2 -2
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +3 -3
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +3 -3
- package/lib/view/cashFlow/cashFlowReducer.js +4 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +2 -2
- package/lib/view/cashPosition/cashPositionReducer.js +1 -0
- package/lib/view/cashPosition/cashPositionSelector.d.ts +2 -2
- package/lib/view/common/reportsHelpers.d.ts +1 -1
- package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +0 -7
- package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +3 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyView/companyViewReducer.d.ts +1 -1
- package/lib/view/companyView/companyViewReducer.js +10 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -3
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +1 -1
- package/lib/view/dashboard/dashboardEpic.js +2 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +10 -24
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -14
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +7 -30
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +5 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +2 -17
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +42 -98
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +10 -86
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -12
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +7 -66
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -5
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -12
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementReducer.js +4 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +4 -4
- package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +10 -3
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +6 -1
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +1 -0
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.d.ts +1 -1
- package/lib/view/notificationView/notificationViewReducer.d.ts +8 -8
- package/lib/view/notificationView/notificationViewState.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -2
- package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
- package/lib/view/opEx/opExReducer.js +14 -4
- package/lib/view/opExByVendor/opExByVendorReducer.js +3 -1
- package/lib/view/opExByVendor/opExByVendorState.d.ts +1 -1
- package/lib/view/opExClassesView/opExClassesViewReducer.js +6 -1
- package/lib/view/people/fetchPeopleEpic.js +3 -1
- package/lib/view/people/invitePeopleEpic.js +3 -1
- package/lib/view/people/inviteZeniPeopleEpic.js +3 -1
- package/lib/view/people/peopleReducer.js +1 -0
- package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
- package/lib/view/profitAndLoss/profitAndLossReducer.js +6 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
- package/lib/view/recommendation/recommendationReducer.js +4 -1
- package/lib/view/referralView/referralState.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +2 -2
- package/lib/view/reportUIOptions/reportUIOptionsReducer.d.ts +8 -8
- package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +3 -1
- package/lib/view/revenue/revenueReducer.js +10 -3
- package/lib/view/revenueClassesView/revenueClassesViewReducer.js +6 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +2 -2
- package/lib/view/settingsView/settingsViewReducer.js +1 -0
- package/lib/view/settingsView/settingsViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.js +1 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +6 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +3 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +2 -2
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +7 -7
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -1
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +3 -11
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -11
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +1 -3
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +6 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +3 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.d.ts +2 -2
- package/lib/view/subscriptionView/subscriptionViewReducer.js +1 -0
- package/lib/view/subscriptionView/types/subscriptionTypes.js +1 -0
- package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +3 -1
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +1 -1
- package/lib/view/tasksCard/fetchTasksCardEpic.js +2 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.js +1 -1
- package/lib/view/topEx/topExSelector.d.ts +3 -3
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +52 -45
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +4 -22
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +13 -66
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +4 -13
- package/lib/view/transactionDetail/transactionDetailReducer.js +21 -51
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -3
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -8
- package/lib/view/transactionList/transactionListByEntitySelector.js +2 -0
- package/lib/view/transactionList/transactionListReducer.js +6 -4
- package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +1 -0
- package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +3 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
- package/lib/zeniAPI.d.ts +0 -1
- package/lib/zeniUrl.d.ts +1 -1
- package/package.json +12 -13
- package/lib/entity/accountRecon/accountReconPayload.d.ts +0 -70
- package/lib/entity/accountRecon/accountReconPayload.js +0 -125
- package/lib/entity/accountRecon/accountReconReducer.d.ts +0 -16
- package/lib/entity/accountRecon/accountReconReducer.js +0 -71
- package/lib/entity/accountRecon/accountReconSelector.d.ts +0 -28
- package/lib/entity/accountRecon/accountReconSelector.js +0 -44
- package/lib/entity/accountRecon/accountReconState.d.ts +0 -70
- package/lib/entity/accountRecon/accountReconState.js +0 -28
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +0 -35
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +0 -53
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +0 -32
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +0 -10
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +0 -15
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +0 -118
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +0 -49
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +0 -14
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +0 -169
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +0 -154
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +0 -110
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +0 -7
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +0 -18
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -28
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -51
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +0 -66
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +0 -384
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +0 -51
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +0 -7
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +0 -5
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -254
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -103
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -37
|
@@ -19,43 +19,7 @@ const toTransactionDetailLocalData = (transaction) => {
|
|
|
19
19
|
logo: transaction.logo,
|
|
20
20
|
}
|
|
21
21
|
: undefined;
|
|
22
|
-
transactionLocal.customer =
|
|
23
|
-
transaction.customerId != null &&
|
|
24
|
-
transaction.customerName != null &&
|
|
25
|
-
Boolean(transaction.customerId) === true &&
|
|
26
|
-
Boolean(transaction.customerName) === true
|
|
27
|
-
? {
|
|
28
|
-
id: transaction.customerId,
|
|
29
|
-
name: transaction.customerName,
|
|
30
|
-
logo: transaction.logo,
|
|
31
|
-
}
|
|
32
|
-
: undefined;
|
|
33
|
-
if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
|
|
34
|
-
transaction.vendorId != null &&
|
|
35
|
-
transaction.vendorName != null) {
|
|
36
|
-
transactionLocal.selectedEntity = {
|
|
37
|
-
id: transaction.vendorId,
|
|
38
|
-
name: transaction.vendorName,
|
|
39
|
-
type: 'vendor',
|
|
40
|
-
qboId: transaction.vendorId,
|
|
41
|
-
zeniId: transaction.vendorId,
|
|
42
|
-
logo: transaction.logo,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
|
|
46
|
-
transaction.customerId != null &&
|
|
47
|
-
transaction.customerName != null) {
|
|
48
|
-
transactionLocal.selectedEntity = {
|
|
49
|
-
id: transaction.customerId,
|
|
50
|
-
name: transaction.customerName,
|
|
51
|
-
type: 'customer',
|
|
52
|
-
qboId: transaction.customerId,
|
|
53
|
-
zeniId: transaction.customerId,
|
|
54
|
-
logo: transaction.logo,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
22
|
transactionLocal.vendorUpdates = undefined;
|
|
58
|
-
transactionLocal.customerUpdates = undefined;
|
|
59
23
|
transactionLocal.lineItemById =
|
|
60
24
|
transaction.lines != null && transaction.lines.length > 0
|
|
61
25
|
? buildLineItemById(transaction, transaction.recommendations)
|
|
@@ -89,34 +53,7 @@ const buildLineItemById = (transaction, recommendations) => {
|
|
|
89
53
|
logo: accountLine.vendor.logo,
|
|
90
54
|
}
|
|
91
55
|
: undefined;
|
|
92
|
-
record.customer =
|
|
93
|
-
accountLine.customer != null &&
|
|
94
|
-
Boolean(accountLine.customer.id) === true &&
|
|
95
|
-
Boolean(accountLine.customer.name) === true
|
|
96
|
-
? {
|
|
97
|
-
id: accountLine.customer.id,
|
|
98
|
-
name: accountLine.customer.name,
|
|
99
|
-
logo: accountLine.customer.logo,
|
|
100
|
-
}
|
|
101
|
-
: undefined;
|
|
102
|
-
record.selectedEntityLine =
|
|
103
|
-
record.vendor != null
|
|
104
|
-
? {
|
|
105
|
-
id: record.vendor.id,
|
|
106
|
-
name: record.vendor.name,
|
|
107
|
-
type: 'vendor',
|
|
108
|
-
qboId: record.vendor.id,
|
|
109
|
-
zeniId: record.vendor.id,
|
|
110
|
-
}
|
|
111
|
-
: record.customer != null
|
|
112
|
-
? {
|
|
113
|
-
id: record.customer.id,
|
|
114
|
-
name: record.customer.name,
|
|
115
|
-
type: 'customer',
|
|
116
|
-
qboId: record.customer.id,
|
|
117
|
-
zeniId: record.customer.id,
|
|
118
|
-
}
|
|
119
|
-
: undefined;
|
|
56
|
+
record.customer = accountLine.customer;
|
|
120
57
|
record.billable = accountLine.billable;
|
|
121
58
|
record.categorizationStatus = accountLine.categorizationStatus;
|
|
122
59
|
record.reviewPendingReasons = accountLine.reviewPendingReasons;
|
|
@@ -152,7 +89,7 @@ const buildLineItemById = (transaction, recommendations) => {
|
|
|
152
89
|
});
|
|
153
90
|
return lineItemData;
|
|
154
91
|
};
|
|
155
|
-
const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, vendorId,
|
|
92
|
+
const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase) => {
|
|
156
93
|
const newLineItems = {};
|
|
157
94
|
let selectedCheckBoxTransactionIds = draft.selectedCheckBoxTransactionIds;
|
|
158
95
|
if (transaction.lines != null) {
|
|
@@ -187,11 +124,8 @@ const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, tra
|
|
|
187
124
|
}
|
|
188
125
|
}
|
|
189
126
|
else {
|
|
190
|
-
if ((transactionDetailLocalData.
|
|
191
|
-
transactionDetailLocalData.
|
|
192
|
-
(record.customer != null && record.customer.id === customerId) ||
|
|
193
|
-
(transactionDetailLocalData.vendor != null &&
|
|
194
|
-
transactionDetailLocalData.vendor.id === vendorId) ||
|
|
127
|
+
if ((transactionDetailLocalData.vendor != null &&
|
|
128
|
+
transactionDetailLocalData.vendor.id === vendorId) ||
|
|
195
129
|
(record.vendor != null && record.vendor.id === vendorId)) {
|
|
196
130
|
// if the vendor is same, then set the account and class with the selected ones and add the transaction to the selected list
|
|
197
131
|
if (selectedAccount != null &&
|
|
@@ -240,7 +174,7 @@ const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, tra
|
|
|
240
174
|
}
|
|
241
175
|
});
|
|
242
176
|
}
|
|
243
|
-
const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendor: transactionDetailLocalData.vendor,
|
|
177
|
+
const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendor: transactionDetailLocalData.vendor, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails });
|
|
244
178
|
if (!(0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, newLocalData, uncategorizedAccounts)) {
|
|
245
179
|
selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds.filter((id) => id !== transaction.id);
|
|
246
180
|
}
|
|
@@ -304,7 +238,7 @@ const setEntityRecommendationForLineIdInLocalData = (draft, transaction, transac
|
|
|
304
238
|
const newLineItem = newLineItems[matchingEntityLineId];
|
|
305
239
|
newLineItems[matchingEntityLineId] = Object.assign(Object.assign({}, newLineItem), { class: matchingRecord.class, account: matchingRecord.account, lineEntity: matchingRecord.lineEntity });
|
|
306
240
|
}
|
|
307
|
-
const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendorUpdates: transactionDetailLocalData.vendorUpdates,
|
|
241
|
+
const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, vendor: transactionDetailLocalData.vendor });
|
|
308
242
|
if (!(0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, newLocalData, uncategorizedAccounts)) {
|
|
309
243
|
selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds.filter((id) => id !== transaction.id);
|
|
310
244
|
}
|
|
@@ -316,7 +250,7 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
|
|
|
316
250
|
const lineItems = Object.values(transactionDetailLocalData.lineItemById);
|
|
317
251
|
const isVendorTransactionAvailable = (0, vendorTransaction_1.isVendorTransaction)(transaction);
|
|
318
252
|
return lineItems.every((lineItem) => {
|
|
319
|
-
var _a, _b, _c;
|
|
253
|
+
var _a, _b, _c, _d, _e;
|
|
320
254
|
return lineItem.account != null &&
|
|
321
255
|
Boolean(lineItem.account.qboId) === true &&
|
|
322
256
|
lineItem.class != null &&
|
|
@@ -326,20 +260,10 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
|
|
|
326
260
|
(_b = uncategorizedAccounts.expense) === null || _b === void 0 ? void 0 : _b.qboId,
|
|
327
261
|
(_c = uncategorizedAccounts.income) === null || _c === void 0 ? void 0 : _c.qboId,
|
|
328
262
|
].includes(lineItem.account.qboId)) &&
|
|
329
|
-
(
|
|
330
|
-
? transactionDetailLocalData.vendor != null &&
|
|
331
|
-
transactionDetailLocalData.vendor.id != null &&
|
|
263
|
+
(isVendorTransactionAvailable
|
|
264
|
+
? ((_d = transactionDetailLocalData.vendor) === null || _d === void 0 ? void 0 : _d.id) != null &&
|
|
332
265
|
Boolean(transactionDetailLocalData.vendor.id) === true
|
|
333
|
-
: lineItem.vendor != null &&
|
|
334
|
-
lineItem.vendor.id != null &&
|
|
335
|
-
Boolean(lineItem.vendor.id) === true) ||
|
|
336
|
-
(isVendorTransactionAvailable
|
|
337
|
-
? transactionDetailLocalData.customer != null &&
|
|
338
|
-
transactionDetailLocalData.customer.id != null &&
|
|
339
|
-
Boolean(transactionDetailLocalData.customer.id) === true
|
|
340
|
-
: lineItem.customer != null &&
|
|
341
|
-
lineItem.customer.id != null &&
|
|
342
|
-
Boolean(lineItem.customer.id) === true));
|
|
266
|
+
: ((_e = lineItem.vendor) === null || _e === void 0 ? void 0 : _e.id) != null && Boolean(lineItem.vendor.id) === true);
|
|
343
267
|
});
|
|
344
268
|
};
|
|
345
269
|
exports.checkIfAllLineItemsAreCategoryClassFilled = checkIfAllLineItemsAreCategoryClassFilled;
|
|
@@ -22,23 +22,23 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
22
22
|
failedJeSchedules: JEScheduledTransactionPayload[];
|
|
23
23
|
selectedPeriod: MonthYearPeriod;
|
|
24
24
|
refreshViewInBackground: boolean;
|
|
25
|
-
}, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
26
|
-
jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
25
|
+
}, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
|
|
26
|
+
jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
27
27
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
28
28
|
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeSchedule", never, never>, ignoreRecommendedJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
29
29
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
30
30
|
status: ZeniAPIStatus;
|
|
31
|
-
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
32
|
-
jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
31
|
+
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
|
|
32
|
+
jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
33
33
|
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
|
|
34
|
-
jeScheduleTransactionKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
35
|
-
}, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
36
|
-
failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
34
|
+
jeScheduleTransactionKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
|
|
35
|
+
}, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
36
|
+
failedJeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
37
37
|
selectedPeriod: MonthYearPeriod;
|
|
38
38
|
}, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
39
39
|
scheduledJournalEntryID: ID;
|
|
40
|
-
}, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
41
|
-
jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
40
|
+
}, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
41
|
+
jeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
42
42
|
selectedPeriod: MonthYearPeriod;
|
|
43
43
|
}, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
44
44
|
scheduledJournalEntryID: ID;
|
|
@@ -59,8 +59,8 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
59
59
|
}, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
60
60
|
scheduledJournalEntryID: ID;
|
|
61
61
|
localData: Partial<JEScheduleLocalData>;
|
|
62
|
-
}, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
63
|
-
jeScheduleKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}
|
|
62
|
+
}, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[], selectedPeriod: MonthYearPeriod], {
|
|
63
|
+
jeScheduleKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
|
|
64
64
|
selectedPeriod: MonthYearPeriod;
|
|
65
65
|
}, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
66
66
|
status: ZeniAPIStatus;
|
|
@@ -4,7 +4,6 @@ import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePerio
|
|
|
4
4
|
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
6
6
|
import { ClassBase } from '../../../entity/class/classState';
|
|
7
|
-
import { CustomerBase } from '../../../entity/customer/customerState';
|
|
8
7
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
9
8
|
import { RecommendationByLineId, TransactionID } from '../../../entity/transaction/stateTypes/transaction';
|
|
10
9
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
@@ -77,22 +76,12 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
77
76
|
selectedTransaction: SupportedTransaction;
|
|
78
77
|
uncategorizedAccounts: UncategorizedAccounts;
|
|
79
78
|
updatedVendor?: VendorBase;
|
|
80
|
-
|
|
81
|
-
}, "expenseAutomationTransactionsView/updateSelectedVendorForTransaction">, updateSelectedCustomerForTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
82
|
-
selectedTab: TransactionsTab;
|
|
83
|
-
transactionId: ID;
|
|
84
|
-
lineId: ID;
|
|
85
|
-
selectedTransaction: SupportedTransaction;
|
|
86
|
-
uncategorizedAccounts: UncategorizedAccounts;
|
|
87
|
-
updatedCustomer?: CustomerBase;
|
|
88
|
-
selectedEntity?: Entity;
|
|
89
|
-
}, "expenseAutomationTransactionsView/updateSelectedCustomerForTransaction">, setAllItemsToCategoryClassInLocalDataForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, lineId: string, transactions: SupportedTransaction[], uncategorizedAccounts: UncategorizedAccounts, vendorId?: string | undefined, customerId?: string | undefined, selectedAccount?: AccountBase | undefined, selectedClassBase?: ClassBase | undefined, lineEntity?: Entity | undefined, recommendations?: Recommendation[] | undefined], {
|
|
79
|
+
}, "expenseAutomationTransactionsView/updateSelectedVendorForTransaction">, setAllItemsToCategoryClassInLocalDataForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, lineId: string, transactions: SupportedTransaction[], uncategorizedAccounts: UncategorizedAccounts, vendorId?: string | undefined, selectedAccount?: AccountBase | undefined, selectedClassBase?: ClassBase | undefined, lineEntity?: Entity | undefined, recommendations?: Recommendation[] | undefined], {
|
|
90
80
|
selectedTab: "review" | "autoCategorized";
|
|
91
81
|
transactionId: string;
|
|
92
82
|
lineId: string;
|
|
93
83
|
transactions: SupportedTransaction[];
|
|
94
84
|
vendorId: string | undefined;
|
|
95
|
-
customerId: string | undefined;
|
|
96
85
|
lineEntity: Entity | undefined;
|
|
97
86
|
selectedAccount: AccountBase | undefined;
|
|
98
87
|
selectedClassBase: ClassBase | undefined;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.updateSelectedTransactionId = exports.setEntityRecommendationForLineIdsForCategorization = exports.clearExpenseAutomationTransactionsView = exports.clearExpenseAutomationTransactionsViewPerTabView = exports.updateSelectedCheckboxTransactionIds = exports.fetchTransactionCategorizationView = exports.fetchTransactionCategorizationSuccess = exports.updateTotalCountForTransactionCategorization = exports.setAllItemsToCategoryClassInLocalDataForCategorization = exports.
|
|
7
|
+
exports.updateSelectedTransactionId = exports.setEntityRecommendationForLineIdsForCategorization = exports.clearExpenseAutomationTransactionsView = exports.clearExpenseAutomationTransactionsViewPerTabView = exports.updateSelectedCheckboxTransactionIds = exports.fetchTransactionCategorizationView = exports.fetchTransactionCategorizationSuccess = exports.updateTotalCountForTransactionCategorization = exports.setAllItemsToCategoryClassInLocalDataForCategorization = exports.updateSelectedVendorForTransaction = exports.updateStatusForTransactionNotMiscategorizedUpdate = exports.markTransactionAsNotMiscategorized = exports.updateTransactionCategorizationSaveStatus = exports.updateCurrentSelectedTransactionCategorizationTab = exports.updateTransactionCategorization = exports.saveTransactionCategorization = exports.fetchTransactionCategorizationFailure = exports.saveTransactionCategorizationLocalData = exports.initializeTransactionCategorizationViewLocalData = exports.updateTransactionCategorizationUIState = exports.fetchTransactionCategorization = exports.initialState = exports.initialTransactionTabViewState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
@@ -261,7 +261,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
261
261
|
},
|
|
262
262
|
setAllItemsToCategoryClassInLocalDataForCategorization: {
|
|
263
263
|
reducer(draft, action) {
|
|
264
|
-
const { vendorId,
|
|
264
|
+
const { vendorId, selectedAccount, selectedClassBase, transactions, transactionId, lineId, selectedTab, uncategorizedAccounts, } = action.payload;
|
|
265
265
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
266
266
|
.transactionReviewLocalDataById, transactionId, undefined);
|
|
267
267
|
const existingAccount = transactionLocalData === null || transactionLocalData === void 0 ? void 0 : transactionLocalData.transactionReviewLocalData.lineItemById[lineId].account;
|
|
@@ -285,7 +285,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
285
285
|
];
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
if (vendorId != null
|
|
288
|
+
if (vendorId != null) {
|
|
289
289
|
transactions.forEach((transaction) => {
|
|
290
290
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
291
291
|
.transactionReviewLocalDataById, transaction.id, undefined);
|
|
@@ -294,13 +294,13 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
294
294
|
transactionId: transaction.id,
|
|
295
295
|
transactionReviewLocalData: (0, transactionCategorizationLocalDataHelper_1.toSetAllLineItemsToCategoryClass)(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, (existingAccount === null || existingAccount === void 0 ? void 0 : existingAccount.accountId) !== (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId)
|
|
296
296
|
? 'category'
|
|
297
|
-
: 'class', uncategorizedAccounts, vendorId,
|
|
297
|
+
: 'class', uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase),
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
|
-
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId,
|
|
303
|
+
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase, lineEntity, recommendations) {
|
|
304
304
|
return {
|
|
305
305
|
payload: {
|
|
306
306
|
selectedTab,
|
|
@@ -308,7 +308,6 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
308
308
|
lineId,
|
|
309
309
|
transactions,
|
|
310
310
|
vendorId,
|
|
311
|
-
customerId,
|
|
312
311
|
lineEntity,
|
|
313
312
|
selectedAccount,
|
|
314
313
|
selectedClassBase,
|
|
@@ -367,58 +366,6 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
367
366
|
draft.transactionCategorizationView[selectedTab].error =
|
|
368
367
|
action.payload.status;
|
|
369
368
|
},
|
|
370
|
-
updateSelectedCustomerForTransaction(draft, action) {
|
|
371
|
-
const { transactionId, lineId, updatedCustomer, selectedTransaction, selectedTab, uncategorizedAccounts, } = action.payload;
|
|
372
|
-
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
373
|
-
.transactionReviewLocalDataById, transactionId, undefined);
|
|
374
|
-
if (transactionLocalData != null) {
|
|
375
|
-
let newTransactionLocalData = Object.assign({}, transactionLocalData.transactionReviewLocalData);
|
|
376
|
-
if (!(0, vendorTransaction_1.isVendorTransaction)(selectedTransaction) &&
|
|
377
|
-
updatedCustomer != null) {
|
|
378
|
-
newTransactionLocalData = Object.assign(Object.assign({}, newTransactionLocalData), { lineItemById: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById), { [lineId]: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById[lineId]), { customer: updatedCustomer, selectedEntityLine: action.payload.selectedEntity != null
|
|
379
|
-
? action.payload.selectedEntity
|
|
380
|
-
: undefined }) }) });
|
|
381
|
-
}
|
|
382
|
-
else {
|
|
383
|
-
if (action.payload.selectedEntity != null) {
|
|
384
|
-
newTransactionLocalData.selectedEntity =
|
|
385
|
-
action.payload.selectedEntity;
|
|
386
|
-
}
|
|
387
|
-
newTransactionLocalData.customerUpdates =
|
|
388
|
-
updatedCustomer != null && updatedCustomer.id != null
|
|
389
|
-
? {
|
|
390
|
-
id: updatedCustomer.id,
|
|
391
|
-
name: updatedCustomer.name,
|
|
392
|
-
qboId: updatedCustomer.id,
|
|
393
|
-
}
|
|
394
|
-
: undefined;
|
|
395
|
-
newTransactionLocalData.customer =
|
|
396
|
-
updatedCustomer != null && updatedCustomer.id != null
|
|
397
|
-
? {
|
|
398
|
-
id: updatedCustomer.id,
|
|
399
|
-
name: updatedCustomer.name,
|
|
400
|
-
logo: updatedCustomer.logo,
|
|
401
|
-
}
|
|
402
|
-
: undefined;
|
|
403
|
-
}
|
|
404
|
-
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transactionId] = {
|
|
405
|
-
transactionReviewLocalData: newTransactionLocalData,
|
|
406
|
-
transactionId,
|
|
407
|
-
};
|
|
408
|
-
const selectedCheckBoxTransactionIds = draft.transactionCategorizationView[selectedTab]
|
|
409
|
-
.selectedCheckBoxTransactionIds;
|
|
410
|
-
if (newTransactionLocalData.customer != null &&
|
|
411
|
-
newTransactionLocalData.customer.id != null &&
|
|
412
|
-
(0, transactionCategorizationLocalDataHelper_1.checkIfAllLineItemsAreCategoryClassFilled)(selectedTransaction, newTransactionLocalData, uncategorizedAccounts) === true && // check if all line items are filled
|
|
413
|
-
selectedCheckBoxTransactionIds.length < transactionCategorizationLocalDataHelper_1.MAX_SELECTION_LIMIT &&
|
|
414
|
-
selectedCheckBoxTransactionIds.includes(transactionId) === false) {
|
|
415
|
-
draft.transactionCategorizationView[selectedTab].selectedCheckBoxTransactionIds = [
|
|
416
|
-
...selectedCheckBoxTransactionIds,
|
|
417
|
-
transactionId,
|
|
418
|
-
];
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
},
|
|
422
369
|
updateSelectedVendorForTransaction(draft, action) {
|
|
423
370
|
const { transactionId, lineId, updatedVendor, selectedTransaction, selectedTab, uncategorizedAccounts, } = action.payload;
|
|
424
371
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
@@ -427,15 +374,9 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
427
374
|
let newTransactionLocalData = Object.assign({}, transactionLocalData.transactionReviewLocalData);
|
|
428
375
|
if (!(0, vendorTransaction_1.isVendorTransaction)(selectedTransaction) &&
|
|
429
376
|
updatedVendor != null) {
|
|
430
|
-
newTransactionLocalData = Object.assign(Object.assign({}, newTransactionLocalData), { lineItemById: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById), { [lineId]: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById[lineId]), { vendor: updatedVendor
|
|
431
|
-
? action.payload.selectedEntity
|
|
432
|
-
: undefined }) }) });
|
|
377
|
+
newTransactionLocalData = Object.assign(Object.assign({}, newTransactionLocalData), { lineItemById: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById), { [lineId]: Object.assign(Object.assign({}, transactionLocalData.transactionReviewLocalData.lineItemById[lineId]), { vendor: updatedVendor }) }) });
|
|
433
378
|
}
|
|
434
379
|
else {
|
|
435
|
-
if (action.payload.selectedEntity != null) {
|
|
436
|
-
newTransactionLocalData.selectedEntity =
|
|
437
|
-
action.payload.selectedEntity;
|
|
438
|
-
}
|
|
439
380
|
newTransactionLocalData.vendorUpdates =
|
|
440
381
|
updatedVendor != null && updatedVendor.id != null
|
|
441
382
|
? {
|
|
@@ -561,5 +502,5 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
561
502
|
},
|
|
562
503
|
},
|
|
563
504
|
});
|
|
564
|
-
_a = expenseAutomationTransactionsView.actions, exports.fetchTransactionCategorization = _a.fetchTransactionCategorization, exports.updateTransactionCategorizationUIState = _a.updateTransactionCategorizationUIState, exports.initializeTransactionCategorizationViewLocalData = _a.initializeTransactionCategorizationViewLocalData, exports.saveTransactionCategorizationLocalData = _a.saveTransactionCategorizationLocalData, exports.fetchTransactionCategorizationFailure = _a.fetchTransactionCategorizationFailure, exports.saveTransactionCategorization = _a.saveTransactionCategorization, exports.updateTransactionCategorization = _a.updateTransactionCategorization, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab, exports.updateTransactionCategorizationSaveStatus = _a.updateTransactionCategorizationSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateSelectedVendorForTransaction = _a.updateSelectedVendorForTransaction, exports.
|
|
505
|
+
_a = expenseAutomationTransactionsView.actions, exports.fetchTransactionCategorization = _a.fetchTransactionCategorization, exports.updateTransactionCategorizationUIState = _a.updateTransactionCategorizationUIState, exports.initializeTransactionCategorizationViewLocalData = _a.initializeTransactionCategorizationViewLocalData, exports.saveTransactionCategorizationLocalData = _a.saveTransactionCategorizationLocalData, exports.fetchTransactionCategorizationFailure = _a.fetchTransactionCategorizationFailure, exports.saveTransactionCategorization = _a.saveTransactionCategorization, exports.updateTransactionCategorization = _a.updateTransactionCategorization, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab, exports.updateTransactionCategorizationSaveStatus = _a.updateTransactionCategorizationSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateSelectedVendorForTransaction = _a.updateSelectedVendorForTransaction, exports.setAllItemsToCategoryClassInLocalDataForCategorization = _a.setAllItemsToCategoryClassInLocalDataForCategorization, exports.updateTotalCountForTransactionCategorization = _a.updateTotalCountForTransactionCategorization, exports.fetchTransactionCategorizationSuccess = _a.fetchTransactionCategorizationSuccess, exports.fetchTransactionCategorizationView = _a.fetchTransactionCategorizationView, exports.updateSelectedCheckboxTransactionIds = _a.updateSelectedCheckboxTransactionIds, exports.clearExpenseAutomationTransactionsViewPerTabView = _a.clearExpenseAutomationTransactionsViewPerTabView, exports.clearExpenseAutomationTransactionsView = _a.clearExpenseAutomationTransactionsView, exports.setEntityRecommendationForLineIdsForCategorization = _a.setEntityRecommendationForLineIdsForCategorization, exports.updateSelectedTransactionId = _a.updateSelectedTransactionId;
|
|
565
506
|
exports.default = expenseAutomationTransactionsView.reducer;
|
package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { TransactionsTab } from '../types/transactionsViewState';
|
|
|
9
9
|
import { ExpenseAutomationFluxAnalysisViewSelector } from './fluxAnalysisViewSelectorTypes';
|
|
10
10
|
import { ExpenseAutomationJESchedulesViewSelector } from './jeSchedulesSelectorTypes';
|
|
11
11
|
import { ExpenseAutomationMissingReceiptsViewSelector } from './missingReceiptsSelectorTypes';
|
|
12
|
-
import { ExpenseAutomationReconciliationViewSelector } from './reconciliationViewSelectorTypes';
|
|
13
12
|
import { ExpenseAutomationTransactionViewSelector } from './transactionsViewSelectorTypes';
|
|
14
13
|
export interface ExpenseAutomationStepDetails {
|
|
15
14
|
step: ExpenseAutomationViewType;
|
|
@@ -30,7 +29,6 @@ export interface ExpenseAutomationViewSelector extends SelectorView {
|
|
|
30
29
|
jeSchedules: ExpenseAutomationJESchedulesViewSelector;
|
|
31
30
|
missingReceipts: ExpenseAutomationMissingReceiptsViewSelector;
|
|
32
31
|
fluxAnalysis: ExpenseAutomationFluxAnalysisViewSelector;
|
|
33
|
-
reconciliation: ExpenseAutomationReconciliationViewSelector;
|
|
34
32
|
monthEndInsights?: CompanyMonthEndReportSelectorView;
|
|
35
33
|
saveStatus: FetchStateAndError;
|
|
36
34
|
updateStatus: FetchStateAndError;
|
|
@@ -19,7 +19,7 @@ const getAllSteps = (monthEndCloseChecksState, monthYearId, tenantId, auditSumma
|
|
|
19
19
|
isPrevDisabled: false,
|
|
20
20
|
isNextDisabled: false,
|
|
21
21
|
};
|
|
22
|
-
case '
|
|
22
|
+
case 'account_recon':
|
|
23
23
|
case 'je_schedules':
|
|
24
24
|
case 'missing_receipts':
|
|
25
25
|
case 'flux_analysis':
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
|
-
const
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
8
5
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
9
6
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
10
7
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -42,7 +39,7 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
42
39
|
!fixedAssetLabelAccountIds.includes(account.accountId));
|
|
43
40
|
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
44
41
|
const allClasses = allClassList.classes.map((classData) => {
|
|
45
|
-
return (0,
|
|
42
|
+
return (0, lodash_1.omit)(classData, ['accountIds', 'key']);
|
|
46
43
|
});
|
|
47
44
|
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountTypes.accountListKey).filter((account) => account.accountId[0] != null &&
|
|
48
45
|
scheduleDetailAccountIds.includes(account.accountId[0]));
|
|
@@ -4,7 +4,7 @@ import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/
|
|
|
4
4
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
5
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
6
|
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
7
|
-
declare const toFluxAnalysisSortKey: (v: string) => "
|
|
7
|
+
declare const toFluxAnalysisSortKey: (v: string) => "class" | "vendor" | "category";
|
|
8
8
|
export type FluxAnalysisSortKey = ReturnType<typeof toFluxAnalysisSortKey>;
|
|
9
9
|
export type FluxAnalysisActionType = 'review' | 'unreview';
|
|
10
10
|
export type FluxAnalysisReviewStatus = 'Pending Review' | 'Reviewed';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
-
export declare const toMissingReceiptsSortKey: (v: string) => "
|
|
4
|
+
export declare const toMissingReceiptsSortKey: (v: string) => "class" | "date" | "vendor" | "amount" | "category";
|
|
5
5
|
export type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
|
|
6
6
|
export interface MissingReceiptsViewUIState {
|
|
7
7
|
searchString: string;
|
|
@@ -15,11 +15,11 @@ import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
|
15
15
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
16
16
|
import { EntityRecommendationKey } from '../../recommendation/recommendationState';
|
|
17
17
|
import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
18
|
-
export declare const toTransactionsSortKey: (v: string) => "
|
|
18
|
+
export declare const toTransactionsSortKey: (v: string) => "class" | "date" | "vendor" | "amount" | "transaction_type" | "category";
|
|
19
19
|
export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
20
20
|
export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
|
|
21
21
|
export type TransactionsTab = ReturnType<typeof toTransactionsTabKey>;
|
|
22
|
-
export declare const getTransactionCategorizationKey: (transactionId: TransactionID, lineId: ID) => `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}
|
|
22
|
+
export declare const getTransactionCategorizationKey: (transactionId: TransactionID, lineId: ID) => `${string}_transfer_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
|
|
23
23
|
export type TransactionCategorizationKey = ReturnType<typeof getTransactionCategorizationKey>;
|
|
24
24
|
export interface TransactionsViewUIState {
|
|
25
25
|
searchString: string;
|
|
@@ -55,30 +55,21 @@ export interface TransactionCategorizationLineItemData extends TransactionLineBa
|
|
|
55
55
|
lineEntity?: Entity;
|
|
56
56
|
isCategoryMiscategorized: boolean;
|
|
57
57
|
isClassMiscategorized: boolean;
|
|
58
|
-
selectedEntityLine?: Entity;
|
|
59
58
|
}
|
|
60
59
|
export interface TransactionReviewLocalData {
|
|
61
60
|
lineItemById: Record<ID, TransactionCategorizationLineItemData>;
|
|
62
61
|
sortedLineItems: ID[];
|
|
63
62
|
vendor?: VendorBase;
|
|
64
|
-
customer?: CustomerBase;
|
|
65
63
|
memo?: string;
|
|
66
64
|
vendorDetails?: {
|
|
67
65
|
id: ID;
|
|
68
66
|
qboId: string;
|
|
69
67
|
name: string;
|
|
70
68
|
};
|
|
71
|
-
customerDetails?: {
|
|
72
|
-
id: ID;
|
|
73
|
-
qboId: string;
|
|
74
|
-
name: string;
|
|
75
|
-
};
|
|
76
69
|
transactionDate?: ZeniDate;
|
|
77
70
|
transactionType?: TransactionType;
|
|
78
71
|
transactionTypeName?: string;
|
|
79
72
|
vendorUpdates?: TransactionVendorUpdates;
|
|
80
|
-
customerUpdates?: TransactionVendorUpdates;
|
|
81
|
-
selectedEntity?: Entity;
|
|
82
73
|
}
|
|
83
74
|
export interface SupportedTransactionCategorization {
|
|
84
75
|
transactionReviewLocalData: TransactionReviewLocalData;
|
|
@@ -112,7 +103,6 @@ export interface TransactionUpdates {
|
|
|
112
103
|
memo?: string;
|
|
113
104
|
updatesByLineId: Record<ID, TransactionLineUpdates>;
|
|
114
105
|
vendorId?: ID;
|
|
115
|
-
customerId?: ID;
|
|
116
106
|
}
|
|
117
107
|
export interface EntityRelatedRecommendationUpdates {
|
|
118
108
|
entityId: ID;
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
thisPeriod: TimeframeTick;
|
|
18
18
|
coaBalances: COABalance[];
|
|
19
19
|
maxNumOfPeriodsToHighlight: number;
|
|
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" | "charge_cards" | "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" | "
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"billing" | "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" | "charge_cards" | "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" | "flux_analysis_operating_expense", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
firstMonthOfFY: Month;
|
|
22
22
|
isCompareModeOn: boolean;
|
|
23
23
|
additionalBalances: COABalanceType[];
|
|
@@ -29,7 +29,10 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
29
29
|
reducer(draft) {
|
|
30
30
|
draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
|
|
31
31
|
},
|
|
32
|
-
prepare(userId, fetchSelectedTab = true,
|
|
32
|
+
prepare(userId, fetchSelectedTab = true, // eslint-disable-line @typescript-eslint/no-inferrable-types,
|
|
33
|
+
fetchFullReport = false, // eslint-disable-line @typescript-eslint/no-inferrable-types,
|
|
34
|
+
cacheOverride = false // eslint-disable-line @typescript-eslint/no-inferrable-types
|
|
35
|
+
) {
|
|
33
36
|
return {
|
|
34
37
|
payload: { userId, fetchSelectedTab, fetchFullReport, cacheOverride },
|
|
35
38
|
};
|
|
@@ -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" | "charge_cards" | "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" | "
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "billing" | "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" | "charge_cards" | "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" | "flux_analysis_operating_expense" | 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" | "charge_cards" | "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" | "
|
|
8
|
+
context: "billing" | "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" | "charge_cards" | "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" | "flux_analysis_operating_expense" | 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<{
|
|
@@ -15,10 +15,10 @@ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCrea
|
|
|
15
15
|
merchantName: string | undefined;
|
|
16
16
|
}, "globalMerchantView/fetchGlobalMerchantRecommendation", never, never>, fetchGlobalMerchantRecommendationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<VendorReviewViewAllRecommendationsPayload, "globalMerchantView/fetchGlobalMerchantRecommendationSuccess">, fetchGlobalMerchantRecommendationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
17
|
status: ZeniAPIStatus;
|
|
18
|
-
}, "globalMerchantView/fetchGlobalMerchantRecommendationFailure">, updateCreateGlobalMerchantLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[globalMerchantName: string, currentSelection: NewGlobalMerchantCurrentSelection, globalMerchantWebsiteUrl?: import("url-parse")<
|
|
18
|
+
}, "globalMerchantView/fetchGlobalMerchantRecommendationFailure">, updateCreateGlobalMerchantLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[globalMerchantName: string, currentSelection: NewGlobalMerchantCurrentSelection, globalMerchantWebsiteUrl?: import("url-parse")<string> | import("url-parse")<Record<string, string | undefined>> | undefined], {
|
|
19
19
|
globalMerchantName: string;
|
|
20
20
|
currentSelection: NewGlobalMerchantCurrentSelection;
|
|
21
|
-
globalMerchantWebsiteUrl: import("url-parse")<
|
|
21
|
+
globalMerchantWebsiteUrl: import("url-parse")<string> | import("url-parse")<Record<string, string | undefined>> | undefined;
|
|
22
22
|
}, "globalMerchantView/updateCreateGlobalMerchantLocalData", never, never>, clearGlobalMerchantView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"globalMerchantView/clearGlobalMerchantView">;
|
|
23
23
|
declare const _default: import("redux").Reducer<GlobalMerchantViewState>;
|
|
24
24
|
export default _default;
|