@zeniai/client-epic-state 5.2.76-betaNB1 → 5.2.76-betaRD1
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/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +32 -30
- package/lib/entity/tenant/tenantReducer.js +13 -2
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/tenant/tenantTypes.d.ts +1 -1
- package/lib/entity/tenant/tenantTypes.js +1 -0
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +0 -2
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
- package/lib/esm/entity/tenant/tenantReducer.js +13 -2
- package/lib/esm/entity/tenant/tenantTypes.js +1 -0
- package/lib/esm/epic.js +0 -2
- package/lib/esm/index.js +0 -3
- package/lib/esm/reducer.js +1 -7
- package/lib/index.d.ts +0 -4
- package/lib/index.js +34 -39
- package/lib/reducer.d.ts +0 -2
- package/lib/reducer.js +1 -7
- package/lib/rootStateTypes.d.ts +1 -5
- package/package.json +1 -1
- package/lib/entity/reconciliationReport/reconciliationReportPayload.d.ts +0 -124
- package/lib/entity/reconciliationReport/reconciliationReportPayload.js +0 -2
- package/lib/entity/reconciliationReport/reconciliationReportReducer.d.ts +0 -7
- package/lib/entity/reconciliationReport/reconciliationReportReducer.js +0 -173
- package/lib/entity/reconciliationReport/reconciliationReportSelector.d.ts +0 -3
- package/lib/entity/reconciliationReport/reconciliationReportSelector.js +0 -10
- package/lib/entity/reconciliationReport/reconciliationReportState.d.ts +0 -133
- package/lib/entity/reconciliationReport/reconciliationReportState.js +0 -15
- package/lib/esm/entity/reconciliationReport/reconciliationReportPayload.js +0 -1
- package/lib/esm/entity/reconciliationReport/reconciliationReportReducer.js +0 -168
- package/lib/esm/entity/reconciliationReport/reconciliationReportSelector.js +0 -4
- package/lib/esm/entity/reconciliationReport/reconciliationReportState.js +0 -10
- package/lib/esm/view/reconciliationReportView/epic/fetchReconciliationReportEpic.js +0 -29
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewPayload.js +0 -1
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewReducer.js +0 -44
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewSelector.js +0 -10
- package/lib/esm/view/reconciliationReportView/reconciliationReportViewState.js +0 -1
- package/lib/view/reconciliationReportView/epic/fetchReconciliationReportEpic.d.ts +0 -19
- package/lib/view/reconciliationReportView/epic/fetchReconciliationReportEpic.js +0 -33
- package/lib/view/reconciliationReportView/reconciliationReportViewPayload.d.ts +0 -3
- package/lib/view/reconciliationReportView/reconciliationReportViewPayload.js +0 -2
- package/lib/view/reconciliationReportView/reconciliationReportViewReducer.d.ts +0 -13
- package/lib/view/reconciliationReportView/reconciliationReportViewReducer.js +0 -48
- package/lib/view/reconciliationReportView/reconciliationReportViewSelector.d.ts +0 -9
- package/lib/view/reconciliationReportView/reconciliationReportViewSelector.js +0 -13
- package/lib/view/reconciliationReportView/reconciliationReportViewState.d.ts +0 -4
- package/lib/view/reconciliationReportView/reconciliationReportViewState.js +0 -2
package/lib/rootStateTypes.d.ts
CHANGED
|
@@ -37,10 +37,10 @@ import { InvoicingCouponState } from './entity/invoicing/coupon/couponState';
|
|
|
37
37
|
import { InvoicingCreditNoteState } from './entity/invoicing/creditNote/creditNoteState';
|
|
38
38
|
import { InvoicingDunningCaseState } from './entity/invoicing/dunningCase/dunningCaseState';
|
|
39
39
|
import { InvoiceState as InvoicingInvoiceState } from './entity/invoicing/invoice/invoiceState';
|
|
40
|
-
import { InvoicingCatalogState } from './entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
41
40
|
import { InvoicingCustomerState } from './entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
42
41
|
import { InvoicingSubscriptionState } from './entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
43
42
|
import { InvoicingTransactionState } from './entity/invoicing/invoicingTransaction/invoicingTransactionState';
|
|
43
|
+
import { InvoicingCatalogState } from './entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
44
44
|
import { JESchedulesState } from './entity/jeSchedules/jeSchedulesState';
|
|
45
45
|
import { MerchantState } from './entity/merchant/merchant';
|
|
46
46
|
import { MonthEndCloseChecksState } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
@@ -51,7 +51,6 @@ import { PaymentAccountState } from './entity/paymentAccount/paymentAccountState
|
|
|
51
51
|
import { PaymentInstrumentState } from './entity/paymentInstrument/paymentInstrument';
|
|
52
52
|
import { AccountingSummaryState } from './entity/portfolio/accountingSummary/accountingSummaryState';
|
|
53
53
|
import { ProjectState } from './entity/project/projectState';
|
|
54
|
-
import { ReconciliationReportState } from './entity/reconciliationReport/reconciliationReportState';
|
|
55
54
|
import { ReimbursementState } from './entity/reimbursement/reimbursementState';
|
|
56
55
|
import { SectionAccountsViewState } from './entity/sectionAccountsView/sectionAccountsViewState';
|
|
57
56
|
import { SectionClassesViewStateV2 } from './entity/sectionClassesViewV2/sectionClassesViewState';
|
|
@@ -177,7 +176,6 @@ import { ProfitAndLossClassesViewState } from './view/profitAndLossClassesView/p
|
|
|
177
176
|
import { ProfitAndLossProjectViewState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
|
|
178
177
|
import { ProjectListState } from './view/projectList/projectListState';
|
|
179
178
|
import { EntityRecommendationState } from './view/recommendation/recommendationState';
|
|
180
|
-
import { ReconciliationReportViewState } from './view/reconciliationReportView/reconciliationReportViewState';
|
|
181
179
|
import { ReferralViewState } from './view/referralView/referralState';
|
|
182
180
|
import { ReimbursementCardState } from './view/reimbursementCard/reimbursementCardState';
|
|
183
181
|
import { ReportUIOptionsState } from './view/reportUIOptions/reportUIOptionsState';
|
|
@@ -323,7 +321,6 @@ export type EntitiesState = {
|
|
|
323
321
|
paymentAccountState: PaymentAccountState;
|
|
324
322
|
paymentInstrumentState: PaymentInstrumentState;
|
|
325
323
|
projectState: ProjectState;
|
|
326
|
-
reconciliationReportState: ReconciliationReportState;
|
|
327
324
|
recurringBillState: RecurringBillState;
|
|
328
325
|
reimbursementConfigState: ReimbursementConfigState;
|
|
329
326
|
reimbursementState: ReimbursementState;
|
|
@@ -492,7 +489,6 @@ export type ViewsState = {
|
|
|
492
489
|
profitAndLossState: ProfitAndLossWithForecastState;
|
|
493
490
|
projectListState: ProjectListState;
|
|
494
491
|
realTimeApprovalState: RealTimeApprovalState;
|
|
495
|
-
reconciliationReportViewState: ReconciliationReportViewState;
|
|
496
492
|
referralViewState: ReferralViewState;
|
|
497
493
|
reimbursementCardState: ReimbursementCardState;
|
|
498
494
|
reimbursementConfigState: ReimbursementConfigState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.76-
|
|
3
|
+
"version": "5.2.76-betaRD1",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,124 +0,0 @@
|
|
|
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_sub_type?: string | null;
|
|
8
|
-
account_type?: string | null;
|
|
9
|
-
coa_id?: string | null;
|
|
10
|
-
financial_institution?: string | null;
|
|
11
|
-
gl_account_name?: string | null;
|
|
12
|
-
last_4_digits?: string | null;
|
|
13
|
-
masked_account_number?: string | null;
|
|
14
|
-
}
|
|
15
|
-
export interface ReconciliationReportPeriodPayload {
|
|
16
|
-
end_date?: string | null;
|
|
17
|
-
start_date?: string | null;
|
|
18
|
-
}
|
|
19
|
-
export interface ReconciliationReportReconciledByPayload {
|
|
20
|
-
name?: string | null;
|
|
21
|
-
user_id?: ID | null;
|
|
22
|
-
}
|
|
23
|
-
export interface ReconciliationReportAiMatchPayload {
|
|
24
|
-
auto_matched_count: number;
|
|
25
|
-
cleared_count: number;
|
|
26
|
-
manually_matched_count: number;
|
|
27
|
-
}
|
|
28
|
-
export interface ReconciliationReportAfterPeriodEndPayload {
|
|
29
|
-
cleared_amount: number;
|
|
30
|
-
uncleared_amount: number;
|
|
31
|
-
}
|
|
32
|
-
export interface ReconciliationReportDifferencePayload {
|
|
33
|
-
amount?: number | null;
|
|
34
|
-
}
|
|
35
|
-
export interface ReconciliationReportCountAmountPayload {
|
|
36
|
-
amount: number;
|
|
37
|
-
count: number;
|
|
38
|
-
}
|
|
39
|
-
export interface ReconciliationReportStatementPayload {
|
|
40
|
-
deposits_cleared: ReconciliationReportCountAmountPayload;
|
|
41
|
-
payments_cleared: ReconciliationReportCountAmountPayload;
|
|
42
|
-
closing_balance?: number | null;
|
|
43
|
-
opening_balance?: number | null;
|
|
44
|
-
}
|
|
45
|
-
export interface ReconciliationReportRegisterPayload {
|
|
46
|
-
outstanding_as_of_period_end: number;
|
|
47
|
-
balance_as_of_period_end?: number | null;
|
|
48
|
-
balance_as_of_reconciled_at?: number | null;
|
|
49
|
-
}
|
|
50
|
-
export interface ReconciliationReportTransactionRowPayload {
|
|
51
|
-
amount: number;
|
|
52
|
-
match: string;
|
|
53
|
-
payee: string;
|
|
54
|
-
type: string;
|
|
55
|
-
age_days?: number | null;
|
|
56
|
-
cleared_balance?: number;
|
|
57
|
-
date?: string | null;
|
|
58
|
-
gl_account?: string | null;
|
|
59
|
-
issue_date?: string | null;
|
|
60
|
-
reference_number?: string | null;
|
|
61
|
-
transaction_id?: ID | null;
|
|
62
|
-
}
|
|
63
|
-
export interface ReconciliationReportBucketPayload {
|
|
64
|
-
amount: number;
|
|
65
|
-
count: number;
|
|
66
|
-
transactions: ReconciliationReportTransactionRowPayload[];
|
|
67
|
-
}
|
|
68
|
-
export interface ReconciliationReportPaymentsDepositsPayload {
|
|
69
|
-
deposits: ReconciliationReportBucketPayload;
|
|
70
|
-
payments: ReconciliationReportBucketPayload;
|
|
71
|
-
}
|
|
72
|
-
export interface ReconciliationReportBridgePayload {
|
|
73
|
-
uncleared_deposits: number;
|
|
74
|
-
uncleared_payments: number;
|
|
75
|
-
bank_closing?: number | null;
|
|
76
|
-
computed_ledger_closing?: number | null;
|
|
77
|
-
ledger_closing?: number | null;
|
|
78
|
-
variance?: number | null;
|
|
79
|
-
}
|
|
80
|
-
export interface ReconciliationReportSummaryPayload {
|
|
81
|
-
bridge: ReconciliationReportBridgePayload;
|
|
82
|
-
cleared_deposits: ReconciliationReportCountAmountPayload;
|
|
83
|
-
cleared_payments: ReconciliationReportCountAmountPayload;
|
|
84
|
-
uncleared_as_of_statement_date: {
|
|
85
|
-
deposits: ReconciliationReportCountAmountPayload;
|
|
86
|
-
payments: ReconciliationReportCountAmountPayload;
|
|
87
|
-
};
|
|
88
|
-
cleared_after_statement_date?: ReconciliationReportCountAmountPayload | null;
|
|
89
|
-
closing_balance?: number | null;
|
|
90
|
-
ledger_balance_as_of_reconciled_on?: number | null;
|
|
91
|
-
ledger_closing_as_of_statement_date?: number | null;
|
|
92
|
-
opening_balance?: number | null;
|
|
93
|
-
uncleared_after_statement_date?: ReconciliationReportCountAmountPayload | null;
|
|
94
|
-
variance?: number | null;
|
|
95
|
-
}
|
|
96
|
-
export interface ReconciliationReportDetailsPayload {
|
|
97
|
-
carried_forward: ReconciliationReportPaymentsDepositsPayload;
|
|
98
|
-
cleared: ReconciliationReportPaymentsDepositsPayload;
|
|
99
|
-
uncleared_as_of_statement_date: ReconciliationReportPaymentsDepositsPayload;
|
|
100
|
-
deposits_cleared?: ReconciliationReportTransactionRowPayload[];
|
|
101
|
-
payments_cleared?: ReconciliationReportTransactionRowPayload[];
|
|
102
|
-
}
|
|
103
|
-
export interface ReconciliationReportPayload {
|
|
104
|
-
account: ReconciliationReportAccountPayload;
|
|
105
|
-
after_period_end: ReconciliationReportAfterPeriodEndPayload;
|
|
106
|
-
ai_match: ReconciliationReportAiMatchPayload;
|
|
107
|
-
currency: CurrencyPayload;
|
|
108
|
-
data_source: string;
|
|
109
|
-
details: ReconciliationReportDetailsPayload;
|
|
110
|
-
difference: ReconciliationReportDifferencePayload;
|
|
111
|
-
disclaimer: string;
|
|
112
|
-
locked: boolean;
|
|
113
|
-
period: ReconciliationReportPeriodPayload;
|
|
114
|
-
reconciled_by: ReconciliationReportReconciledByPayload;
|
|
115
|
-
reconciliation_id: ID;
|
|
116
|
-
register: ReconciliationReportRegisterPayload;
|
|
117
|
-
statement: ReconciliationReportStatementPayload;
|
|
118
|
-
status: StatusCodeWithLabelPayload;
|
|
119
|
-
summary: ReconciliationReportSummaryPayload;
|
|
120
|
-
company_name?: string | null;
|
|
121
|
-
reconciled_at?: string | null;
|
|
122
|
-
report_reference?: string | null;
|
|
123
|
-
statement_date?: string | null;
|
|
124
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,173 +0,0 @@
|
|
|
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
|
-
accountSubType: payload.account.account_sub_type ?? undefined,
|
|
94
|
-
last4Digits: payload.account.last_4_digits ?? undefined,
|
|
95
|
-
maskedAccountNumber: payload.account.masked_account_number ?? undefined,
|
|
96
|
-
financialInstitution: payload.account.financial_institution ?? undefined,
|
|
97
|
-
glAccountName: payload.account.gl_account_name ?? undefined,
|
|
98
|
-
coaId: payload.account.coa_id ?? undefined,
|
|
99
|
-
},
|
|
100
|
-
period: {
|
|
101
|
-
startDate: toOptionalDate(payload.period.start_date),
|
|
102
|
-
endDate: toOptionalDate(payload.period.end_date),
|
|
103
|
-
},
|
|
104
|
-
statementDate: toOptionalDate(payload.statement_date),
|
|
105
|
-
dataSource: (0, reconciliationReportState_1.toReconciliationReportDataSource)(payload.data_source),
|
|
106
|
-
currency,
|
|
107
|
-
status: {
|
|
108
|
-
code: (0, accountReconState_1.toReconciliationStatusCodeType)(payload.status.code),
|
|
109
|
-
label: payload.status.label,
|
|
110
|
-
},
|
|
111
|
-
reconciledAt: toOptionalDate(payload.reconciled_at),
|
|
112
|
-
reconciledBy: {
|
|
113
|
-
userId: payload.reconciled_by.user_id ?? undefined,
|
|
114
|
-
name: payload.reconciled_by.name ?? undefined,
|
|
115
|
-
},
|
|
116
|
-
disclaimer: payload.disclaimer,
|
|
117
|
-
reportReference: payload.report_reference ?? undefined,
|
|
118
|
-
locked: payload.locked,
|
|
119
|
-
difference: toOptionalAmount(payload.difference.amount, currency),
|
|
120
|
-
aiMatch: {
|
|
121
|
-
autoMatchedCount: payload.ai_match.auto_matched_count,
|
|
122
|
-
manuallyMatchedCount: payload.ai_match.manually_matched_count,
|
|
123
|
-
clearedCount: payload.ai_match.cleared_count,
|
|
124
|
-
},
|
|
125
|
-
afterPeriodEnd: {
|
|
126
|
-
unclearedAmount: (0, amount_1.toAmountWC)(payload.after_period_end.uncleared_amount, currency),
|
|
127
|
-
clearedAmount: (0, amount_1.toAmountWC)(payload.after_period_end.cleared_amount, currency),
|
|
128
|
-
},
|
|
129
|
-
statement: {
|
|
130
|
-
openingBalance: toOptionalAmount(payload.statement.opening_balance, currency),
|
|
131
|
-
paymentsCleared: mapCountAmount(payload.statement.payments_cleared, currency),
|
|
132
|
-
depositsCleared: mapCountAmount(payload.statement.deposits_cleared, currency),
|
|
133
|
-
closingBalance: toOptionalAmount(payload.statement.closing_balance, currency),
|
|
134
|
-
},
|
|
135
|
-
register: {
|
|
136
|
-
balanceAsOfPeriodEnd: toOptionalAmount(payload.register.balance_as_of_period_end, currency),
|
|
137
|
-
outstandingAsOfPeriodEnd: (0, amount_1.toAmountWC)(payload.register.outstanding_as_of_period_end, currency),
|
|
138
|
-
balanceAsOfReconciledAt: toOptionalAmount(payload.register.balance_as_of_reconciled_at, currency),
|
|
139
|
-
},
|
|
140
|
-
summary: {
|
|
141
|
-
openingBalance: toOptionalAmount(payload.summary.opening_balance, currency),
|
|
142
|
-
clearedPayments: mapCountAmount(payload.summary.cleared_payments, currency),
|
|
143
|
-
clearedDeposits: mapCountAmount(payload.summary.cleared_deposits, currency),
|
|
144
|
-
closingBalance: toOptionalAmount(payload.summary.closing_balance, currency),
|
|
145
|
-
unclearedAsOfStatementDate: {
|
|
146
|
-
payments: mapCountAmount(payload.summary.uncleared_as_of_statement_date.payments, currency),
|
|
147
|
-
deposits: mapCountAmount(payload.summary.uncleared_as_of_statement_date.deposits, currency),
|
|
148
|
-
},
|
|
149
|
-
ledgerClosingAsOfStatementDate: toOptionalAmount(payload.summary.ledger_closing_as_of_statement_date, currency),
|
|
150
|
-
clearedAfterStatementDate: payload.summary.cleared_after_statement_date != null
|
|
151
|
-
? mapCountAmount(payload.summary.cleared_after_statement_date, currency)
|
|
152
|
-
: undefined,
|
|
153
|
-
unclearedAfterStatementDate: payload.summary.uncleared_after_statement_date != null
|
|
154
|
-
? mapCountAmount(payload.summary.uncleared_after_statement_date, currency)
|
|
155
|
-
: undefined,
|
|
156
|
-
ledgerBalanceAsOfReconciledOn: toOptionalAmount(payload.summary.ledger_balance_as_of_reconciled_on, currency),
|
|
157
|
-
bridge: {
|
|
158
|
-
bankClosing: toOptionalAmount(payload.summary.bridge.bank_closing, currency),
|
|
159
|
-
unclearedDeposits: (0, amount_1.toAmountWC)(payload.summary.bridge.uncleared_deposits, currency),
|
|
160
|
-
unclearedPayments: (0, amount_1.toAmountWC)(payload.summary.bridge.uncleared_payments, currency),
|
|
161
|
-
computedLedgerClosing: toOptionalAmount(payload.summary.bridge.computed_ledger_closing, currency),
|
|
162
|
-
ledgerClosing: toOptionalAmount(payload.summary.bridge.ledger_closing, currency),
|
|
163
|
-
variance: toOptionalAmount(payload.summary.bridge.variance, currency),
|
|
164
|
-
},
|
|
165
|
-
variance: toOptionalAmount(payload.summary.variance, currency),
|
|
166
|
-
},
|
|
167
|
-
details: {
|
|
168
|
-
cleared: mapPaymentsDeposits(payload.details.cleared, currency),
|
|
169
|
-
carriedForward: mapPaymentsDeposits(payload.details.carried_forward, currency),
|
|
170
|
-
unclearedAsOfStatementDate: mapPaymentsDeposits(payload.details.uncleared_as_of_statement_date, currency),
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { ReconciliationReport, ReconciliationReportState } from './reconciliationReportState';
|
|
3
|
-
export declare function getReconciliationReportByReconciliationId(reconciliationReportState: ReconciliationReportState, reconciliationId: ID): ReconciliationReport | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
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
|
-
accountSubType?: string;
|
|
14
|
-
accountType?: string;
|
|
15
|
-
coaId?: string;
|
|
16
|
-
financialInstitution?: string;
|
|
17
|
-
glAccountName?: string;
|
|
18
|
-
last4Digits?: string;
|
|
19
|
-
maskedAccountNumber?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface ReconciliationReportPeriod {
|
|
22
|
-
endDate?: ZeniDate;
|
|
23
|
-
startDate?: ZeniDate;
|
|
24
|
-
}
|
|
25
|
-
export interface ReconciliationReportReconciledBy {
|
|
26
|
-
name?: string;
|
|
27
|
-
userId?: ID;
|
|
28
|
-
}
|
|
29
|
-
export interface ReconciliationReportStatus {
|
|
30
|
-
code: ReconciliationStatusCodeType;
|
|
31
|
-
label: string;
|
|
32
|
-
}
|
|
33
|
-
export interface ReconciliationReportAiMatch {
|
|
34
|
-
autoMatchedCount: number;
|
|
35
|
-
clearedCount: number;
|
|
36
|
-
manuallyMatchedCount: number;
|
|
37
|
-
}
|
|
38
|
-
export interface ReconciliationReportAfterPeriodEnd {
|
|
39
|
-
clearedAmount: Amount;
|
|
40
|
-
unclearedAmount: Amount;
|
|
41
|
-
}
|
|
42
|
-
export interface ReconciliationReportCountAmount {
|
|
43
|
-
amount: Amount;
|
|
44
|
-
count: number;
|
|
45
|
-
}
|
|
46
|
-
export interface ReconciliationReportStatement {
|
|
47
|
-
depositsCleared: ReconciliationReportCountAmount;
|
|
48
|
-
paymentsCleared: ReconciliationReportCountAmount;
|
|
49
|
-
closingBalance?: Amount;
|
|
50
|
-
openingBalance?: Amount;
|
|
51
|
-
}
|
|
52
|
-
export interface ReconciliationReportRegister {
|
|
53
|
-
outstandingAsOfPeriodEnd: Amount;
|
|
54
|
-
balanceAsOfPeriodEnd?: Amount;
|
|
55
|
-
balanceAsOfReconciledAt?: Amount;
|
|
56
|
-
}
|
|
57
|
-
export interface ReconciliationReportTransactionRow {
|
|
58
|
-
amount: Amount;
|
|
59
|
-
match: ReconciliationReportMatchType;
|
|
60
|
-
payee: string;
|
|
61
|
-
type: string;
|
|
62
|
-
ageDays?: number;
|
|
63
|
-
clearedBalance?: Amount;
|
|
64
|
-
date?: ZeniDate;
|
|
65
|
-
glAccount?: string;
|
|
66
|
-
issueDate?: ZeniDate;
|
|
67
|
-
referenceNumber?: string;
|
|
68
|
-
transactionId?: ID;
|
|
69
|
-
}
|
|
70
|
-
export interface ReconciliationReportBucket {
|
|
71
|
-
amount: Amount;
|
|
72
|
-
count: number;
|
|
73
|
-
transactions: ReconciliationReportTransactionRow[];
|
|
74
|
-
}
|
|
75
|
-
export interface ReconciliationReportPaymentsDeposits {
|
|
76
|
-
deposits: ReconciliationReportBucket;
|
|
77
|
-
payments: ReconciliationReportBucket;
|
|
78
|
-
}
|
|
79
|
-
export interface ReconciliationReportBridge {
|
|
80
|
-
unclearedDeposits: Amount;
|
|
81
|
-
unclearedPayments: Amount;
|
|
82
|
-
bankClosing?: Amount;
|
|
83
|
-
computedLedgerClosing?: Amount;
|
|
84
|
-
ledgerClosing?: Amount;
|
|
85
|
-
variance?: Amount;
|
|
86
|
-
}
|
|
87
|
-
export interface ReconciliationReportSummary {
|
|
88
|
-
bridge: ReconciliationReportBridge;
|
|
89
|
-
clearedDeposits: ReconciliationReportCountAmount;
|
|
90
|
-
clearedPayments: ReconciliationReportCountAmount;
|
|
91
|
-
unclearedAsOfStatementDate: {
|
|
92
|
-
deposits: ReconciliationReportCountAmount;
|
|
93
|
-
payments: ReconciliationReportCountAmount;
|
|
94
|
-
};
|
|
95
|
-
clearedAfterStatementDate?: ReconciliationReportCountAmount;
|
|
96
|
-
closingBalance?: Amount;
|
|
97
|
-
ledgerBalanceAsOfReconciledOn?: Amount;
|
|
98
|
-
ledgerClosingAsOfStatementDate?: Amount;
|
|
99
|
-
openingBalance?: Amount;
|
|
100
|
-
unclearedAfterStatementDate?: ReconciliationReportCountAmount;
|
|
101
|
-
variance?: Amount;
|
|
102
|
-
}
|
|
103
|
-
export interface ReconciliationReportDetails {
|
|
104
|
-
carriedForward: ReconciliationReportPaymentsDeposits;
|
|
105
|
-
cleared: ReconciliationReportPaymentsDeposits;
|
|
106
|
-
unclearedAsOfStatementDate: ReconciliationReportPaymentsDeposits;
|
|
107
|
-
}
|
|
108
|
-
export interface ReconciliationReport {
|
|
109
|
-
account: ReconciliationReportAccount;
|
|
110
|
-
afterPeriodEnd: ReconciliationReportAfterPeriodEnd;
|
|
111
|
-
aiMatch: ReconciliationReportAiMatch;
|
|
112
|
-
currency: Currency;
|
|
113
|
-
dataSource: ReconciliationReportDataSource;
|
|
114
|
-
details: ReconciliationReportDetails;
|
|
115
|
-
disclaimer: string;
|
|
116
|
-
locked: boolean;
|
|
117
|
-
period: ReconciliationReportPeriod;
|
|
118
|
-
reconciledBy: ReconciliationReportReconciledBy;
|
|
119
|
-
reconciliationId: ID;
|
|
120
|
-
register: ReconciliationReportRegister;
|
|
121
|
-
statement: ReconciliationReportStatement;
|
|
122
|
-
status: ReconciliationReportStatus;
|
|
123
|
-
summary: ReconciliationReportSummary;
|
|
124
|
-
companyName?: string;
|
|
125
|
-
difference?: Amount;
|
|
126
|
-
reconciledAt?: ZeniDate;
|
|
127
|
-
reportReference?: string;
|
|
128
|
-
statementDate?: ZeniDate;
|
|
129
|
-
}
|
|
130
|
-
export interface ReconciliationReportState {
|
|
131
|
-
reportsByReconciliationId: Record<ID, ReconciliationReport>;
|
|
132
|
-
}
|
|
133
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export {};
|