@zeniai/client-epic-state 4.20.2-betaJK4 → 4.20.2-betaNB2
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/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountReducer.d.ts +2 -5
- package/lib/entity/account/accountReducer.js +2 -7
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.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/forecast/forecastState.d.ts +1 -1
- 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/transaction/payloadTypes/transactionPayload.js +0 -1
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -1
- package/lib/esm/epic.js +1 -3
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -151
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -69
- package/lib/index.d.ts +4 -4
- package/lib/index.js +31 -33
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -33
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +3 -14
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -152
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -11
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -69
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -12
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
|
@@ -5,7 +5,7 @@ import { ZeniDate } from '../../zeniDayJS';
|
|
|
5
5
|
import { AuditSummary } from '../reviewCompanyView/reviewCompanyViewState';
|
|
6
6
|
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "transactions" | "reports";
|
|
7
7
|
export type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
|
|
8
|
-
declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "
|
|
8
|
+
declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "uncategorized-expense" | "uncategorized-income";
|
|
9
9
|
export type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
|
|
10
10
|
export declare const toAuditRuleTypeIdType: (v: string) => "accounting" | "business";
|
|
11
11
|
type AuditRuleTypeIdType = ReturnType<typeof toAuditRuleTypeIdType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getBillPayCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCardBalance: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCashBalance: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
|
|
|
15
15
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
16
16
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
17
17
|
availableNumberOfPeriods: number | undefined;
|
|
18
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
18
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
19
19
|
reportTitle: string;
|
|
20
20
|
version: string | number | undefined;
|
|
21
21
|
status: import("../..").Status | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
|
|
|
12
12
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
13
13
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
14
14
|
availableNumberOfPeriods: number | undefined;
|
|
15
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
15
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
16
16
|
reportTitle: string;
|
|
17
17
|
version: string | number | undefined;
|
|
18
18
|
status: import("../..").Status | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
9
|
+
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -56,17 +56,22 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
56
56
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
57
57
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
58
58
|
const updateActions = [];
|
|
59
|
-
|
|
60
|
-
updateActions.push((0,
|
|
59
|
+
updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'));
|
|
60
|
+
updateActions.push((0, userReducer_1.updateAllUsers)({
|
|
61
61
|
users: response.data.users ?? [],
|
|
62
62
|
updateType: 'merge',
|
|
63
|
-
})
|
|
63
|
+
}));
|
|
64
|
+
updateActions.push((0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }));
|
|
65
|
+
const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
|
|
66
|
+
updateActions.push((0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'));
|
|
67
|
+
updateActions.push((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
|
|
64
68
|
const reviewTabLocalData = (0, exports.prepareReviewTabLocalData)(response.data.reconciliation[0]?.transactions?.review ?? []);
|
|
65
69
|
if (accountId != null) {
|
|
66
70
|
const selectedTransactionIds = (0, saveReconciliationDetailEpic_1.getTransactionIdFromCheckedMatchedTransactionPayload)(response.data.reconciliation[0].transactions.reconcile);
|
|
67
71
|
updateActions.push((0, reconciliationViewReducer_1.updateReconcileTabLocalData)({
|
|
68
72
|
selectedTransactionIds: selectedTransactionIds,
|
|
69
|
-
})
|
|
73
|
+
}));
|
|
74
|
+
updateActions.push((0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
|
|
70
75
|
}
|
|
71
76
|
updateActions.push((0, reconciliationViewReducer_1.fetchReconciliationSuccess)(selectedPeriod, response.data, refreshViewInBackground, accountId));
|
|
72
77
|
return (0, rxjs_1.from)(updateActions);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StatusCodeWithLabelPayload } from '../../../commonPayloadTypes/statusPayload';
|
|
2
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
3
2
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
4
3
|
import { AccountPayload } from '../../../entity/account/accountPayload';
|
|
5
4
|
import { ReconciliationDataPayload, StatementMetaDataPayload, TransactionsToReviewPayload } from '../../../entity/accountRecon/accountReconPayload';
|
|
@@ -13,20 +12,11 @@ import { BalancesLocalData, SaveReconcileDetailActionPayload } from '../types/re
|
|
|
13
12
|
export interface AccountAndPaymentAccountPayload extends AccountPayload {
|
|
14
13
|
payment_account_id: string | null;
|
|
15
14
|
}
|
|
16
|
-
interface ExclusionInfoPayload {
|
|
17
|
-
bank_balance: number | null;
|
|
18
|
-
cleared_balance: number | null;
|
|
19
|
-
variance: number | null;
|
|
20
|
-
}
|
|
21
|
-
export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload {
|
|
22
|
-
exclusion_info: ExclusionInfoPayload;
|
|
23
|
-
}
|
|
24
15
|
export interface ReconciliationPayload {
|
|
25
16
|
accounts: AccountAndPaymentAccountPayload[];
|
|
26
17
|
files: FilePayload[];
|
|
27
18
|
reconciliation: ReconciliationDataPayload[];
|
|
28
19
|
users: UserPayload[];
|
|
29
|
-
excluded_accounts?: ExcludedAccountPayload[];
|
|
30
20
|
}
|
|
31
21
|
export type ReconciliationResponse = ZeniAPIResponse<ReconciliationPayload>;
|
|
32
22
|
export interface SaveReconciliationReviewPayload {
|
|
@@ -39,28 +29,6 @@ export declare function createSaveReconciliationPayloadBasedOnActionAndMethod(st
|
|
|
39
29
|
review: TransactionsToReviewPayload[];
|
|
40
30
|
};
|
|
41
31
|
};
|
|
42
|
-
export interface ExcludeAccountFromReconciliationRequestPayload {
|
|
43
|
-
account_id: ID;
|
|
44
|
-
bank_balance: number;
|
|
45
|
-
cleared_balance: number;
|
|
46
|
-
variance: number;
|
|
47
|
-
}
|
|
48
|
-
export interface ExcludedAccountFromReconciliationPayload {
|
|
49
|
-
account_id: ID;
|
|
50
|
-
bank_balance: number | null;
|
|
51
|
-
cleared_balance: number | null;
|
|
52
|
-
variance: number | null;
|
|
53
|
-
currency_code?: string;
|
|
54
|
-
currency_symbol?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface ExcludeAccountFromReconciliationResponsePayload {
|
|
57
|
-
excluded_account: ExcludedAccountFromReconciliationPayload;
|
|
58
|
-
}
|
|
59
|
-
export type ExcludeAccountFromReconciliationResponse = ZeniAPIResponse<ExcludeAccountFromReconciliationResponsePayload>;
|
|
60
|
-
export interface IncludeAccountInReconciliationResponsePayload {
|
|
61
|
-
reconciliation: ReconciliationDataPayload;
|
|
62
|
-
}
|
|
63
|
-
export type IncludeAccountInReconciliationResponse = ZeniAPIResponse<IncludeAccountInReconciliationResponsePayload>;
|
|
64
32
|
export interface DeleteStatementResponsePayload {
|
|
65
33
|
statement_upload: {
|
|
66
34
|
statement_data_status: StatusCodeWithLabelPayload;
|
|
@@ -86,4 +54,3 @@ export interface UploadStatementResponsePayload {
|
|
|
86
54
|
};
|
|
87
55
|
}
|
|
88
56
|
export type UploadStatementResponse = ZeniAPIResponse<UploadStatementResponsePayload>;
|
|
89
|
-
export {};
|
|
@@ -2,10 +2,9 @@ import { Amount } from '../../../commonStateTypes/amount';
|
|
|
2
2
|
import { FetchState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
4
4
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
5
|
-
import { ReconciliationDataPayload } from '../../../entity/accountRecon/accountReconPayload';
|
|
6
5
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
7
|
-
import {
|
|
8
|
-
import { AccountReconciliationLocalData, ActionFetchStates,
|
|
6
|
+
import { ReconciliationPayload, UploadStatementDocumentAIPayload } from '../payload/reconciliationPayload';
|
|
7
|
+
import { AccountReconciliationLocalData, ActionFetchStates, ReconReconcileSortKey, ReconReviewSortKey, ReconciliationReviewTabLocalData, ReconciliationTabsState, ReconciliationViewState, ReconciliationViewTabType, SaveReconcileDetailActionPayload, SaveReconciliationDetailFailurePayload, TransactionSummary } from '../types/reconciliationViewState';
|
|
9
8
|
export declare const initialReconciliationTabsState: ReconciliationTabsState;
|
|
10
9
|
export declare const initialActionFetchState: ActionFetchStates;
|
|
11
10
|
export declare const initialState: ReconciliationViewState;
|
|
@@ -87,17 +86,7 @@ export declare const fetchReconciliation: import("@reduxjs/toolkit").ActionCreat
|
|
|
87
86
|
accountId: ID;
|
|
88
87
|
error: ZeniAPIStatus;
|
|
89
88
|
selectedPeriod: MonthYearPeriod;
|
|
90
|
-
}, "expenseAutomationReconciliationView/deleteAccountStatementFailure">,
|
|
91
|
-
selectedPeriod: MonthYearPeriod;
|
|
92
|
-
account?: ExcludedAccountFromReconciliationPayload;
|
|
93
|
-
}, "expenseAutomationReconciliationView/excludeAccountFromReconciliationSuccess">, excludeAccountFromReconciliationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
94
|
-
error: ZeniAPIStatus;
|
|
95
|
-
}, "expenseAutomationReconciliationView/excludeAccountFromReconciliationFailure">, includeAccountInReconciliation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ExcludeAccountFromReconciliationPayload], ExcludeAccountFromReconciliationPayload, "expenseAutomationReconciliationView/includeAccountInReconciliation", never, never>, includeAccountInReconciliationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
96
|
-
selectedPeriod: MonthYearPeriod;
|
|
97
|
-
reconciliation?: ReconciliationDataPayload;
|
|
98
|
-
}, "expenseAutomationReconciliationView/includeAccountInReconciliationSuccess">, includeAccountInReconciliationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
99
|
-
error: ZeniAPIStatus;
|
|
100
|
-
}, "expenseAutomationReconciliationView/includeAccountInReconciliationFailure">, uploadAccountStatement: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
89
|
+
}, "expenseAutomationReconciliationView/deleteAccountStatementFailure">, uploadAccountStatement: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
90
|
accountId: ID;
|
|
102
91
|
payload: UploadStatementDocumentAIPayload;
|
|
103
92
|
selectedPeriod: MonthYearPeriod;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.
|
|
4
|
+
exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const accountState_1 = require("../../../entity/account/accountState");
|
|
@@ -41,15 +41,7 @@ exports.initialReconciliationTabsState = {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
exports.initialActionFetchState = {
|
|
44
|
-
excludeAccountFetch: {
|
|
45
|
-
fetchState: 'Not-Started',
|
|
46
|
-
error: undefined,
|
|
47
|
-
},
|
|
48
44
|
excludeFetchById: {},
|
|
49
|
-
includeAccountFetch: {
|
|
50
|
-
fetchState: 'Not-Started',
|
|
51
|
-
error: undefined,
|
|
52
|
-
},
|
|
53
45
|
reconcileFetch: {
|
|
54
46
|
fetchState: 'Not-Started',
|
|
55
47
|
error: undefined,
|
|
@@ -63,7 +55,6 @@ exports.initialActionFetchState = {
|
|
|
63
55
|
exports.initialState = {
|
|
64
56
|
accountReconciliationRecordsBySelectedPeriod: {},
|
|
65
57
|
accountConnectionStatusByAccountID: {},
|
|
66
|
-
excludedAccountExclusionInfo: {},
|
|
67
58
|
fetchState: 'Not-Started',
|
|
68
59
|
error: undefined,
|
|
69
60
|
selectedTab: 'review',
|
|
@@ -77,7 +68,6 @@ exports.initialState = {
|
|
|
77
68
|
scrollTop: 0,
|
|
78
69
|
},
|
|
79
70
|
},
|
|
80
|
-
excludedAccountIDs: [],
|
|
81
71
|
};
|
|
82
72
|
// Create slice with reducers
|
|
83
73
|
const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
@@ -146,7 +136,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
146
136
|
fetchReconciliationSuccess: {
|
|
147
137
|
reducer(draft, action) {
|
|
148
138
|
if (action.payload.accountId == null) {
|
|
149
|
-
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground
|
|
139
|
+
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
|
|
150
140
|
}
|
|
151
141
|
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
152
142
|
action.payload.reconciliation.accounts.length > 0) {
|
|
@@ -435,116 +425,6 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
435
425
|
...localData,
|
|
436
426
|
};
|
|
437
427
|
},
|
|
438
|
-
excludeAccountFromReconciliation: {
|
|
439
|
-
reducer(draft) {
|
|
440
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
441
|
-
fetchState: 'In-Progress',
|
|
442
|
-
error: undefined,
|
|
443
|
-
};
|
|
444
|
-
},
|
|
445
|
-
prepare(payload) {
|
|
446
|
-
return { payload };
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
excludeAccountFromReconciliationSuccess: (draft, action) => {
|
|
450
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
451
|
-
fetchState: 'Completed',
|
|
452
|
-
error: undefined,
|
|
453
|
-
};
|
|
454
|
-
const { account, selectedPeriod } = action.payload;
|
|
455
|
-
if (account != null) {
|
|
456
|
-
if (!draft.excludedAccountIDs.includes(account.account_id)) {
|
|
457
|
-
draft.excludedAccountIDs.push(account.account_id);
|
|
458
|
-
}
|
|
459
|
-
draft.excludedAccountExclusionInfo[account.account_id] = {
|
|
460
|
-
bankBalance: account.bank_balance != null
|
|
461
|
-
? {
|
|
462
|
-
amount: account.bank_balance,
|
|
463
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
464
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
465
|
-
}
|
|
466
|
-
: undefined,
|
|
467
|
-
clearedBalance: account.cleared_balance != null
|
|
468
|
-
? {
|
|
469
|
-
amount: account.cleared_balance,
|
|
470
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
471
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
472
|
-
}
|
|
473
|
-
: undefined,
|
|
474
|
-
variance: account.variance != null
|
|
475
|
-
? {
|
|
476
|
-
amount: account.variance,
|
|
477
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
478
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
479
|
-
}
|
|
480
|
-
: undefined,
|
|
481
|
-
};
|
|
482
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
483
|
-
if (draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId]
|
|
484
|
-
?.accountIDs != null) {
|
|
485
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
},
|
|
489
|
-
excludeAccountFromReconciliationFailure: (draft, action) => {
|
|
490
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
491
|
-
fetchState: 'Error',
|
|
492
|
-
error: action.payload.error,
|
|
493
|
-
};
|
|
494
|
-
},
|
|
495
|
-
includeAccountInReconciliation: {
|
|
496
|
-
reducer(draft) {
|
|
497
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
498
|
-
fetchState: 'In-Progress',
|
|
499
|
-
error: undefined,
|
|
500
|
-
};
|
|
501
|
-
},
|
|
502
|
-
prepare(payload) {
|
|
503
|
-
return { payload };
|
|
504
|
-
},
|
|
505
|
-
},
|
|
506
|
-
includeAccountInReconciliationSuccess: (draft, action) => {
|
|
507
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
508
|
-
fetchState: 'Completed',
|
|
509
|
-
error: undefined,
|
|
510
|
-
};
|
|
511
|
-
const { reconciliation, selectedPeriod } = action.payload;
|
|
512
|
-
if (reconciliation == null) {
|
|
513
|
-
return;
|
|
514
|
-
}
|
|
515
|
-
const accountId = reconciliation.account_id;
|
|
516
|
-
draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
|
|
517
|
-
delete draft.excludedAccountExclusionInfo[accountId];
|
|
518
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
519
|
-
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
|
|
520
|
-
if (accountReconciliationRecords != null) {
|
|
521
|
-
if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
|
|
522
|
-
accountReconciliationRecords.accountIDs.push(accountId);
|
|
523
|
-
}
|
|
524
|
-
accountReconciliationRecords.reconciliationByAccountID[accountId] = {
|
|
525
|
-
accountId,
|
|
526
|
-
reconciliationId: reconciliation.reconciliation_id ?? undefined,
|
|
527
|
-
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
528
|
-
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
529
|
-
statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
|
|
530
|
-
statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
531
|
-
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
532
|
-
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
533
|
-
localData: {},
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
537
|
-
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
538
|
-
connectionInProgress: false,
|
|
539
|
-
paymentAccountId: undefined,
|
|
540
|
-
};
|
|
541
|
-
},
|
|
542
|
-
includeAccountInReconciliationFailure: (draft, action) => {
|
|
543
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
544
|
-
fetchState: 'Error',
|
|
545
|
-
error: action.payload.error,
|
|
546
|
-
};
|
|
547
|
-
},
|
|
548
428
|
updateStatementUploadChosen: (draft, action) => {
|
|
549
429
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
550
430
|
},
|
|
@@ -554,38 +434,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
554
434
|
},
|
|
555
435
|
});
|
|
556
436
|
// Export actions
|
|
557
|
-
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.
|
|
437
|
+
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen;
|
|
558
438
|
// Export reducer
|
|
559
439
|
exports.default = expenseAutomationReconciliationView.reducer;
|
|
560
|
-
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground
|
|
561
|
-
draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
|
|
562
|
-
draft.excludedAccountExclusionInfo = {};
|
|
563
|
-
excludedAccounts.forEach((ea) => {
|
|
564
|
-
const { exclusion_info } = ea;
|
|
565
|
-
draft.excludedAccountExclusionInfo[ea.account_id] = {
|
|
566
|
-
bankBalance: exclusion_info.bank_balance != null
|
|
567
|
-
? {
|
|
568
|
-
amount: exclusion_info.bank_balance,
|
|
569
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
570
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
571
|
-
}
|
|
572
|
-
: undefined,
|
|
573
|
-
clearedBalance: exclusion_info.cleared_balance != null
|
|
574
|
-
? {
|
|
575
|
-
amount: exclusion_info.cleared_balance,
|
|
576
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
577
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
578
|
-
}
|
|
579
|
-
: undefined,
|
|
580
|
-
variance: exclusion_info.variance != null
|
|
581
|
-
? {
|
|
582
|
-
amount: exclusion_info.variance,
|
|
583
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
584
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
585
|
-
}
|
|
586
|
-
: undefined,
|
|
587
|
-
};
|
|
588
|
-
});
|
|
440
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
589
441
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
|
|
590
442
|
accountIDs: [],
|
|
591
443
|
reconciliationByAccountID: {},
|
|
@@ -3,7 +3,7 @@ import { Amount } from '../../../commonStateTypes/amount';
|
|
|
3
3
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
4
4
|
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
5
5
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
6
|
-
import {
|
|
6
|
+
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
7
|
import { AccountReconciliationEntity } from '../../../entity/accountRecon/accountReconSelector';
|
|
8
8
|
import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
|
|
9
9
|
import { ClassBase } from '../../../entity/class/classState';
|
|
@@ -13,11 +13,6 @@ import { AccountReconciliationLocalData, ActionFetchStates, ReconListUIState, Re
|
|
|
13
13
|
export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
|
|
14
14
|
declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
|
|
15
15
|
export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
|
|
16
|
-
export interface ExcludedAccountReconciliation extends Account {
|
|
17
|
-
bankBalance?: Amount;
|
|
18
|
-
clearedBalance?: Amount;
|
|
19
|
-
variance?: Amount;
|
|
20
|
-
}
|
|
21
16
|
export interface ExpenseAutomationReconciliationViewSelector {
|
|
22
17
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
23
18
|
accountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
@@ -29,12 +24,7 @@ export interface ExpenseAutomationReconciliationViewSelector {
|
|
|
29
24
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
30
25
|
completionStatus: CompletionStatusType;
|
|
31
26
|
creditCards: AccountBase[];
|
|
32
|
-
excludeAccountFetchState: FetchStateAndError;
|
|
33
|
-
excludedAccountIDs: ID[];
|
|
34
|
-
excludedAccountReconciliationByAccountID: Record<ID, ExcludedAccountReconciliation>;
|
|
35
|
-
excludedAccountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
36
27
|
fetchStatus: FetchStateAndError;
|
|
37
|
-
includeAccountFetchState: FetchStateAndError;
|
|
38
28
|
monthYearPeriod: MonthYearPeriod;
|
|
39
29
|
plaidConnectionDetails: PlaidConnectionDetails;
|
|
40
30
|
reconciliationTabsState: ReconciliationTabsState;
|
|
@@ -96,30 +96,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
96
96
|
totalVariancePercentage: undefined,
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
|
-
excludedAccountReconciliationByAccountID: {},
|
|
100
|
-
excludedAccountReconciliationBySectionID: {
|
|
101
|
-
assets: {
|
|
102
|
-
sectionId: 'assets',
|
|
103
|
-
accountIDs: [],
|
|
104
|
-
totalBankBalance: undefined,
|
|
105
|
-
totalClearedBalance: undefined,
|
|
106
|
-
totalReconciledBalance: undefined,
|
|
107
|
-
totalVariance: undefined,
|
|
108
|
-
totalVariancePercentage: undefined,
|
|
109
|
-
},
|
|
110
|
-
liabilities: {
|
|
111
|
-
sectionId: 'liabilities',
|
|
112
|
-
accountIDs: [],
|
|
113
|
-
totalBankBalance: undefined,
|
|
114
|
-
totalClearedBalance: undefined,
|
|
115
|
-
totalReconciledBalance: undefined,
|
|
116
|
-
totalVariance: undefined,
|
|
117
|
-
totalVariancePercentage: undefined,
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
121
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
122
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
123
99
|
};
|
|
124
100
|
}
|
|
125
101
|
const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
|
|
@@ -279,46 +255,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
279
255
|
totalVariancePercentage: liabilityTotals.variancePercentage,
|
|
280
256
|
},
|
|
281
257
|
};
|
|
282
|
-
const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
|
|
283
|
-
const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
|
|
284
|
-
const excludedAssetAccountIDs = [];
|
|
285
|
-
const excludedLiabilityAccountIDs = [];
|
|
286
|
-
reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
|
|
287
|
-
const isAsset = bankAccountIdSet.has(accountID);
|
|
288
|
-
const isLiability = creditCardIdSet.has(accountID);
|
|
289
|
-
if (!isAsset && !isLiability) {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
if (isAsset) {
|
|
293
|
-
excludedAssetAccountIDs.push(accountID);
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
excludedLiabilityAccountIDs.push(accountID);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
const excludedAccountReconciliationBySectionID = {
|
|
300
|
-
assets: {
|
|
301
|
-
sectionId: 'assets',
|
|
302
|
-
accountIDs: excludedAssetAccountIDs,
|
|
303
|
-
},
|
|
304
|
-
liabilities: {
|
|
305
|
-
sectionId: 'liabilities',
|
|
306
|
-
accountIDs: excludedLiabilityAccountIDs,
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
const excludedAccountReconciliationByAccountID = {};
|
|
310
|
-
const accountsInState = Object.values(accountState.accountsByKey);
|
|
311
|
-
const accountsInStateMap = new Map(accountsInState.map((a) => [a.accountId, a]));
|
|
312
|
-
reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
|
|
313
|
-
const account = accountsInStateMap.get(excludedAccountID);
|
|
314
|
-
const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
|
|
315
|
-
if (account != null) {
|
|
316
|
-
excludedAccountReconciliationByAccountID[excludedAccountID] = {
|
|
317
|
-
...account,
|
|
318
|
-
...exclusionInfo,
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
258
|
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
|
|
323
259
|
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
324
260
|
const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
@@ -379,11 +315,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
379
315
|
allClassList: allClasses,
|
|
380
316
|
reviewTabSelectedVendorByTransactionId,
|
|
381
317
|
reconListUIState: reconciliationViewState.reconListUIState,
|
|
382
|
-
excludedAccountReconciliationBySectionID,
|
|
383
|
-
excludedAccountReconciliationByAccountID,
|
|
384
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
385
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
386
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
387
318
|
};
|
|
388
319
|
});
|
|
389
320
|
const isAccountReconReport = (reportId) => {
|
|
@@ -74,18 +74,8 @@ export interface ReconciliationReviewTabLocalData {
|
|
|
74
74
|
matchedTransactionId?: ID;
|
|
75
75
|
vendor?: VendorBase;
|
|
76
76
|
}
|
|
77
|
-
export interface ExcludeAccountFromReconciliationPayload {
|
|
78
|
-
accountId: ID;
|
|
79
|
-
}
|
|
80
|
-
export interface ExclusionInfo {
|
|
81
|
-
bankBalance: Amount | undefined;
|
|
82
|
-
clearedBalance: Amount | undefined;
|
|
83
|
-
variance: Amount | undefined;
|
|
84
|
-
}
|
|
85
77
|
export interface ActionFetchStates {
|
|
86
|
-
excludeAccountFetch: FetchStateAndError;
|
|
87
78
|
excludeFetchById: Record<ID, FetchStateAndError>;
|
|
88
|
-
includeAccountFetch: FetchStateAndError;
|
|
89
79
|
reconcileFetch: FetchStateAndError;
|
|
90
80
|
saveForLaterFetch: FetchStateAndError;
|
|
91
81
|
saveReconciliationReviewFetch: Record<ID, FetchStateAndError>;
|
|
@@ -100,8 +90,6 @@ export interface ReconciliationViewState extends FetchStateAndError {
|
|
|
100
90
|
accountConnectionStatusByAccountID: Record<ID, BankConnectionStatus>;
|
|
101
91
|
accountReconciliationRecordsBySelectedPeriod: Record<MonthYearPeriodId, AccountReconciliationRecords>;
|
|
102
92
|
actionFetchState: ActionFetchStates;
|
|
103
|
-
excludedAccountExclusionInfo: Record<ID, ExclusionInfo>;
|
|
104
|
-
excludedAccountIDs: ID[];
|
|
105
93
|
reconListUIState: ReconListUIState;
|
|
106
94
|
reconTabsState: ReconciliationTabsState;
|
|
107
95
|
refreshStatus: FetchStateAndError;
|