@zeniai/client-epic-state 4.20.3-betaJK4 → 4.20.3-betaJK5
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/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +4 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +4 -2
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ export interface ReconciliationDataPayload {
|
|
|
28
28
|
start_date: string;
|
|
29
29
|
statement_data_status: StatusCodeWithLabelPayload | null;
|
|
30
30
|
statement_meta_data: StatementMetaDataPayload | null;
|
|
31
|
-
statement_status: StatusCodeWithLabelPayload;
|
|
31
|
+
statement_status: StatusCodeWithLabelPayload | null;
|
|
32
32
|
status: StatusCodeWithLabelPayload | null;
|
|
33
33
|
transactions: ReconcileReviewTransactionsPayload;
|
|
34
34
|
update_time: string | null;
|
|
@@ -52,6 +52,8 @@ const toTransactionsToReviewPayload = (payload) => {
|
|
|
52
52
|
};
|
|
53
53
|
exports.toTransactionsToReviewPayload = toTransactionsToReviewPayload;
|
|
54
54
|
const toAccountReconciliationData = (payload) => {
|
|
55
|
+
const statementStatusCode = payload.statement_status?.code ?? 'not_found';
|
|
56
|
+
const statementStatusLabel = payload.statement_status?.label ?? 'Not Found';
|
|
55
57
|
const variance = payload.bank_balance != null && payload.cleared_balance != null
|
|
56
58
|
? (0, amount_1.toAmount)(Math.abs(payload.cleared_balance - payload.bank_balance), payload.currency.currency_code, payload.currency.currency_symbol)
|
|
57
59
|
: undefined;
|
|
@@ -70,8 +72,8 @@ const toAccountReconciliationData = (payload) => {
|
|
|
70
72
|
}
|
|
71
73
|
: undefined,
|
|
72
74
|
statementStatus: {
|
|
73
|
-
code: (0, accountReconState_1.toStatementStatusCodeType)(
|
|
74
|
-
label:
|
|
75
|
+
code: (0, accountReconState_1.toStatementStatusCodeType)(statementStatusCode),
|
|
76
|
+
label: statementStatusLabel,
|
|
75
77
|
},
|
|
76
78
|
balanceDataStatus: payload.balance_data_status
|
|
77
79
|
? {
|
|
@@ -47,6 +47,8 @@ export const toTransactionsToReviewPayload = (payload) => {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export const toAccountReconciliationData = (payload) => {
|
|
50
|
+
const statementStatusCode = payload.statement_status?.code ?? 'not_found';
|
|
51
|
+
const statementStatusLabel = payload.statement_status?.label ?? 'Not Found';
|
|
50
52
|
const variance = payload.bank_balance != null && payload.cleared_balance != null
|
|
51
53
|
? toAmount(Math.abs(payload.cleared_balance - payload.bank_balance), payload.currency.currency_code, payload.currency.currency_symbol)
|
|
52
54
|
: undefined;
|
|
@@ -65,8 +67,8 @@ export const toAccountReconciliationData = (payload) => {
|
|
|
65
67
|
}
|
|
66
68
|
: undefined,
|
|
67
69
|
statementStatus: {
|
|
68
|
-
code: toStatementStatusCodeType(
|
|
69
|
-
label:
|
|
70
|
+
code: toStatementStatusCodeType(statementStatusCode),
|
|
71
|
+
label: statementStatusLabel,
|
|
70
72
|
},
|
|
71
73
|
balanceDataStatus: payload.balance_data_status
|
|
72
74
|
? {
|
package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js
CHANGED
|
@@ -122,10 +122,12 @@ function buildClassColumns(classHierarchy, classesToFilterOut) {
|
|
|
122
122
|
qboId: c.qboId,
|
|
123
123
|
}))
|
|
124
124
|
.sort((a, b) => {
|
|
125
|
-
|
|
125
|
+
const aIsNotSpecified = a.classId === NOT_SPECIFIED_CLASS_ID;
|
|
126
|
+
const bIsNotSpecified = b.classId === NOT_SPECIFIED_CLASS_ID;
|
|
127
|
+
if (aIsNotSpecified && !bIsNotSpecified) {
|
|
126
128
|
return 1;
|
|
127
129
|
}
|
|
128
|
-
if (
|
|
130
|
+
if (!aIsNotSpecified && bIsNotSpecified) {
|
|
129
131
|
return -1;
|
|
130
132
|
}
|
|
131
133
|
return a.className.localeCompare(b.className, [], {
|
|
@@ -126,10 +126,12 @@ function buildClassColumns(classHierarchy, classesToFilterOut) {
|
|
|
126
126
|
qboId: c.qboId,
|
|
127
127
|
}))
|
|
128
128
|
.sort((a, b) => {
|
|
129
|
-
|
|
129
|
+
const aIsNotSpecified = a.classId === exports.NOT_SPECIFIED_CLASS_ID;
|
|
130
|
+
const bIsNotSpecified = b.classId === exports.NOT_SPECIFIED_CLASS_ID;
|
|
131
|
+
if (aIsNotSpecified && !bIsNotSpecified) {
|
|
130
132
|
return 1;
|
|
131
133
|
}
|
|
132
|
-
if (
|
|
134
|
+
if (!aIsNotSpecified && bIsNotSpecified) {
|
|
133
135
|
return -1;
|
|
134
136
|
}
|
|
135
137
|
return a.className.localeCompare(b.className, [], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.20.3-
|
|
3
|
+
"version": "4.20.3-betaJK5",
|
|
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",
|