Skip to content
Snippets Groups Projects
Unverified Commit 583eb10b authored by Shazib Hussain's avatar Shazib Hussain Committed by GitHub
Browse files

Fallback to memo in ofx if payee is not found (#1268)

parent c1b99958
No related branches found
No related tags found
No related merge requests found
......@@ -118,15 +118,19 @@ async function parseOFX(filepath): Promise<ParseFileResult> {
return { errors };
}
// Banks don't always implement the OFX standard properly
// If no payee is available try and fallback to memo
let useName = data.some(trans => trans.name != null && trans.name !== '');
return {
errors,
transactions: data.map(trans => ({
amount: trans.amount,
imported_id: trans.fi_id,
date: trans.date ? dayFromDate(trans.date * 1000) : null,
payee_name: trans.name,
imported_payee: trans.name,
notes: trans.memo || null,
payee_name: useName ? trans.name : trans.memo,
imported_payee: useName ? trans.name : trans.memo,
notes: useName ? trans.memo || null : null, //memo used for payee
})),
};
}
---
category: Enhancements
authors: [Shazib]
---
OFX Import support using 'memo' entries as payee if 'name' is unavailable
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment