@zeniai/client-epic-state 5.2.94 → 5.2.95
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 +1 -0
- package/lib/entity/reconciliationReport/reconciliationReportReducer.js +1 -0
- package/lib/entity/reconciliationReport/reconciliationReportState.d.ts +4 -2
- package/lib/entity/reconciliationReport/reconciliationReportState.js +4 -1
- package/lib/esm/entity/reconciliationReport/reconciliationReportReducer.js +1 -0
- package/lib/esm/entity/reconciliationReport/reconciliationReportState.js +4 -1
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +5 -7
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +5 -7
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ 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;
|
|
37
38
|
transaction_id?: ID | null;
|
|
38
39
|
}
|
|
39
40
|
export interface ReconciliationReportBucketPayload {
|
|
@@ -54,6 +54,7 @@ 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,
|
|
57
58
|
date: toOptionalDate(payload.date),
|
|
58
59
|
type: payload.type,
|
|
59
60
|
payee: payload.payee,
|
|
@@ -5,8 +5,9 @@ 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
|
-
|
|
9
|
-
export type ReconciliationReportDataSource =
|
|
8
|
+
declare const RECONCILIATION_REPORT_DATA_SOURCE: readonly ["bank_statement", "plaid"];
|
|
9
|
+
export type ReconciliationReportDataSource = (typeof RECONCILIATION_REPORT_DATA_SOURCE)[number];
|
|
10
|
+
export declare const toReconciliationReportDataSource: (value: string) => ReconciliationReportDataSource;
|
|
10
11
|
export interface ReconciliationReportAccount {
|
|
11
12
|
accountId: ID;
|
|
12
13
|
accountName?: string;
|
|
@@ -44,6 +45,7 @@ export interface ReconciliationReportTransactionRow {
|
|
|
44
45
|
date?: ZeniDate;
|
|
45
46
|
glAccount?: string;
|
|
46
47
|
issueDate?: ZeniDate;
|
|
48
|
+
qboId?: string;
|
|
47
49
|
transactionId?: ID;
|
|
48
50
|
}
|
|
49
51
|
export interface ReconciliationReportBucket {
|
|
@@ -10,6 +10,9 @@ 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 = [
|
|
13
|
+
const RECONCILIATION_REPORT_DATA_SOURCE = [
|
|
14
|
+
'bank_statement',
|
|
15
|
+
'plaid',
|
|
16
|
+
];
|
|
14
17
|
const toReconciliationReportDataSource = (value) => (0, stringToUnion_1.stringToUnion)(value, RECONCILIATION_REPORT_DATA_SOURCE);
|
|
15
18
|
exports.toReconciliationReportDataSource = toReconciliationReportDataSource;
|
|
@@ -49,6 +49,7 @@ 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,
|
|
52
53
|
date: toOptionalDate(payload.date),
|
|
53
54
|
type: payload.type,
|
|
54
55
|
payee: payload.payee,
|
|
@@ -6,5 +6,8 @@ export const toReconciliationReportMatchType = (value) => {
|
|
|
6
6
|
}
|
|
7
7
|
return stringToUnion(value, RECONCILIATION_REPORT_MATCH_TYPE);
|
|
8
8
|
};
|
|
9
|
-
const RECONCILIATION_REPORT_DATA_SOURCE = [
|
|
9
|
+
const RECONCILIATION_REPORT_DATA_SOURCE = [
|
|
10
|
+
'bank_statement',
|
|
11
|
+
'plaid',
|
|
12
|
+
];
|
|
10
13
|
export const toReconciliationReportDataSource = (value) => stringToUnion(value, RECONCILIATION_REPORT_DATA_SOURCE);
|
|
@@ -116,15 +116,13 @@ 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
|
-
*
|
|
119
|
+
* sometimes pluralises ("other_current_assets", "expenses"), and QuickBooks
|
|
120
|
+
* itself sends PascalCase sub types ("SalesTaxPayable"). Comparing the
|
|
121
|
+
* separator-free, de-pluralised forms keeps a picker from silently emptying
|
|
122
|
+
* because of a trailing "s", and an exclusion from missing on casing.
|
|
122
123
|
*/
|
|
123
124
|
const normalizeAccountTypeName = (value) => {
|
|
124
|
-
const normalized = value
|
|
125
|
-
.trim()
|
|
126
|
-
.toLowerCase()
|
|
127
|
-
.replace(/[^a-z0-9]+/g, '_');
|
|
125
|
+
const normalized = value.toLowerCase().replace(/[^a-z0-9]+/g, '');
|
|
128
126
|
// Singularise so "Other Current Liability" meets `other_current_liabilities`
|
|
129
127
|
// and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
|
|
130
128
|
// trailing "s" alone would leave "liabilitie", matching nothing.
|
|
@@ -125,15 +125,13 @@ 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
|
-
*
|
|
128
|
+
* sometimes pluralises ("other_current_assets", "expenses"), and QuickBooks
|
|
129
|
+
* itself sends PascalCase sub types ("SalesTaxPayable"). Comparing the
|
|
130
|
+
* separator-free, de-pluralised forms keeps a picker from silently emptying
|
|
131
|
+
* because of a trailing "s", and an exclusion from missing on casing.
|
|
131
132
|
*/
|
|
132
133
|
const normalizeAccountTypeName = (value) => {
|
|
133
|
-
const normalized = value
|
|
134
|
-
.trim()
|
|
135
|
-
.toLowerCase()
|
|
136
|
-
.replace(/[^a-z0-9]+/g, '_');
|
|
134
|
+
const normalized = value.toLowerCase().replace(/[^a-z0-9]+/g, '');
|
|
137
135
|
// Singularise so "Other Current Liability" meets `other_current_liabilities`
|
|
138
136
|
// and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
|
|
139
137
|
// trailing "s" alone would leave "liabilitie", matching nothing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.95",
|
|
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",
|