@zeniai/client-epic-state 5.0.31-betaAR11 → 5.0.31-betaAR3
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/account/accountSelector.d.ts +7 -2
- package/lib/entity/account/accountSelector.js +0 -3
- package/lib/esm/entity/account/accountSelector.js +0 -3
- package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +25 -12
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +25 -12
- package/package.json +1 -1
|
@@ -339,20 +339,33 @@ const getCategoryValueForTransaction = (key, transaction) => {
|
|
|
339
339
|
return undefined;
|
|
340
340
|
}
|
|
341
341
|
case 'payment_account_name': {
|
|
342
|
-
//
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
// Get from transaction.account or from lines
|
|
343
|
+
if (transaction.transaction.account?.accountName) {
|
|
344
|
+
return transaction.transaction.account.accountName;
|
|
345
|
+
}
|
|
346
|
+
// Get from first line's account
|
|
347
|
+
const firstLine = transaction.transaction.lines?.[0];
|
|
348
|
+
if (firstLine?.type === 'transaction_with_account_and_class_line' ||
|
|
349
|
+
firstLine?.type === 'transaction_with_product_or_service_line' ||
|
|
350
|
+
firstLine?.type === 'journal_entry_transaction_line') {
|
|
351
|
+
const accountLine = firstLine;
|
|
352
|
+
return accountLine.account?.accountName;
|
|
353
|
+
}
|
|
354
|
+
return undefined;
|
|
347
355
|
}
|
|
348
356
|
case 'payment_account_type': {
|
|
349
|
-
//
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
357
|
+
// Similar to payment_account_name but for type
|
|
358
|
+
if (transaction.transaction.account?.accountType) {
|
|
359
|
+
return transaction.transaction.account.accountType;
|
|
360
|
+
}
|
|
361
|
+
const firstLineForType = transaction.transaction.lines?.[0];
|
|
362
|
+
if (firstLineForType?.type === 'transaction_with_account_and_class_line' ||
|
|
363
|
+
firstLineForType?.type === 'transaction_with_product_or_service_line' ||
|
|
364
|
+
firstLineForType?.type === 'journal_entry_transaction_line') {
|
|
365
|
+
const accountLineForType = firstLineForType;
|
|
366
|
+
return accountLineForType.account?.accountType;
|
|
367
|
+
}
|
|
368
|
+
return undefined;
|
|
356
369
|
}
|
|
357
370
|
case 'category': {
|
|
358
371
|
// Get from transactionLocalData (preferred) or from transaction lines
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.31-
|
|
3
|
+
"version": "5.0.31-betaAR3",
|
|
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",
|