Skip to content
Snippets Groups Projects
Unverified Commit 44573c0f authored by chris heazlewood's avatar chris heazlewood Committed by GitHub
Browse files

Store payee in imported_payee during ynab4/ynab5 import (#736)

parent 7fbb26f2
No related branches found
No related tags found
No related merge requests found
......@@ -211,15 +211,19 @@ async function importTransactions(data, entityIdMap) {
let transferId = entityIdMap.get(t.transferTransactionId) || null;
let payee = null;
let imported_payee = null;
if (transferId) {
payee = payees.find(
p => p.transfer_acct === entityIdMap.get(t.targetAccountId)
).id;
} else {
payee = entityIdMap.get(t.payeeId);
imported_payee = data.payees.find(
p => p.entityId === t.payeeId
)?.name;
}
return { transfer_id: transferId, payee };
return { transfer_id: transferId, payee, imported_payee: imported_payee};
}
let newTransaction = {
......
......@@ -232,6 +232,9 @@ async function importTransactions(data, entityIdMap) {
).id;
} else {
newTransaction.payee = entityIdMap.get(transaction.payee_id);
newTransaction.imported_payee = data.payees.find(
p => !p.deleted && p.id === t.payeeId
)?.name;
}
// Handle starting balances
......
---
category: Enhancements
authors: [ostat]
---
Save payee name in “imported payee” field during YNAB4/YNAB5 import
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