the QIF parser was too order dependent
This commit is contained in:
parent
7e2af9b73d
commit
9d4f839263
1 changed files with 8 additions and 4 deletions
12
qif.cc
12
qif.cc
|
|
@ -31,6 +31,10 @@ unsigned int parse_qif_file(std::istream& in, journal_t * journal,
|
|||
account_t * misc = journal->find_account("Miscellaneous");
|
||||
unsigned int count;
|
||||
|
||||
entry.reset(new entry_t);
|
||||
xact = new transaction_t(master);
|
||||
entry->add_transaction(xact);
|
||||
|
||||
path = journal->sources.back();
|
||||
linenum = 1;
|
||||
|
||||
|
|
@ -65,10 +69,6 @@ unsigned int parse_qif_file(std::istream& in, journal_t * journal,
|
|||
break;
|
||||
|
||||
case 'D':
|
||||
entry.reset(new entry_t);
|
||||
xact = new transaction_t(master);
|
||||
entry->add_transaction(xact);
|
||||
|
||||
in >> line;
|
||||
if (! parse_date(line, &entry->date))
|
||||
throw parse_error(path, linenum, "Failed to parse date");
|
||||
|
|
@ -150,6 +150,10 @@ unsigned int parse_qif_file(std::istream& in, journal_t * journal,
|
|||
|
||||
if (journal->add_entry(entry.release()))
|
||||
count++;
|
||||
|
||||
entry.reset(new entry_t);
|
||||
xact = new transaction_t(master);
|
||||
entry->add_transaction(xact);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue