diff --git a/packages/loot-core/src/server/accounts/parse-file.ts b/packages/loot-core/src/server/accounts/parse-file.ts index 03c34f076b539f08ae9b281542adfce71852c0ad..4bd47d35faf5756ed2936f9f3dcd89812c9f6336 100644 --- a/packages/loot-core/src/server/accounts/parse-file.ts +++ b/packages/loot-core/src/server/accounts/parse-file.ts @@ -96,13 +96,15 @@ async function parseQIF(filepath: string): Promise<ParseFileResult> { return { errors: [], - transactions: data.transactions.map(trans => ({ - amount: trans.amount != null ? looselyParseAmount(trans.amount) : null, - date: trans.date, - payee_name: trans.payee, - imported_payee: trans.payee, - notes: trans.memo || null, - })), + transactions: data.transactions + .map(trans => ({ + amount: trans.amount != null ? looselyParseAmount(trans.amount) : null, + date: trans.date, + payee_name: trans.payee, + imported_payee: trans.payee, + notes: trans.memo || null, + })) + .filter(trans => trans.date != null && trans.amount != null), }; } diff --git a/upcoming-release-notes/2653.md b/upcoming-release-notes/2653.md new file mode 100644 index 0000000000000000000000000000000000000000..e71c624bde9036865b69ae426ace88f3b011c99a --- /dev/null +++ b/upcoming-release-notes/2653.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [kyangk] +--- + +Ignore transactions with empty date & amount