Skip to content

Commit

Permalink
Fix QIF export of multiple accounts
Browse files Browse the repository at this point in the history
Before every account's transactions needs to be a "!Account\n", else
import of the QIF fails. Tested with KMoney.
  • Loading branch information
humdingerb committed Nov 9, 2024
1 parent 4cebe29 commit d611af4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,9 @@ ExportQIF(const entry_ref& ref)
text = "";

// Export accounts
text << "!Account\n";
for (int32 i = 0; i < gDatabase.CountAccounts(); i++) {
Account* account = gDatabase.AccountAt(i);
text << "N" << account->Name() << "\nTBank\n^\n!Type:Bank\n";
text << "!Account\n" << "N" << account->Name() << "\nTBank\n^\n!Type:Bank\n";

command = "SELECT * FROM account_";
command << account->GetID() << " ORDER BY date;";
Expand Down

0 comments on commit d611af4

Please sign in to comment.