@zeniai/client-epic-state 5.2.94-beta0KB → 5.2.94-beta0MM
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/reconciliationReport/reconciliationReportPayload.d.ts +0 -1
- package/lib/entity/reconciliationReport/reconciliationReportReducer.js +0 -1
- package/lib/entity/reconciliationReport/reconciliationReportState.d.ts +2 -4
- package/lib/entity/reconciliationReport/reconciliationReportState.js +1 -4
- package/lib/esm/entity/reconciliationReport/reconciliationReportReducer.js +0 -1
- package/lib/esm/entity/reconciliationReport/reconciliationReportState.js +1 -4
- package/lib/esm/view/accountList/accountListReducer.js +0 -2
- package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +5 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +7 -5
- package/lib/esm/view/transactionDetail/createTransaction/createTransactionSelector.js +1 -2
- package/lib/view/accountList/accountListReducer.js +0 -2
- package/lib/view/accountList/accountListState.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +2 -0
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +5 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +3 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +7 -5
- package/lib/view/transactionDetail/createTransaction/createTransactionSelector.d.ts +3 -5
- package/lib/view/transactionDetail/createTransaction/createTransactionSelector.js +1 -2
- package/package.json +1 -1
|
@@ -34,7 +34,6 @@ export interface ReconciliationReportTransactionRowPayload {
|
|
|
34
34
|
date?: string | null;
|
|
35
35
|
gl_account?: string | null;
|
|
36
36
|
issue_date?: string | null;
|
|
37
|
-
qbo_id?: string | null;
|
|
38
37
|
transaction_id?: ID | null;
|
|
39
38
|
}
|
|
40
39
|
export interface ReconciliationReportBucketPayload {
|
|
@@ -54,7 +54,6 @@ function mapCountAmount(payload, currency) {
|
|
|
54
54
|
function mapTransactionRow(payload, currency) {
|
|
55
55
|
return {
|
|
56
56
|
transactionId: payload.transaction_id ?? undefined,
|
|
57
|
-
qboId: payload.qbo_id ?? undefined,
|
|
58
57
|
date: toOptionalDate(payload.date),
|
|
59
58
|
type: payload.type,
|
|
60
59
|
payee: payload.payee,
|
|
@@ -5,9 +5,8 @@ import { ReconciliationStatusCodeType } from '../accountRecon/accountReconState'
|
|
|
5
5
|
declare const RECONCILIATION_REPORT_MATCH_TYPE: readonly ["automatic", "manual"];
|
|
6
6
|
export type ReconciliationReportMatchType = (typeof RECONCILIATION_REPORT_MATCH_TYPE)[number];
|
|
7
7
|
export declare const toReconciliationReportMatchType: (value: string) => ReconciliationReportMatchType;
|
|
8
|
-
declare const
|
|
9
|
-
export type ReconciliationReportDataSource =
|
|
10
|
-
export declare const toReconciliationReportDataSource: (value: string) => ReconciliationReportDataSource;
|
|
8
|
+
export declare const toReconciliationReportDataSource: (value: string) => "Statement" | "Plaid";
|
|
9
|
+
export type ReconciliationReportDataSource = ReturnType<typeof toReconciliationReportDataSource>;
|
|
11
10
|
export interface ReconciliationReportAccount {
|
|
12
11
|
accountId: ID;
|
|
13
12
|
accountName?: string;
|
|
@@ -45,7 +44,6 @@ export interface ReconciliationReportTransactionRow {
|
|
|
45
44
|
date?: ZeniDate;
|
|
46
45
|
glAccount?: string;
|
|
47
46
|
issueDate?: ZeniDate;
|
|
48
|
-
qboId?: string;
|
|
49
47
|
transactionId?: ID;
|
|
50
48
|
}
|
|
51
49
|
export interface ReconciliationReportBucket {
|
|
@@ -10,9 +10,6 @@ const toReconciliationReportMatchType = (value) => {
|
|
|
10
10
|
return (0, stringToUnion_1.stringToUnion)(value, RECONCILIATION_REPORT_MATCH_TYPE);
|
|
11
11
|
};
|
|
12
12
|
exports.toReconciliationReportMatchType = toReconciliationReportMatchType;
|
|
13
|
-
const RECONCILIATION_REPORT_DATA_SOURCE = [
|
|
14
|
-
'bank_statement',
|
|
15
|
-
'plaid',
|
|
16
|
-
];
|
|
13
|
+
const RECONCILIATION_REPORT_DATA_SOURCE = ['Statement', 'Plaid'];
|
|
17
14
|
const toReconciliationReportDataSource = (value) => (0, stringToUnion_1.stringToUnion)(value, RECONCILIATION_REPORT_DATA_SOURCE);
|
|
18
15
|
exports.toReconciliationReportDataSource = toReconciliationReportDataSource;
|
|
@@ -49,7 +49,6 @@ function mapCountAmount(payload, currency) {
|
|
|
49
49
|
function mapTransactionRow(payload, currency) {
|
|
50
50
|
return {
|
|
51
51
|
transactionId: payload.transaction_id ?? undefined,
|
|
52
|
-
qboId: payload.qbo_id ?? undefined,
|
|
53
52
|
date: toOptionalDate(payload.date),
|
|
54
53
|
type: payload.type,
|
|
55
54
|
payee: payload.payee,
|
|
@@ -6,8 +6,5 @@ export const toReconciliationReportMatchType = (value) => {
|
|
|
6
6
|
}
|
|
7
7
|
return stringToUnion(value, RECONCILIATION_REPORT_MATCH_TYPE);
|
|
8
8
|
};
|
|
9
|
-
const RECONCILIATION_REPORT_DATA_SOURCE = [
|
|
10
|
-
'bank_statement',
|
|
11
|
-
'plaid',
|
|
12
|
-
];
|
|
9
|
+
const RECONCILIATION_REPORT_DATA_SOURCE = ['Statement', 'Plaid'];
|
|
13
10
|
export const toReconciliationReportDataSource = (value) => stringToUnion(value, RECONCILIATION_REPORT_DATA_SOURCE);
|
|
@@ -28,8 +28,6 @@ export const initialState = {
|
|
|
28
28
|
reimbursementAccountList: initialAccountList,
|
|
29
29
|
schedulesAccountList: initialAccountList,
|
|
30
30
|
billPayAccountList: initialAccountList,
|
|
31
|
-
createTransactionLineAccountList: initialAccountList,
|
|
32
|
-
createTransactionPaymentAccountList: initialAccountList,
|
|
33
31
|
},
|
|
34
32
|
};
|
|
35
33
|
const accountList = createSlice({
|
|
@@ -44,9 +44,14 @@ export function toActualMatchingTransactionSearchResult(payload, fallbackCurrenc
|
|
|
44
44
|
accountDescription: payload.account_description ?? undefined,
|
|
45
45
|
accountingClassId: payload.accounting_class_id ?? undefined,
|
|
46
46
|
accountingClassName: payload.accounting_class_name ?? undefined,
|
|
47
|
+
categorizationStatus: payload.categorization_status == null ||
|
|
48
|
+
payload.categorization_status === ''
|
|
49
|
+
? undefined
|
|
50
|
+
: payload.categorization_status,
|
|
47
51
|
currencyCode,
|
|
48
52
|
currencySymbol: resolveMatchSearchCurrencySymbol(payload, currencyCode, fallbackCurrency),
|
|
49
53
|
transactionMemo: payload.transaction_memo ?? undefined,
|
|
54
|
+
lineDescription: payload.line_description ?? undefined,
|
|
50
55
|
transactionDescription: payload.transaction_description ?? undefined,
|
|
51
56
|
transactionTypeName: payload.transaction_type_name ?? undefined,
|
|
52
57
|
syncToken: payload.sync_token == null ? '' : String(payload.sync_token),
|
|
@@ -116,13 +116,15 @@ export const getInvoicingQboAccountOptions = createSelector([
|
|
|
116
116
|
* Normalises an account-type name for comparison. The config's mapping kinds
|
|
117
117
|
* name QuickBooks types the way QuickBooks displays them ("Other Current
|
|
118
118
|
* Asset", "Expense"), while the accounting service uses snake_case and
|
|
119
|
-
* sometimes pluralises ("other_current_assets", "expenses")
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* because of a trailing "s", and an exclusion from missing on casing.
|
|
119
|
+
* sometimes pluralises ("other_current_assets", "expenses"). Comparing the
|
|
120
|
+
* normalised, de-pluralised forms keeps a picker from silently emptying because
|
|
121
|
+
* of a trailing "s".
|
|
123
122
|
*/
|
|
124
123
|
const normalizeAccountTypeName = (value) => {
|
|
125
|
-
const normalized = value
|
|
124
|
+
const normalized = value
|
|
125
|
+
.trim()
|
|
126
|
+
.toLowerCase()
|
|
127
|
+
.replace(/[^a-z0-9]+/g, '_');
|
|
126
128
|
// Singularise so "Other Current Liability" meets `other_current_liabilities`
|
|
127
129
|
// and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
|
|
128
130
|
// trailing "s" alone would leave "liabilitie", matching nothing.
|
|
@@ -39,8 +39,7 @@ export const getCreateTransactionView = createSelector([
|
|
|
39
39
|
createStatus: createTransactionsState.createStatus,
|
|
40
40
|
createdTransactionId: createTransactionsState.createdTransactionId,
|
|
41
41
|
vendorList: Object.values(vendorByID),
|
|
42
|
-
accountListNestedAccountHierarchy: getNestedAccountListHierarchy(accountListState, '
|
|
43
|
-
paymentAccountListNestedAccountHierarchy: getNestedAccountListHierarchy(accountListState, 'createTransactionPaymentAccountList'),
|
|
42
|
+
accountListNestedAccountHierarchy: getNestedAccountListHierarchy(accountListState, 'accountList'),
|
|
44
43
|
classListNestedAccountHierarchy: getNestedClassListHierarchy(classListState),
|
|
45
44
|
transferAccountsList: transactionType === 'transfer' ? transferAccountsList : [],
|
|
46
45
|
fetchState: createTransactionsState.createStatus.fetchState,
|
|
@@ -35,8 +35,6 @@ exports.initialState = {
|
|
|
35
35
|
reimbursementAccountList: exports.initialAccountList,
|
|
36
36
|
schedulesAccountList: exports.initialAccountList,
|
|
37
37
|
billPayAccountList: exports.initialAccountList,
|
|
38
|
-
createTransactionLineAccountList: exports.initialAccountList,
|
|
39
|
-
createTransactionPaymentAccountList: exports.initialAccountList,
|
|
40
38
|
},
|
|
41
39
|
};
|
|
42
40
|
const accountList = (0, toolkit_1.createSlice)({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
3
3
|
import { AccountLabel } from '../../entity/account/accountState';
|
|
4
|
-
export type AccountListKeyType = 'accountList' | 'reimbursementAccountList' | 'schedulesAccountList' | 'billPayAccountList'
|
|
4
|
+
export type AccountListKeyType = 'accountList' | 'reimbursementAccountList' | 'schedulesAccountList' | 'billPayAccountList';
|
|
5
5
|
export interface AccountList extends FetchedState {
|
|
6
6
|
accountIds: ID[];
|
|
7
7
|
accountIdsByLabel: Record<AccountLabel, ID[]>;
|
|
@@ -32,8 +32,10 @@ export interface MatchTransactionSearchResultPayload {
|
|
|
32
32
|
accounting_class_id?: ID | null;
|
|
33
33
|
accounting_class_name?: string | null;
|
|
34
34
|
amount?: number | null;
|
|
35
|
+
categorization_status?: string | null;
|
|
35
36
|
currency_code?: string | null;
|
|
36
37
|
currency_symbol?: string | null;
|
|
38
|
+
line_description?: string | null;
|
|
37
39
|
sync_token?: string | null;
|
|
38
40
|
total_amount?: number | null;
|
|
39
41
|
transaction_description?: string | null;
|
|
@@ -50,9 +50,14 @@ function toActualMatchingTransactionSearchResult(payload, fallbackCurrency) {
|
|
|
50
50
|
accountDescription: payload.account_description ?? undefined,
|
|
51
51
|
accountingClassId: payload.accounting_class_id ?? undefined,
|
|
52
52
|
accountingClassName: payload.accounting_class_name ?? undefined,
|
|
53
|
+
categorizationStatus: payload.categorization_status == null ||
|
|
54
|
+
payload.categorization_status === ''
|
|
55
|
+
? undefined
|
|
56
|
+
: payload.categorization_status,
|
|
53
57
|
currencyCode,
|
|
54
58
|
currencySymbol: resolveMatchSearchCurrencySymbol(payload, currencyCode, fallbackCurrency),
|
|
55
59
|
transactionMemo: payload.transaction_memo ?? undefined,
|
|
60
|
+
lineDescription: payload.line_description ?? undefined,
|
|
56
61
|
transactionDescription: payload.transaction_description ?? undefined,
|
|
57
62
|
transactionTypeName: payload.transaction_type_name ?? undefined,
|
|
58
63
|
syncToken: payload.sync_token == null ? '' : String(payload.sync_token),
|
|
@@ -46,6 +46,9 @@ export interface ActualMatchingTransactionSearchResult {
|
|
|
46
46
|
accountingClassId?: ID;
|
|
47
47
|
accountingClassName?: string;
|
|
48
48
|
accountName?: string;
|
|
49
|
+
categorizationStatus?: string;
|
|
50
|
+
/** QBO line description. Distinct from the header transaction description. */
|
|
51
|
+
lineDescription?: string;
|
|
49
52
|
transactionDescription?: string;
|
|
50
53
|
transactionMemo?: string;
|
|
51
54
|
transactionTypeName?: string;
|
|
@@ -125,13 +125,15 @@ exports.getInvoicingQboAccountOptions = (0, toolkit_1.createSelector)([
|
|
|
125
125
|
* Normalises an account-type name for comparison. The config's mapping kinds
|
|
126
126
|
* name QuickBooks types the way QuickBooks displays them ("Other Current
|
|
127
127
|
* Asset", "Expense"), while the accounting service uses snake_case and
|
|
128
|
-
* sometimes pluralises ("other_current_assets", "expenses")
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* because of a trailing "s", and an exclusion from missing on casing.
|
|
128
|
+
* sometimes pluralises ("other_current_assets", "expenses"). Comparing the
|
|
129
|
+
* normalised, de-pluralised forms keeps a picker from silently emptying because
|
|
130
|
+
* of a trailing "s".
|
|
132
131
|
*/
|
|
133
132
|
const normalizeAccountTypeName = (value) => {
|
|
134
|
-
const normalized = value
|
|
133
|
+
const normalized = value
|
|
134
|
+
.trim()
|
|
135
|
+
.toLowerCase()
|
|
136
|
+
.replace(/[^a-z0-9]+/g, '_');
|
|
135
137
|
// Singularise so "Other Current Liability" meets `other_current_liabilities`
|
|
136
138
|
// and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
|
|
137
139
|
// trailing "s" alone would leave "liabilitie", matching nothing.
|
|
@@ -10,16 +10,14 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
10
10
|
import { CreatableTransactionType, CreateTransactionLocalData } from './createTransactionState';
|
|
11
11
|
export interface CreateTransactionView extends SelectorView {
|
|
12
12
|
/**
|
|
13
|
-
* COA and class trees for the line dropdowns. The hierarchies rather
|
|
14
|
-
* the create page builds its grouped "Recommended" / "All" options
|
|
15
|
-
* detail page uses.
|
|
13
|
+
* COA and class trees for the header account and the line dropdowns. The hierarchies rather
|
|
14
|
+
* than flat lists, because the create page builds its grouped "Recommended" / "All" options
|
|
15
|
+
* with the same helpers the detail page uses.
|
|
16
16
|
*/
|
|
17
17
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
18
18
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
19
19
|
createStatus: FetchStateAndError;
|
|
20
20
|
localData: CreateTransactionLocalData;
|
|
21
|
-
/** Bank, credit card and other current asset accounts for the header payment account. */
|
|
22
|
-
paymentAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
23
21
|
transactionType: CreatableTransactionType;
|
|
24
22
|
/** Populated for transfer only; the COA would offer ineligible accounts. */
|
|
25
23
|
transferAccountsList: AccountBase[];
|
|
@@ -45,8 +45,7 @@ exports.getCreateTransactionView = (0, toolkit_1.createSelector)([
|
|
|
45
45
|
createStatus: createTransactionsState.createStatus,
|
|
46
46
|
createdTransactionId: createTransactionsState.createdTransactionId,
|
|
47
47
|
vendorList: Object.values(vendorByID),
|
|
48
|
-
accountListNestedAccountHierarchy: (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, '
|
|
49
|
-
paymentAccountListNestedAccountHierarchy: (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'createTransactionPaymentAccountList'),
|
|
48
|
+
accountListNestedAccountHierarchy: (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList'),
|
|
50
49
|
classListNestedAccountHierarchy: (0, classListSelector_1.getNestedClassListHierarchy)(classListState),
|
|
51
50
|
transferAccountsList: transactionType === 'transfer' ? transferAccountsList : [],
|
|
52
51
|
fetchState: createTransactionsState.createStatus.fetchState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.94-
|
|
3
|
+
"version": "5.2.94-beta0MM",
|
|
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",
|