Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ private void writeLine(Csv.Writer w, Transaction t) {
Category category = getCategoryById(t.categoryId);
Project project = getProjectById(t.projectId);
Account fromAccount = getAccount(t.fromAccountId);
Payee payee = getPayee(t.payeeId);
if (t.isTransfer()) {
Account toAccount = getAccount(t.toAccountId);
writeLine(w, dt, fromAccount.title, t.fromAmount, fromAccount.currency.id, 0, 0, category, null, TRANSFER_OUT, project, t.note);
writeLine(w, dt, toAccount.title, t.toAmount, toAccount.currency.id, 0, 0, category, null, TRANSFER_IN, project, t.note);
writeLine(w, dt, fromAccount.title, t.fromAmount, fromAccount.currency.id, 0, 0, category, payee, TRANSFER_OUT, project, t.note);
writeLine(w, dt, toAccount.title, t.toAmount, toAccount.currency.id, 0, 0, category, payee, TRANSFER_IN, project, t.note);
} else {
MyLocation location = getLocationById(t.locationId);
Payee payee = getPayee(t.payeeId);
writeLine(w, dt, fromAccount.title, t.fromAmount, fromAccount.currency.id, t.originalFromAmount, t.originalCurrencyId,
category, payee, location, project, t.note);
if (category != null && category.isSplit() && options.exportSplits) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public void should_export_split_transfer() throws Exception {
.create();
assertEquals(
"2011-08-03,22:34:55,My Cash Account,-5.00,SGD,\"\",\"\",SPLIT,\"\",P1,Home,R1,My note\n"+
"~,\"\",My Cash Account,-5.00,SGD,\"\",\"\",\"\",\"\",\"\",Transfer Out,<NO_PROJECT>,\n"+
"~,\"\",My Bank Account,1.00,CZK,\"\",\"\",\"\",\"\",\"\",Transfer In,<NO_PROJECT>,\n",
"~,\"\",My Cash Account,-5.00,SGD,\"\",\"\",\"\",\"\",P1,Transfer Out,<NO_PROJECT>,\n"+
"~,\"\",My Bank Account,1.00,CZK,\"\",\"\",\"\",\"\",P1,Transfer In,<NO_PROJECT>,\n",
exportAsString(options));
}

Expand Down