Skip to content
Snippets Groups Projects
Unverified Commit 458d556e authored by Khanh Nguyen's avatar Khanh Nguyen Committed by GitHub
Browse files

added cleared column in csv export (#2138)

* added cleared column in csv export

* added release note
parent d9aeb8db
No related branches found
No related tags found
No related merge requests found
......@@ -31,13 +31,24 @@ export async function exportToCSV(
}, {});
const transactionsForExport = transactions.map(
({ account, date, payee, notes, category, amount }) => ({
({
account,
date,
payee,
notes,
category,
amount,
cleared,
reconciled,
}) => ({
Account: accountNamesById[account],
Date: date,
Payee: payeeNamesById[payee],
Notes: notes,
Category: categoryNamesById[category],
Amount: amount == null ? 0 : integerToAmount(amount),
Cleared: cleared,
Reconciled: reconciled,
}),
);
......@@ -57,6 +68,8 @@ export async function exportQueryToCSV(query) {
{ Notes: 'notes' },
{ Category: 'category.name' },
{ Amount: 'amount' },
{ Cleared: 'cleared' },
{ Reconciled: 'reconciled' },
])
.options({ splits: 'all' }),
);
......@@ -80,6 +93,12 @@ export async function exportQueryToCSV(query) {
Notes: trans.Notes,
Category: trans.Category,
Amount: trans.Amount == null ? 0 : integerToAmount(trans.Amount),
Cleared:
trans.Reconciled === true
? 'Reconciled'
: trans.Cleared === true
? 'Cleared'
: 'Not cleared',
};
});
......
---
category: Enhancements
authors: [kstockk]
---
Add cleared column in csv export
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