@zeniai/client-epic-state 4.15.50 → 4.15.51
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.js +1 -1
- package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +14 -3
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +30 -86
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +8 -4
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +13 -16
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +3 -3
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ const toAccountReconciliationData = (payload) => {
|
|
|
53
53
|
const variance = payload.bank_balance != null && payload.cleared_balance != null
|
|
54
54
|
? (0, amount_1.toAmount)(Math.abs(payload.cleared_balance - payload.bank_balance), payload.currency.currency_code, payload.currency.currency_symbol)
|
|
55
55
|
: undefined;
|
|
56
|
-
const variancePercentage = variance != null && payload.bank_balance != null
|
|
56
|
+
const variancePercentage = variance != null && payload.bank_balance != null && payload.bank_balance !== 0
|
|
57
57
|
? (variance.amount / Math.abs(payload.bank_balance)) * 100
|
|
58
58
|
: undefined;
|
|
59
59
|
return {
|
|
@@ -7,6 +7,7 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
|
|
|
7
7
|
const transactionSelector_1 = require("../../../../entity/transaction/transactionSelector");
|
|
8
8
|
const vendorReducer_1 = require("../../../../entity/vendor/vendorReducer");
|
|
9
9
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
|
+
const zeniUrl_1 = require("../../../../zeniUrl");
|
|
10
11
|
const accountListSelector_1 = require("../../../accountList/accountListSelector");
|
|
11
12
|
const transactionsViewReducer_1 = require("../../../expenseAutomationView/reducers/transactionsViewReducer");
|
|
12
13
|
const transactionDetailReducer_1 = require("../../../transactionDetail/transactionDetailReducer");
|
|
@@ -32,7 +33,7 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
32
33
|
? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors/${effectiveVendorId}`, payload)
|
|
33
34
|
: zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors`, payload);
|
|
34
35
|
return saveVendorApi.pipe((0, operators_1.mergeMap)((response) => {
|
|
35
|
-
var _a;
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
37
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
37
38
|
const actions = [
|
|
38
39
|
(0, vendorReducer_1.updateVendors)((_a = response.data.vendors) !== null && _a !== void 0 ? _a : []),
|
|
@@ -61,14 +62,16 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
61
62
|
uncategorizedAccounts: uncategorizedIncomeExpense, // provide appropriate uncategorizedAccounts
|
|
62
63
|
updatedVendor: {
|
|
63
64
|
name: response.data.vendors[0].vendor_name,
|
|
64
|
-
id: response.data.vendors[0].
|
|
65
|
+
id: response.data.vendors[0].qbo_id,
|
|
66
|
+
logo: (0, zeniUrl_1.toZeniUrlWithoutBaseURL)((_c = (_b = response.data.vendors[0].logo) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''),
|
|
65
67
|
},
|
|
66
68
|
selectedEntity: {
|
|
67
69
|
name: response.data.vendors[0].vendor_name,
|
|
68
|
-
id: response.data.vendors[0].
|
|
70
|
+
id: response.data.vendors[0].qbo_id,
|
|
69
71
|
type: 'vendor',
|
|
70
72
|
zeniId: response.data.vendors[0].vendor_id,
|
|
71
73
|
qboId: response.data.vendors[0].qbo_id,
|
|
74
|
+
logo: (0, zeniUrl_1.toZeniUrlWithoutBaseURL)((_e = (_d = response.data.vendors[0].logo) === null || _d === void 0 ? void 0 : _d.url) !== null && _e !== void 0 ? _e : ''),
|
|
72
75
|
},
|
|
73
76
|
}));
|
|
74
77
|
}
|
|
@@ -82,6 +85,14 @@ const saveTransactionVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
82
85
|
id: response.data.vendors[0].vendor_id,
|
|
83
86
|
qboId: response.data.vendors[0].qbo_id,
|
|
84
87
|
},
|
|
88
|
+
entity: {
|
|
89
|
+
name: response.data.vendors[0].vendor_name,
|
|
90
|
+
id: response.data.vendors[0].qbo_id,
|
|
91
|
+
type: 'vendor',
|
|
92
|
+
zeniId: response.data.vendors[0].vendor_id,
|
|
93
|
+
qboId: response.data.vendors[0].qbo_id,
|
|
94
|
+
logo: (0, zeniUrl_1.toZeniUrlWithoutBaseURL)((_g = (_f = response.data.vendors[0].logo) === null || _f === void 0 ? void 0 : _f.url) !== null && _g !== void 0 ? _g : ''),
|
|
95
|
+
},
|
|
85
96
|
resetRecommendations: true,
|
|
86
97
|
}));
|
|
87
98
|
}
|
|
@@ -9,7 +9,7 @@ const saveTransactionHelper_1 = require("../../transactionDetail/epics/saveTrans
|
|
|
9
9
|
* @param transactionCategorizationLocalData
|
|
10
10
|
*/
|
|
11
11
|
const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionCategorizationLocalData, transaction, uncategorizedIncomeExpense) => {
|
|
12
|
-
var _a
|
|
12
|
+
var _a;
|
|
13
13
|
const updates = {
|
|
14
14
|
updatesByLineId: {},
|
|
15
15
|
};
|
|
@@ -22,32 +22,17 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
|
|
|
22
22
|
if ((0, vendorTransaction_1.isVendorTransaction)(transaction) === true &&
|
|
23
23
|
currentSelectedEntity != null &&
|
|
24
24
|
currentSelectedEntity.type === 'vendor') {
|
|
25
|
-
updates.vendorId = currentSelectedEntity.
|
|
25
|
+
updates.vendorId = currentSelectedEntity.qboId;
|
|
26
26
|
}
|
|
27
27
|
if ((0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) === true &&
|
|
28
28
|
currentSelectedEntity != null &&
|
|
29
29
|
currentSelectedEntity.type === 'customer') {
|
|
30
|
-
updates.customerId = currentSelectedEntity.
|
|
30
|
+
updates.customerId = currentSelectedEntity.qboId;
|
|
31
31
|
}
|
|
32
32
|
let lastUpdatedCategory;
|
|
33
33
|
let lastUpdatedClass;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
currentSelectedEntity.type === 'vendor') {
|
|
37
|
-
if (((_a = transactionCategorizationLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId) !==
|
|
38
|
-
transaction.vendorId) {
|
|
39
|
-
updatedEntityId = (_b = transactionCategorizationLocalData.vendorUpdates) === null || _b === void 0 ? void 0 : _b.qboId;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
if (((_c = transactionCategorizationLocalData.customerUpdates) === null || _c === void 0 ? void 0 : _c.qboId) !==
|
|
44
|
-
transaction.customerId) {
|
|
45
|
-
updatedEntityId =
|
|
46
|
-
(_d = transactionCategorizationLocalData.customerUpdates) === null || _d === void 0 ? void 0 : _d.qboId;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
(_e = transaction.lines) === null || _e === void 0 ? void 0 : _e.forEach((line) => {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
34
|
+
(_a = transaction.lines) === null || _a === void 0 ? void 0 : _a.forEach((line) => {
|
|
35
|
+
var _a, _b, _c, _d;
|
|
51
36
|
const currentSelectedEntityLine = transactionCategorizationLocalData.lineItemById[line.id]
|
|
52
37
|
.selectedEntityLine;
|
|
53
38
|
const entityDetails = getEntityDetails(currentSelectedEntity, transactionCategorizationLocalData.lineItemById[line.id], transactionCategorizationLocalData.vendorUpdates, transactionCategorizationLocalData.customerUpdates, currentSelectedEntityLine);
|
|
@@ -82,25 +67,6 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
|
|
|
82
67
|
((_d = lineItem.class) === null || _d === void 0 ? void 0 : _d.qboId) !== accountLine.class.qboId;
|
|
83
68
|
const recommendedAccountBase = (0, saveTransactionHelper_1.toRecommendedAccountBase)(lineItem.amount.amount, lineItem.account);
|
|
84
69
|
const recommendedClassBase = (0, saveTransactionHelper_1.toRecommendedClassBase)(lineItem.amount.amount, lineItem.class);
|
|
85
|
-
let updatedLineEntityId;
|
|
86
|
-
if ((currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.type) === 'vendor') {
|
|
87
|
-
if (((_e = accountLine.vendor) === null || _e === void 0 ? void 0 : _e.id) != null) {
|
|
88
|
-
updatedLineEntityId =
|
|
89
|
-
((_f = accountLine.vendor) === null || _f === void 0 ? void 0 : _f.id) !== ((_g = lineItem.vendor) === null || _g === void 0 ? void 0 : _g.id)
|
|
90
|
-
? currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.qboId
|
|
91
|
-
: undefined;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else if (((_h = accountLine.customer) === null || _h === void 0 ? void 0 : _h.id) != null &&
|
|
95
|
-
(currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.type) === 'customer') {
|
|
96
|
-
updatedLineEntityId =
|
|
97
|
-
((_j = accountLine.customer) === null || _j === void 0 ? void 0 : _j.id) !== ((_k = lineItem.customer) === null || _k === void 0 ? void 0 : _k.id)
|
|
98
|
-
? currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.qboId
|
|
99
|
-
: undefined;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
updatedLineEntityId = undefined;
|
|
103
|
-
}
|
|
104
70
|
if (entityDetails != null &&
|
|
105
71
|
(hasCategoryChanged === true || hasClassChanged === true)) {
|
|
106
72
|
lastUpdatedCategory =
|
|
@@ -113,25 +79,9 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
|
|
|
113
79
|
account: lastUpdatedCategory,
|
|
114
80
|
class: lastUpdatedClass,
|
|
115
81
|
};
|
|
116
|
-
if (recommended.class != null ||
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const vendorIdToUpdate = (_l = transactionCategorizationLocalData.selectedEntity) === null || _l === void 0 ? void 0 : _l.id;
|
|
120
|
-
if ((line.type === 'journal_entry_transaction_line' ||
|
|
121
|
-
line.platformLineDetailType === 'deposit_line_detail') &&
|
|
122
|
-
updatedLineEntityId != null) {
|
|
123
|
-
const entityId = entityDetails.entityId;
|
|
124
|
-
if (entityId != null) {
|
|
125
|
-
doUpdateEntityUpdates(entityUpdates, entityId, entityDetails.entityType, recommended, false, updatedLineEntityId);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
let entityId = entityDetails.entityId;
|
|
130
|
-
if (vendorIdToUpdate != null) {
|
|
131
|
-
entityId = vendorIdToUpdate;
|
|
132
|
-
}
|
|
133
|
-
doUpdateEntityUpdates(entityUpdates, entityId, entityDetails.entityType, recommended, false, updatedEntityId);
|
|
134
|
-
}
|
|
82
|
+
if (recommended.class != null || recommended.account != null) {
|
|
83
|
+
const entityId = entityDetails.entityId;
|
|
84
|
+
doUpdateEntityUpdates(entityUpdates, entityId, entityDetails.entityType, recommended, false, undefined);
|
|
135
85
|
}
|
|
136
86
|
}
|
|
137
87
|
}
|
|
@@ -169,51 +119,45 @@ const doUpdateEntityUpdates = (entityUpdates, entityId, entityType, recommendati
|
|
|
169
119
|
entityUpdates[entityKey] = Object.assign(Object.assign({}, entityUpdate), { recommendations: recommendation });
|
|
170
120
|
}
|
|
171
121
|
};
|
|
172
|
-
const getEntityDetails = (
|
|
173
|
-
var _a, _b, _c;
|
|
174
|
-
if (
|
|
122
|
+
const getEntityDetails = (entity, lineItemLocalData, vendorUpdates, customerUpdates, currentSelectedEntityLine) => {
|
|
123
|
+
var _a, _b, _c, _d, _e, _f;
|
|
124
|
+
if (entity != null) {
|
|
175
125
|
return {
|
|
176
|
-
entityId:
|
|
177
|
-
entityType:
|
|
126
|
+
entityId: (_a = entity.qboId) !== null && _a !== void 0 ? _a : entity.id,
|
|
127
|
+
entityType: entity.type,
|
|
178
128
|
};
|
|
179
129
|
}
|
|
180
|
-
if (
|
|
130
|
+
if (vendorUpdates != null && vendorUpdates.id != null) {
|
|
181
131
|
return {
|
|
182
|
-
entityId:
|
|
183
|
-
entityType:
|
|
132
|
+
entityId: vendorUpdates.id,
|
|
133
|
+
entityType: 'vendor',
|
|
184
134
|
};
|
|
185
135
|
}
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
entityType: 'vendor',
|
|
192
|
-
};
|
|
193
|
-
}
|
|
136
|
+
if (customerUpdates != null && customerUpdates.id != null) {
|
|
137
|
+
return {
|
|
138
|
+
entityId: customerUpdates.id,
|
|
139
|
+
entityType: 'customer',
|
|
140
|
+
};
|
|
194
141
|
}
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
entityType: 'customer',
|
|
201
|
-
};
|
|
202
|
-
}
|
|
142
|
+
if (lineItemLocalData.lineEntity != null) {
|
|
143
|
+
return {
|
|
144
|
+
entityId: (_b = lineItemLocalData.lineEntity.qboId) !== null && _b !== void 0 ? _b : lineItemLocalData.lineEntity.id,
|
|
145
|
+
entityType: lineItemLocalData.vendor != null ? 'vendor' : 'customer',
|
|
146
|
+
};
|
|
203
147
|
}
|
|
204
|
-
if (((
|
|
148
|
+
if (((_c = lineItemLocalData.customer) === null || _c === void 0 ? void 0 : _c.id) != null &&
|
|
205
149
|
currentSelectedEntityLine != null &&
|
|
206
150
|
currentSelectedEntityLine.type === 'customer') {
|
|
207
151
|
return {
|
|
208
|
-
entityId: lineItemLocalData.customer.id,
|
|
152
|
+
entityId: (_d = currentSelectedEntityLine.qboId) !== null && _d !== void 0 ? _d : lineItemLocalData.customer.id,
|
|
209
153
|
entityType: 'customer',
|
|
210
154
|
};
|
|
211
155
|
}
|
|
212
|
-
if (((
|
|
156
|
+
if (((_e = lineItemLocalData.vendor) === null || _e === void 0 ? void 0 : _e.id) != null &&
|
|
213
157
|
currentSelectedEntityLine != null &&
|
|
214
158
|
currentSelectedEntityLine.type === 'vendor') {
|
|
215
159
|
return {
|
|
216
|
-
entityId: lineItemLocalData.vendor.id,
|
|
160
|
+
entityId: (_f = currentSelectedEntityLine.qboId) !== null && _f !== void 0 ? _f : lineItemLocalData.vendor.id,
|
|
217
161
|
entityType: 'vendor',
|
|
218
162
|
};
|
|
219
163
|
}
|
|
@@ -103,9 +103,11 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
103
103
|
assetTotals.varianceTotal = Object.assign(Object.assign({}, accountRecon.variance), { amount: ((_f = (_e = assetTotals.varianceTotal) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : 0) +
|
|
104
104
|
accountRecon.variance.amount });
|
|
105
105
|
assetTotals.variancePercentage =
|
|
106
|
-
assetTotals.varianceTotal.amount != null
|
|
106
|
+
assetTotals.varianceTotal.amount != null &&
|
|
107
|
+
assetTotals.balanceTotal.amount != null &&
|
|
108
|
+
assetTotals.balanceTotal.amount !== 0
|
|
107
109
|
? (assetTotals.varianceTotal.amount /
|
|
108
|
-
assetTotals.
|
|
110
|
+
assetTotals.balanceTotal.amount) *
|
|
109
111
|
100
|
|
110
112
|
: undefined;
|
|
111
113
|
}
|
|
@@ -121,9 +123,11 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
121
123
|
liabilityTotals.varianceTotal = Object.assign(Object.assign({}, accountRecon.variance), { amount: ((_m = (_l = liabilityTotals.varianceTotal) === null || _l === void 0 ? void 0 : _l.amount) !== null && _m !== void 0 ? _m : 0) +
|
|
122
124
|
accountRecon.variance.amount });
|
|
123
125
|
liabilityTotals.variancePercentage =
|
|
124
|
-
liabilityTotals.varianceTotal.amount != null
|
|
126
|
+
liabilityTotals.varianceTotal.amount != null &&
|
|
127
|
+
liabilityTotals.balanceTotal.amount != null &&
|
|
128
|
+
liabilityTotals.balanceTotal.amount !== 0
|
|
125
129
|
? (liabilityTotals.varianceTotal.amount /
|
|
126
|
-
liabilityTotals.
|
|
130
|
+
liabilityTotals.balanceTotal.amount) *
|
|
127
131
|
100
|
|
128
132
|
: undefined;
|
|
129
133
|
}
|
|
@@ -36,22 +36,12 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
36
36
|
true
|
|
37
37
|
? (_a = transactionDetailLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId
|
|
38
38
|
: undefined;
|
|
39
|
-
if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
|
|
40
|
-
selectedEntity != null &&
|
|
41
|
-
selectedEntity.type === 'vendor') {
|
|
42
|
-
updates.vendorId = selectedEntity.id;
|
|
43
|
-
}
|
|
44
|
-
if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
|
|
45
|
-
selectedEntity != null &&
|
|
46
|
-
selectedEntity.type === 'customer') {
|
|
47
|
-
updates.customerId = selectedEntity.id;
|
|
48
|
-
}
|
|
49
39
|
let isBulkUpdate = false;
|
|
50
40
|
let lastUpdatedCategory;
|
|
51
41
|
let lastUpdatedClass;
|
|
52
42
|
// single recommendation to just pick the last recommendation in the list of lines
|
|
53
43
|
(_b = transaction.lines) === null || _b === void 0 ? void 0 : _b.forEach((line) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f;
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
55
45
|
const entityDetails = getEntityDetails(selectedEntity, transactionDetailLocalData.lineItemById[line.id], transactionDetailLocalData.vendorUpdates, transactionDetailLocalData.customerUpdates);
|
|
56
46
|
if (line.type === 'transaction_with_account_and_class_line' ||
|
|
57
47
|
line.type === 'transaction_with_product_or_service_line' ||
|
|
@@ -127,14 +117,21 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
127
117
|
recommended.account != null ||
|
|
128
118
|
updatedEntityId != null) {
|
|
129
119
|
const vendorIdToUpdate = (_f = transactionDetailLocalData.vendorUpdates) === null || _f === void 0 ? void 0 : _f.qboId;
|
|
120
|
+
const customerIdToUpdate = (_g = transactionDetailLocalData.customerUpdates) === null || _g === void 0 ? void 0 : _g.qboId;
|
|
130
121
|
let entityId = entityDetails.entityId;
|
|
131
|
-
if (vendorIdToUpdate != null) {
|
|
122
|
+
if (vendorIdToUpdate != null && (selectedEntity === null || selectedEntity === void 0 ? void 0 : selectedEntity.type) === 'vendor') {
|
|
132
123
|
entityId =
|
|
133
124
|
transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor ===
|
|
134
125
|
true
|
|
135
126
|
? entityId
|
|
136
127
|
: vendorIdToUpdate;
|
|
137
128
|
}
|
|
129
|
+
else {
|
|
130
|
+
if (customerIdToUpdate != null &&
|
|
131
|
+
(selectedEntity === null || selectedEntity === void 0 ? void 0 : selectedEntity.type) === 'customer') {
|
|
132
|
+
entityId = customerIdToUpdate;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
138
135
|
doUpdateEntityUpdates(entityUpdates, entityId, entityDetails.entityType, recommended, lineItem.isUpdateAllChecked, updatedEntityId);
|
|
139
136
|
}
|
|
140
137
|
}
|
|
@@ -200,17 +197,17 @@ const toRecommendedClassBase = (amountValue, classBase, recommendationBase) => {
|
|
|
200
197
|
};
|
|
201
198
|
exports.toRecommendedClassBase = toRecommendedClassBase;
|
|
202
199
|
const getEntityDetails = (entity, lineItemLocalData, vendorUpdates, customerUpdates) => {
|
|
203
|
-
var _a, _b
|
|
200
|
+
var _a, _b;
|
|
204
201
|
if (entity != null) {
|
|
205
202
|
return {
|
|
206
203
|
entityId: (_a = entity.qboId) !== null && _a !== void 0 ? _a : entity.id,
|
|
207
204
|
entityType: entity.type,
|
|
208
205
|
};
|
|
209
206
|
}
|
|
210
|
-
if (
|
|
207
|
+
if (lineItemLocalData.lineEntity != null) {
|
|
211
208
|
return {
|
|
212
|
-
entityId: (
|
|
213
|
-
entityType: lineItemLocalData.
|
|
209
|
+
entityId: (_b = lineItemLocalData.lineEntity.qboId) !== null && _b !== void 0 ? _b : lineItemLocalData.lineEntity.id,
|
|
210
|
+
entityType: lineItemLocalData.lineEntity.type,
|
|
214
211
|
};
|
|
215
212
|
}
|
|
216
213
|
if (customerUpdates != null &&
|
|
@@ -6,7 +6,7 @@ const customerTransaction_1 = require("../../entity/transaction/stateTypes/custo
|
|
|
6
6
|
const vendorTransaction_1 = require("../../entity/transaction/stateTypes/vendorTransaction");
|
|
7
7
|
const transactionDetailState_1 = require("./transactionDetailState");
|
|
8
8
|
const toTransactionDetailLocalData = (transaction, vendorId, uncategorizedIncomeExpense) => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
10
10
|
const transactionLocal = Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData);
|
|
11
11
|
const customerId = (_a = transaction.customer) === null || _a === void 0 ? void 0 : _a.id;
|
|
12
12
|
transactionLocal.memo = transaction.memo;
|
|
@@ -48,8 +48,8 @@ const toTransactionDetailLocalData = (transaction, vendorId, uncategorizedIncome
|
|
|
48
48
|
id: vendorId,
|
|
49
49
|
name: vendorName,
|
|
50
50
|
type: (0, entity_1.toEntityType)('vendor'),
|
|
51
|
-
qboId:
|
|
52
|
-
zeniId:
|
|
51
|
+
qboId: (_p = (_o = transaction.vendor) === null || _o === void 0 ? void 0 : _o.id) !== null && _p !== void 0 ? _p : '',
|
|
52
|
+
zeniId: (_r = (_q = transaction.vendor) === null || _q === void 0 ? void 0 : _q.id) !== null && _r !== void 0 ? _r : '',
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.51",
|
|
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
|
"types": "lib/index.d.ts",
|