Skip to content

Commit

Permalink
Allow case insensitive ynab5 import for special 'starting balance' payee
Browse files Browse the repository at this point in the history
  • Loading branch information
Marethyu1 committed Jan 8, 2024
1 parent 1a6db82 commit 515b654
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/loot-core/src/server/importers/ynab5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ async function importTransactions(
const startingBalanceCatId = categories.find(
cat => cat.name === 'Starting Balances',
).id; //better way to do it?

const startingPayeeYNAB = data.payees.find(
payee => payee.name === 'Starting Balance',
payee =>
payee.name.localeCompare('Starting Balance', undefined, {
sensitivity: 'base',
}) === 0,
).id;

const transactionsGrouped = groupBy(data.transactions, 'account_id');
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1968.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [Marethyu1]
---

Allow case insensitive ynab5 import for special 'starting balance' payee

0 comments on commit 515b654

Please sign in to comment.