mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 10:33:02 -05:00
Fix importing transfers from YNAB4/5 (#1224)
This commit is contained in:
@@ -222,6 +222,7 @@ async function importTransactions(data, entityIdMap) {
|
||||
transaction.subTransactions &&
|
||||
transaction.subTransactions.map((t, i) => {
|
||||
return {
|
||||
id: entityIdMap.get(t.entityId),
|
||||
amount: amountToInteger(t.amount),
|
||||
category: getCategory(t.categoryId),
|
||||
notes: t.memo || null,
|
||||
|
||||
@@ -164,6 +164,9 @@ async function importTransactions(data, entityIdMap) {
|
||||
for (let transaction of data.transactions) {
|
||||
entityIdMap.set(transaction.id, uuidv4());
|
||||
}
|
||||
for (let transaction of data.subtransactions) {
|
||||
entityIdMap.set(transaction.id, uuidv4());
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
Object.keys(transactionsGrouped).map(async accountId => {
|
||||
@@ -180,6 +183,7 @@ async function importTransactions(data, entityIdMap) {
|
||||
if (subtransactions) {
|
||||
subtransactions = subtransactions.map(subtrans => {
|
||||
return {
|
||||
id: entityIdMap.get(subtrans.id),
|
||||
amount: amountFromYnab(subtrans.amount),
|
||||
category: entityIdMap.get(subtrans.category_id) || null,
|
||||
notes: subtrans.memo,
|
||||
|
||||
6
upcoming-release-notes/1224.md
Normal file
6
upcoming-release-notes/1224.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [j-f1]
|
||||
---
|
||||
|
||||
Imports from YNAB4/nYNAB will now link transfer transactions correctly
|
||||
Reference in New Issue
Block a user