@zeniai/client-epic-state 5.2.58-beta1ND → 5.2.58-betaNB1
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/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/reconciliationReport/reconciliationReportPayload.d.ts +123 -0
- package/lib/entity/reconciliationReport/reconciliationReportPayload.js +2 -0
- package/lib/entity/reconciliationReport/reconciliationReportReducer.d.ts +7 -0
- package/lib/entity/reconciliationReport/reconciliationReportReducer.js +172 -0
- package/lib/entity/reconciliationReport/reconciliationReportSelector.d.ts +3 -0
- package/lib/entity/reconciliationReport/reconciliationReportSelector.js +10 -0
- package/lib/entity/reconciliationReport/reconciliationReportState.d.ts +132 -0
- package/lib/entity/reconciliationReport/reconciliationReportState.js +15 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -0
- package/lib/esm/entity/reconciliationReport/reconciliationReportPayload.js +1 -0
- package/lib/esm/entity/reconciliationReport/reconciliationReportReducer.js +167 -0
- package/lib/esm/entity/reconciliationReport/reconciliationReportSelector.js +4 -0
- package/lib/esm/entity/reconciliationReport/reconciliationReportState.js +10 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/epic.js +2 -0
- package/lib/esm/index.js +4 -2
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/recommendation/recommendationPayload.js +1 -3
- package/lib/esm/view/recommendation/recommendationReducer.js +7 -27
- package/lib/esm/view/recommendation/recommendationSelector.js +0 -1
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +8 -20
- package/lib/esm/view/reconciliationReportView/epic/fetchReconciliationReportEpic.js +29 -0
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewPayload.js +1 -0
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewReducer.js +44 -0
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewSelector.js +10 -0
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewState.js +1 -0
- package/lib/index.d.ts +5 -2
- package/lib/index.js +38 -36
- package/lib/reducer.d.ts +2 -0
- package/lib/reducer.js +6 -0
- package/lib/rootStateTypes.d.ts +4 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/recommendation/recommendationPayload.d.ts +0 -1
- package/lib/view/recommendation/recommendationPayload.js +0 -5
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -7
- package/lib/view/recommendation/recommendationReducer.js +8 -28
- package/lib/view/recommendation/recommendationSelector.d.ts +0 -2
- package/lib/view/recommendation/recommendationSelector.js +1 -3
- package/lib/view/recommendation/recommendationState.d.ts +1 -2
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +2 -2
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +6 -18
- package/lib/view/reconciliationReportView/epic/fetchReconciliationReportEpic.d.ts +19 -0
- package/lib/view/reconciliationReportView/epic/fetchReconciliationReportEpic.js +33 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewPayload.d.ts +3 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewPayload.js +2 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewReducer.d.ts +13 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewReducer.js +48 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewSelector.d.ts +9 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewSelector.js +13 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewState.d.ts +4 -0
- package/lib/view/reconciliationReportView/reconciliationReportViewState.js +2 -0
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export declare const toOneTimeAccrualStatusCodeType: (v: string) => "draft" | "p
|
|
|
19
19
|
export type OneTimeAccrualStatusCodeType = ReturnType<typeof toOneTimeAccrualStatusCodeType>;
|
|
20
20
|
export declare const toOneTimeAccrualOriginType: (v: string) => "agent" | "human";
|
|
21
21
|
export type OneTimeAccrualOriginType = ReturnType<typeof toOneTimeAccrualOriginType>;
|
|
22
|
-
export declare const toOneTimeAccrualAutomationTierType: (v: string) => "
|
|
22
|
+
export declare const toOneTimeAccrualAutomationTierType: (v: string) => "manual" | "auto" | "draft";
|
|
23
23
|
export type OneTimeAccrualAutomationTierType = ReturnType<typeof toOneTimeAccrualAutomationTierType>;
|
|
24
24
|
export declare const toOneTimeAccrualReversalPolicyType: (v: string) => "on_bill_match" | "scheduled_date";
|
|
25
25
|
export type OneTimeAccrualReversalPolicyType = ReturnType<typeof toOneTimeAccrualReversalPolicyType>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { StatusCodeWithLabelPayload } from '../../commonPayloadTypes/statusPayload';
|
|
2
|
+
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
3
|
+
import { ID } from '../../commonStateTypes/common';
|
|
4
|
+
export interface ReconciliationReportAccountPayload {
|
|
5
|
+
account_id: ID;
|
|
6
|
+
account_name?: string | null;
|
|
7
|
+
account_type?: string | null;
|
|
8
|
+
coa_id?: string | null;
|
|
9
|
+
financial_institution?: string | null;
|
|
10
|
+
gl_account_name?: string | null;
|
|
11
|
+
last_4_digits?: string | null;
|
|
12
|
+
masked_account_number?: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ReconciliationReportPeriodPayload {
|
|
15
|
+
end_date?: string | null;
|
|
16
|
+
start_date?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface ReconciliationReportReconciledByPayload {
|
|
19
|
+
name?: string | null;
|
|
20
|
+
user_id?: ID | null;
|
|
21
|
+
}
|
|
22
|
+
export interface ReconciliationReportAiMatchPayload {
|
|
23
|
+
auto_matched_count: number;
|
|
24
|
+
cleared_count: number;
|
|
25
|
+
manually_matched_count: number;
|
|
26
|
+
}
|
|
27
|
+
export interface ReconciliationReportAfterPeriodEndPayload {
|
|
28
|
+
cleared_amount: number;
|
|
29
|
+
uncleared_amount: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ReconciliationReportDifferencePayload {
|
|
32
|
+
amount?: number | null;
|
|
33
|
+
}
|
|
34
|
+
export interface ReconciliationReportCountAmountPayload {
|
|
35
|
+
amount: number;
|
|
36
|
+
count: number;
|
|
37
|
+
}
|
|
38
|
+
export interface ReconciliationReportStatementPayload {
|
|
39
|
+
deposits_cleared: ReconciliationReportCountAmountPayload;
|
|
40
|
+
payments_cleared: ReconciliationReportCountAmountPayload;
|
|
41
|
+
closing_balance?: number | null;
|
|
42
|
+
opening_balance?: number | null;
|
|
43
|
+
}
|
|
44
|
+
export interface ReconciliationReportRegisterPayload {
|
|
45
|
+
outstanding_as_of_period_end: number;
|
|
46
|
+
balance_as_of_period_end?: number | null;
|
|
47
|
+
balance_as_of_reconciled_at?: number | null;
|
|
48
|
+
}
|
|
49
|
+
export interface ReconciliationReportTransactionRowPayload {
|
|
50
|
+
amount: number;
|
|
51
|
+
match: string;
|
|
52
|
+
payee: string;
|
|
53
|
+
type: string;
|
|
54
|
+
age_days?: number | null;
|
|
55
|
+
cleared_balance?: number;
|
|
56
|
+
date?: string | null;
|
|
57
|
+
gl_account?: string | null;
|
|
58
|
+
issue_date?: string | null;
|
|
59
|
+
reference_number?: string | null;
|
|
60
|
+
transaction_id?: ID | null;
|
|
61
|
+
}
|
|
62
|
+
export interface ReconciliationReportBucketPayload {
|
|
63
|
+
amount: number;
|
|
64
|
+
count: number;
|
|
65
|
+
transactions: ReconciliationReportTransactionRowPayload[];
|
|
66
|
+
}
|
|
67
|
+
export interface ReconciliationReportPaymentsDepositsPayload {
|
|
68
|
+
deposits: ReconciliationReportBucketPayload;
|
|
69
|
+
payments: ReconciliationReportBucketPayload;
|
|
70
|
+
}
|
|
71
|
+
export interface ReconciliationReportBridgePayload {
|
|
72
|
+
uncleared_deposits: number;
|
|
73
|
+
uncleared_payments: number;
|
|
74
|
+
bank_closing?: number | null;
|
|
75
|
+
computed_ledger_closing?: number | null;
|
|
76
|
+
ledger_closing?: number | null;
|
|
77
|
+
variance?: number | null;
|
|
78
|
+
}
|
|
79
|
+
export interface ReconciliationReportSummaryPayload {
|
|
80
|
+
bridge: ReconciliationReportBridgePayload;
|
|
81
|
+
cleared_deposits: ReconciliationReportCountAmountPayload;
|
|
82
|
+
cleared_payments: ReconciliationReportCountAmountPayload;
|
|
83
|
+
uncleared_as_of_statement_date: {
|
|
84
|
+
deposits: ReconciliationReportCountAmountPayload;
|
|
85
|
+
payments: ReconciliationReportCountAmountPayload;
|
|
86
|
+
};
|
|
87
|
+
cleared_after_statement_date?: ReconciliationReportCountAmountPayload | null;
|
|
88
|
+
closing_balance?: number | null;
|
|
89
|
+
ledger_balance_as_of_reconciled_on?: number | null;
|
|
90
|
+
ledger_closing_as_of_statement_date?: number | null;
|
|
91
|
+
opening_balance?: number | null;
|
|
92
|
+
uncleared_after_statement_date?: ReconciliationReportCountAmountPayload | null;
|
|
93
|
+
variance?: number | null;
|
|
94
|
+
}
|
|
95
|
+
export interface ReconciliationReportDetailsPayload {
|
|
96
|
+
carried_forward: ReconciliationReportPaymentsDepositsPayload;
|
|
97
|
+
cleared: ReconciliationReportPaymentsDepositsPayload;
|
|
98
|
+
uncleared_as_of_statement_date: ReconciliationReportPaymentsDepositsPayload;
|
|
99
|
+
deposits_cleared?: ReconciliationReportTransactionRowPayload[];
|
|
100
|
+
payments_cleared?: ReconciliationReportTransactionRowPayload[];
|
|
101
|
+
}
|
|
102
|
+
export interface ReconciliationReportPayload {
|
|
103
|
+
account: ReconciliationReportAccountPayload;
|
|
104
|
+
after_period_end: ReconciliationReportAfterPeriodEndPayload;
|
|
105
|
+
ai_match: ReconciliationReportAiMatchPayload;
|
|
106
|
+
currency: CurrencyPayload;
|
|
107
|
+
data_source: string;
|
|
108
|
+
details: ReconciliationReportDetailsPayload;
|
|
109
|
+
difference: ReconciliationReportDifferencePayload;
|
|
110
|
+
disclaimer: string;
|
|
111
|
+
locked: boolean;
|
|
112
|
+
period: ReconciliationReportPeriodPayload;
|
|
113
|
+
reconciled_by: ReconciliationReportReconciledByPayload;
|
|
114
|
+
reconciliation_id: ID;
|
|
115
|
+
register: ReconciliationReportRegisterPayload;
|
|
116
|
+
statement: ReconciliationReportStatementPayload;
|
|
117
|
+
status: StatusCodeWithLabelPayload;
|
|
118
|
+
summary: ReconciliationReportSummaryPayload;
|
|
119
|
+
company_name?: string | null;
|
|
120
|
+
reconciled_at?: string | null;
|
|
121
|
+
report_reference?: string | null;
|
|
122
|
+
statement_date?: string | null;
|
|
123
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReconciliationReportPayload } from './reconciliationReportPayload';
|
|
2
|
+
import { ReconciliationReport, ReconciliationReportState } from './reconciliationReportState';
|
|
3
|
+
export declare const initialState: ReconciliationReportState;
|
|
4
|
+
export declare const updateReconciliationReport: import("@reduxjs/toolkit").ActionCreatorWithPayload<ReconciliationReportPayload, "reconciliationReport/updateReconciliationReport">, removeReconciliationReport: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "reconciliationReport/removeReconciliationReport">;
|
|
5
|
+
declare const _default: import("redux").Reducer<ReconciliationReportState>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare function mapReconciliationReportPayloadToReconciliationReport(payload: ReconciliationReportPayload): ReconciliationReport;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.removeReconciliationReport = exports.updateReconciliationReport = exports.initialState = void 0;
|
|
5
|
+
exports.mapReconciliationReportPayloadToReconciliationReport = mapReconciliationReportPayloadToReconciliationReport;
|
|
6
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
|
|
8
|
+
const amount_1 = require("../../commonStateTypes/amount");
|
|
9
|
+
const rootActions_1 = require("../../rootActions");
|
|
10
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
11
|
+
const accountReconState_1 = require("../accountRecon/accountReconState");
|
|
12
|
+
const reconciliationReportState_1 = require("./reconciliationReportState");
|
|
13
|
+
exports.initialState = {
|
|
14
|
+
reportsByReconciliationId: {},
|
|
15
|
+
};
|
|
16
|
+
const reconciliationReport = (0, toolkit_1.createSlice)({
|
|
17
|
+
name: 'reconciliationReport',
|
|
18
|
+
initialState: exports.initialState,
|
|
19
|
+
reducers: {
|
|
20
|
+
updateReconciliationReport(draft, action) {
|
|
21
|
+
const report = mapReconciliationReportPayloadToReconciliationReport(action.payload);
|
|
22
|
+
draft.reportsByReconciliationId[report.reconciliationId] = report;
|
|
23
|
+
},
|
|
24
|
+
removeReconciliationReport(draft, action) {
|
|
25
|
+
delete draft.reportsByReconciliationId[action.payload];
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
extraReducers: (builder) => {
|
|
29
|
+
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
30
|
+
Object.assign(draft, exports.initialState);
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
_a = reconciliationReport.actions, exports.updateReconciliationReport = _a.updateReconciliationReport, exports.removeReconciliationReport = _a.removeReconciliationReport;
|
|
35
|
+
exports.default = reconciliationReport.reducer;
|
|
36
|
+
function toOptionalAmount(amount, currency) {
|
|
37
|
+
if (amount == null) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return (0, amount_1.toAmountWC)(amount, currency);
|
|
41
|
+
}
|
|
42
|
+
function toOptionalDate(value) {
|
|
43
|
+
if (value == null || value === '') {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
return (0, zeniDayJS_1.date)(value);
|
|
47
|
+
}
|
|
48
|
+
function mapCountAmount(payload, currency) {
|
|
49
|
+
return {
|
|
50
|
+
count: payload.count,
|
|
51
|
+
amount: (0, amount_1.toAmountWC)(payload.amount, currency),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function mapTransactionRow(payload, currency) {
|
|
55
|
+
return {
|
|
56
|
+
transactionId: payload.transaction_id ?? undefined,
|
|
57
|
+
date: toOptionalDate(payload.date),
|
|
58
|
+
type: payload.type,
|
|
59
|
+
payee: payload.payee,
|
|
60
|
+
match: (0, reconciliationReportState_1.toReconciliationReportMatchType)(payload.match),
|
|
61
|
+
amount: (0, amount_1.toAmountWC)(payload.amount, currency),
|
|
62
|
+
clearedBalance: payload.cleared_balance != null
|
|
63
|
+
? (0, amount_1.toAmountWC)(payload.cleared_balance, currency)
|
|
64
|
+
: undefined,
|
|
65
|
+
glAccount: payload.gl_account ?? undefined,
|
|
66
|
+
referenceNumber: payload.reference_number ?? undefined,
|
|
67
|
+
issueDate: toOptionalDate(payload.issue_date),
|
|
68
|
+
ageDays: payload.age_days ?? undefined,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function mapBucket(payload, currency) {
|
|
72
|
+
return {
|
|
73
|
+
count: payload.count,
|
|
74
|
+
amount: (0, amount_1.toAmountWC)(payload.amount, currency),
|
|
75
|
+
transactions: payload.transactions.map((transaction) => mapTransactionRow(transaction, currency)),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function mapPaymentsDeposits(payload, currency) {
|
|
79
|
+
return {
|
|
80
|
+
payments: mapBucket(payload.payments, currency),
|
|
81
|
+
deposits: mapBucket(payload.deposits, currency),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function mapReconciliationReportPayloadToReconciliationReport(payload) {
|
|
85
|
+
const currency = (0, viewAndReportPayloadv2_1.mapCurrencyPayloadToCurrency)(payload.currency);
|
|
86
|
+
return {
|
|
87
|
+
reconciliationId: payload.reconciliation_id,
|
|
88
|
+
companyName: payload.company_name ?? undefined,
|
|
89
|
+
account: {
|
|
90
|
+
accountId: payload.account.account_id,
|
|
91
|
+
accountName: payload.account.account_name ?? undefined,
|
|
92
|
+
accountType: payload.account.account_type ?? undefined,
|
|
93
|
+
last4Digits: payload.account.last_4_digits ?? undefined,
|
|
94
|
+
maskedAccountNumber: payload.account.masked_account_number ?? undefined,
|
|
95
|
+
financialInstitution: payload.account.financial_institution ?? undefined,
|
|
96
|
+
glAccountName: payload.account.gl_account_name ?? undefined,
|
|
97
|
+
coaId: payload.account.coa_id ?? undefined,
|
|
98
|
+
},
|
|
99
|
+
period: {
|
|
100
|
+
startDate: toOptionalDate(payload.period.start_date),
|
|
101
|
+
endDate: toOptionalDate(payload.period.end_date),
|
|
102
|
+
},
|
|
103
|
+
statementDate: toOptionalDate(payload.statement_date),
|
|
104
|
+
dataSource: (0, reconciliationReportState_1.toReconciliationReportDataSource)(payload.data_source),
|
|
105
|
+
currency,
|
|
106
|
+
status: {
|
|
107
|
+
code: (0, accountReconState_1.toReconciliationStatusCodeType)(payload.status.code),
|
|
108
|
+
label: payload.status.label,
|
|
109
|
+
},
|
|
110
|
+
reconciledAt: toOptionalDate(payload.reconciled_at),
|
|
111
|
+
reconciledBy: {
|
|
112
|
+
userId: payload.reconciled_by.user_id ?? undefined,
|
|
113
|
+
name: payload.reconciled_by.name ?? undefined,
|
|
114
|
+
},
|
|
115
|
+
disclaimer: payload.disclaimer,
|
|
116
|
+
reportReference: payload.report_reference ?? undefined,
|
|
117
|
+
locked: payload.locked,
|
|
118
|
+
difference: toOptionalAmount(payload.difference.amount, currency),
|
|
119
|
+
aiMatch: {
|
|
120
|
+
autoMatchedCount: payload.ai_match.auto_matched_count,
|
|
121
|
+
manuallyMatchedCount: payload.ai_match.manually_matched_count,
|
|
122
|
+
clearedCount: payload.ai_match.cleared_count,
|
|
123
|
+
},
|
|
124
|
+
afterPeriodEnd: {
|
|
125
|
+
unclearedAmount: (0, amount_1.toAmountWC)(payload.after_period_end.uncleared_amount, currency),
|
|
126
|
+
clearedAmount: (0, amount_1.toAmountWC)(payload.after_period_end.cleared_amount, currency),
|
|
127
|
+
},
|
|
128
|
+
statement: {
|
|
129
|
+
openingBalance: toOptionalAmount(payload.statement.opening_balance, currency),
|
|
130
|
+
paymentsCleared: mapCountAmount(payload.statement.payments_cleared, currency),
|
|
131
|
+
depositsCleared: mapCountAmount(payload.statement.deposits_cleared, currency),
|
|
132
|
+
closingBalance: toOptionalAmount(payload.statement.closing_balance, currency),
|
|
133
|
+
},
|
|
134
|
+
register: {
|
|
135
|
+
balanceAsOfPeriodEnd: toOptionalAmount(payload.register.balance_as_of_period_end, currency),
|
|
136
|
+
outstandingAsOfPeriodEnd: (0, amount_1.toAmountWC)(payload.register.outstanding_as_of_period_end, currency),
|
|
137
|
+
balanceAsOfReconciledAt: toOptionalAmount(payload.register.balance_as_of_reconciled_at, currency),
|
|
138
|
+
},
|
|
139
|
+
summary: {
|
|
140
|
+
openingBalance: toOptionalAmount(payload.summary.opening_balance, currency),
|
|
141
|
+
clearedPayments: mapCountAmount(payload.summary.cleared_payments, currency),
|
|
142
|
+
clearedDeposits: mapCountAmount(payload.summary.cleared_deposits, currency),
|
|
143
|
+
closingBalance: toOptionalAmount(payload.summary.closing_balance, currency),
|
|
144
|
+
unclearedAsOfStatementDate: {
|
|
145
|
+
payments: mapCountAmount(payload.summary.uncleared_as_of_statement_date.payments, currency),
|
|
146
|
+
deposits: mapCountAmount(payload.summary.uncleared_as_of_statement_date.deposits, currency),
|
|
147
|
+
},
|
|
148
|
+
ledgerClosingAsOfStatementDate: toOptionalAmount(payload.summary.ledger_closing_as_of_statement_date, currency),
|
|
149
|
+
clearedAfterStatementDate: payload.summary.cleared_after_statement_date != null
|
|
150
|
+
? mapCountAmount(payload.summary.cleared_after_statement_date, currency)
|
|
151
|
+
: undefined,
|
|
152
|
+
unclearedAfterStatementDate: payload.summary.uncleared_after_statement_date != null
|
|
153
|
+
? mapCountAmount(payload.summary.uncleared_after_statement_date, currency)
|
|
154
|
+
: undefined,
|
|
155
|
+
ledgerBalanceAsOfReconciledOn: toOptionalAmount(payload.summary.ledger_balance_as_of_reconciled_on, currency),
|
|
156
|
+
bridge: {
|
|
157
|
+
bankClosing: toOptionalAmount(payload.summary.bridge.bank_closing, currency),
|
|
158
|
+
unclearedDeposits: (0, amount_1.toAmountWC)(payload.summary.bridge.uncleared_deposits, currency),
|
|
159
|
+
unclearedPayments: (0, amount_1.toAmountWC)(payload.summary.bridge.uncleared_payments, currency),
|
|
160
|
+
computedLedgerClosing: toOptionalAmount(payload.summary.bridge.computed_ledger_closing, currency),
|
|
161
|
+
ledgerClosing: toOptionalAmount(payload.summary.bridge.ledger_closing, currency),
|
|
162
|
+
variance: toOptionalAmount(payload.summary.bridge.variance, currency),
|
|
163
|
+
},
|
|
164
|
+
variance: toOptionalAmount(payload.summary.variance, currency),
|
|
165
|
+
},
|
|
166
|
+
details: {
|
|
167
|
+
cleared: mapPaymentsDeposits(payload.details.cleared, currency),
|
|
168
|
+
carriedForward: mapPaymentsDeposits(payload.details.carried_forward, currency),
|
|
169
|
+
unclearedAsOfStatementDate: mapPaymentsDeposits(payload.details.uncleared_as_of_statement_date, currency),
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ReconciliationReport, ReconciliationReportState } from './reconciliationReportState';
|
|
3
|
+
export declare function getReconciliationReportByReconciliationId(reconciliationReportState: ReconciliationReportState, reconciliationId: ID): ReconciliationReport | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getReconciliationReportByReconciliationId = getReconciliationReportByReconciliationId;
|
|
7
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
+
function getReconciliationReportByReconciliationId(reconciliationReportState, reconciliationId) {
|
|
9
|
+
return (0, get_1.default)(reconciliationReportState.reportsByReconciliationId, reconciliationId, undefined);
|
|
10
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Amount, Currency } from '../../commonStateTypes/amount';
|
|
2
|
+
import { ID } from '../../commonStateTypes/common';
|
|
3
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
4
|
+
import { ReconciliationStatusCodeType } from '../accountRecon/accountReconState';
|
|
5
|
+
declare const RECONCILIATION_REPORT_MATCH_TYPE: readonly ["automatic", "manual"];
|
|
6
|
+
export type ReconciliationReportMatchType = (typeof RECONCILIATION_REPORT_MATCH_TYPE)[number];
|
|
7
|
+
export declare const toReconciliationReportMatchType: (value: string) => ReconciliationReportMatchType;
|
|
8
|
+
export declare const toReconciliationReportDataSource: (value: string) => "Statement" | "Plaid";
|
|
9
|
+
export type ReconciliationReportDataSource = ReturnType<typeof toReconciliationReportDataSource>;
|
|
10
|
+
export interface ReconciliationReportAccount {
|
|
11
|
+
accountId: ID;
|
|
12
|
+
accountName?: string;
|
|
13
|
+
accountType?: string;
|
|
14
|
+
coaId?: string;
|
|
15
|
+
financialInstitution?: string;
|
|
16
|
+
glAccountName?: string;
|
|
17
|
+
last4Digits?: string;
|
|
18
|
+
maskedAccountNumber?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ReconciliationReportPeriod {
|
|
21
|
+
endDate?: ZeniDate;
|
|
22
|
+
startDate?: ZeniDate;
|
|
23
|
+
}
|
|
24
|
+
export interface ReconciliationReportReconciledBy {
|
|
25
|
+
name?: string;
|
|
26
|
+
userId?: ID;
|
|
27
|
+
}
|
|
28
|
+
export interface ReconciliationReportStatus {
|
|
29
|
+
code: ReconciliationStatusCodeType;
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ReconciliationReportAiMatch {
|
|
33
|
+
autoMatchedCount: number;
|
|
34
|
+
clearedCount: number;
|
|
35
|
+
manuallyMatchedCount: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ReconciliationReportAfterPeriodEnd {
|
|
38
|
+
clearedAmount: Amount;
|
|
39
|
+
unclearedAmount: Amount;
|
|
40
|
+
}
|
|
41
|
+
export interface ReconciliationReportCountAmount {
|
|
42
|
+
amount: Amount;
|
|
43
|
+
count: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ReconciliationReportStatement {
|
|
46
|
+
depositsCleared: ReconciliationReportCountAmount;
|
|
47
|
+
paymentsCleared: ReconciliationReportCountAmount;
|
|
48
|
+
closingBalance?: Amount;
|
|
49
|
+
openingBalance?: Amount;
|
|
50
|
+
}
|
|
51
|
+
export interface ReconciliationReportRegister {
|
|
52
|
+
outstandingAsOfPeriodEnd: Amount;
|
|
53
|
+
balanceAsOfPeriodEnd?: Amount;
|
|
54
|
+
balanceAsOfReconciledAt?: Amount;
|
|
55
|
+
}
|
|
56
|
+
export interface ReconciliationReportTransactionRow {
|
|
57
|
+
amount: Amount;
|
|
58
|
+
match: ReconciliationReportMatchType;
|
|
59
|
+
payee: string;
|
|
60
|
+
type: string;
|
|
61
|
+
ageDays?: number;
|
|
62
|
+
clearedBalance?: Amount;
|
|
63
|
+
date?: ZeniDate;
|
|
64
|
+
glAccount?: string;
|
|
65
|
+
issueDate?: ZeniDate;
|
|
66
|
+
referenceNumber?: string;
|
|
67
|
+
transactionId?: ID;
|
|
68
|
+
}
|
|
69
|
+
export interface ReconciliationReportBucket {
|
|
70
|
+
amount: Amount;
|
|
71
|
+
count: number;
|
|
72
|
+
transactions: ReconciliationReportTransactionRow[];
|
|
73
|
+
}
|
|
74
|
+
export interface ReconciliationReportPaymentsDeposits {
|
|
75
|
+
deposits: ReconciliationReportBucket;
|
|
76
|
+
payments: ReconciliationReportBucket;
|
|
77
|
+
}
|
|
78
|
+
export interface ReconciliationReportBridge {
|
|
79
|
+
unclearedDeposits: Amount;
|
|
80
|
+
unclearedPayments: Amount;
|
|
81
|
+
bankClosing?: Amount;
|
|
82
|
+
computedLedgerClosing?: Amount;
|
|
83
|
+
ledgerClosing?: Amount;
|
|
84
|
+
variance?: Amount;
|
|
85
|
+
}
|
|
86
|
+
export interface ReconciliationReportSummary {
|
|
87
|
+
bridge: ReconciliationReportBridge;
|
|
88
|
+
clearedDeposits: ReconciliationReportCountAmount;
|
|
89
|
+
clearedPayments: ReconciliationReportCountAmount;
|
|
90
|
+
unclearedAsOfStatementDate: {
|
|
91
|
+
deposits: ReconciliationReportCountAmount;
|
|
92
|
+
payments: ReconciliationReportCountAmount;
|
|
93
|
+
};
|
|
94
|
+
clearedAfterStatementDate?: ReconciliationReportCountAmount;
|
|
95
|
+
closingBalance?: Amount;
|
|
96
|
+
ledgerBalanceAsOfReconciledOn?: Amount;
|
|
97
|
+
ledgerClosingAsOfStatementDate?: Amount;
|
|
98
|
+
openingBalance?: Amount;
|
|
99
|
+
unclearedAfterStatementDate?: ReconciliationReportCountAmount;
|
|
100
|
+
variance?: Amount;
|
|
101
|
+
}
|
|
102
|
+
export interface ReconciliationReportDetails {
|
|
103
|
+
carriedForward: ReconciliationReportPaymentsDeposits;
|
|
104
|
+
cleared: ReconciliationReportPaymentsDeposits;
|
|
105
|
+
unclearedAsOfStatementDate: ReconciliationReportPaymentsDeposits;
|
|
106
|
+
}
|
|
107
|
+
export interface ReconciliationReport {
|
|
108
|
+
account: ReconciliationReportAccount;
|
|
109
|
+
afterPeriodEnd: ReconciliationReportAfterPeriodEnd;
|
|
110
|
+
aiMatch: ReconciliationReportAiMatch;
|
|
111
|
+
currency: Currency;
|
|
112
|
+
dataSource: ReconciliationReportDataSource;
|
|
113
|
+
details: ReconciliationReportDetails;
|
|
114
|
+
disclaimer: string;
|
|
115
|
+
locked: boolean;
|
|
116
|
+
period: ReconciliationReportPeriod;
|
|
117
|
+
reconciledBy: ReconciliationReportReconciledBy;
|
|
118
|
+
reconciliationId: ID;
|
|
119
|
+
register: ReconciliationReportRegister;
|
|
120
|
+
statement: ReconciliationReportStatement;
|
|
121
|
+
status: ReconciliationReportStatus;
|
|
122
|
+
summary: ReconciliationReportSummary;
|
|
123
|
+
companyName?: string;
|
|
124
|
+
difference?: Amount;
|
|
125
|
+
reconciledAt?: ZeniDate;
|
|
126
|
+
reportReference?: string;
|
|
127
|
+
statementDate?: ZeniDate;
|
|
128
|
+
}
|
|
129
|
+
export interface ReconciliationReportState {
|
|
130
|
+
reportsByReconciliationId: Record<ID, ReconciliationReport>;
|
|
131
|
+
}
|
|
132
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toReconciliationReportDataSource = exports.toReconciliationReportMatchType = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
+
const RECONCILIATION_REPORT_MATCH_TYPE = ['automatic', 'manual'];
|
|
6
|
+
const toReconciliationReportMatchType = (value) => {
|
|
7
|
+
if (value === 'auto') {
|
|
8
|
+
return 'automatic';
|
|
9
|
+
}
|
|
10
|
+
return (0, stringToUnion_1.stringToUnion)(value, RECONCILIATION_REPORT_MATCH_TYPE);
|
|
11
|
+
};
|
|
12
|
+
exports.toReconciliationReportMatchType = toReconciliationReportMatchType;
|
|
13
|
+
const RECONCILIATION_REPORT_DATA_SOURCE = ['Statement', 'Plaid'];
|
|
14
|
+
const toReconciliationReportDataSource = (value) => (0, stringToUnion_1.stringToUnion)(value, RECONCILIATION_REPORT_DATA_SOURCE);
|
|
15
|
+
exports.toReconciliationReportDataSource = toReconciliationReportDataSource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSnackbarMessageSection: (v: string) => "common" | "
|
|
1
|
+
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
3
|
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
@@ -4,7 +4,6 @@ exports.toSnackbarMessageSectionTexts = exports.toSnackbarMessageSection = void
|
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
5
|
const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
6
6
|
'common',
|
|
7
|
-
'recommendation_feedback',
|
|
8
7
|
'transactionDetails_updatingPastTransactions',
|
|
9
8
|
'transactionDetails_transactionUpdated',
|
|
10
9
|
'cockpit_month_end_email_sent',
|