Skip to content

Commit 08400b2

Browse files
teelurjsmith613
andauthored
sub changes (#734) (#737)
Co-authored-by: Josiah Smith <smith.josiahdavid@gmail.com>
1 parent e9beb51 commit 08400b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/src/helpers/transactions.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,12 @@ export const buildCategoryToTransactionsTotalMap = (
349349
currentTotalCategory + transaction.amount
350350
);
351351

352-
if (transaction.subcategory !== null && transaction.subcategory !== "") {
352+
if (
353+
transaction.subcategory !== null &&
354+
transaction.subcategory !== "" &&
355+
transaction.subcategory.toLocaleLowerCase() !==
356+
(transaction.category ?? "").toLocaleLowerCase()
357+
) {
353358
const currentTotalSubCategory =
354359
categoryToTransactionsTotalMap.get(
355360
transaction.subcategory.toLocaleLowerCase()

0 commit comments

Comments
 (0)