summaryrefslogtreecommitdiff
path: root/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-04-13 05:07:58 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 05:07:58 -0400
commit5abfb93a5145e947c5c2f5eb492e7b6fc3f1cd62 (patch)
tree04d836eeabced72e0b98a2946a8fe38e822f7d1c /journal.cc
parent050e87f4e304aabf341e432c8303b8d357f099f2 (diff)
downloadfork-ledger-5abfb93a5145e947c5c2f5eb492e7b6fc3f1cd62.tar.gz
fork-ledger-5abfb93a5145e947c5c2f5eb492e7b6fc3f1cd62.tar.bz2
fork-ledger-5abfb93a5145e947c5c2f5eb492e7b6fc3f1cd62.zip
When building an auto-entry, copy over details so that the resulting
transaction is a mirror of the automated entry's one.
Diffstat (limited to 'journal.cc')
-rw-r--r--journal.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/journal.cc b/journal.cc
index 065825f2..4916cd6f 100644
--- a/journal.cc
+++ b/journal.cc
@@ -371,6 +371,18 @@ void auto_entry_t::extend_entry(entry_base_t& entry, bool post)
transaction_t * xact
= new transaction_t(account, amt, (*t)->flags | TRANSACTION_AUTO);
+
+ // Copy over details so that the resulting transaction is a mirror of
+ // the automated entry's one.
+ xact->state = (*t)->state;
+ xact->_date = (*t)->_date;
+ xact->_date_eff = (*t)->_date_eff;
+ xact->note = (*t)->note;
+ xact->beg_pos = (*t)->beg_pos;
+ xact->beg_line = (*t)->beg_line;
+ xact->end_pos = (*t)->end_pos;
+ xact->end_line = (*t)->end_line;
+
entry.add_transaction(xact);
}
}