A local-first personal finance app
Ignore transactions with empty date & amount (#2653)
kyangk176c8466a450
diff --git a/packages/loot-core/src/server/accounts/parse-file.ts b/packages/loot-core/src/server/accounts/parse-file.tsindex 03c34f076b..4bd47d35fa 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.mdnew file mode 100644index 0000000000..e71c624bde--- /dev/null+++ b/upcoming-release-notes/2653.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [kyangk]+---++Ignore transactions with empty date & amount