summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-19 08:07:18 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-19 08:07:51 -0400
commit1c2944d8294a6bc25f6429403787ba0a951254bf (patch)
treef650746be90806ed09c42df86a45552adfc44b3f /src/textual.cc
parentfdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc (diff)
downloadledger-1c2944d8294a6bc25f6429403787ba0a951254bf.tar.gz
ledger-1c2944d8294a6bc25f6429403787ba0a951254bf.tar.bz2
ledger-1c2944d8294a6bc25f6429403787ba0a951254bf.zip
When automatically associating lot details with a commodity, use only the
price (based on the cost of the transactions), don't automatically use the date and the entry code -- since most people aren't going to be that specific at the time of sale, it's causes confusion in certain cases.
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/textual.cc b/src/textual.cc
index a0efd4ef..13cf8ea4 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -285,14 +285,8 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL)
per_unit_cost /= xact->amount;
if (xact->amount.commodity() &&
- ! xact->amount.commodity().annotated) {
- if (xact->entry)
- xact->amount.annotate(annotation_t(per_unit_cost,
- xact->entry->actual_date(),
- xact->entry->code));
- else
- xact->amount.annotate(annotation_t(per_unit_cost));
- }
+ ! xact->amount.commodity().annotated)
+ xact->amount.annotate(annotation_t(per_unit_cost));
DEBUG("ledger.textual.parse", "line " << linenum << ": " <<
"Total cost is " << *xact->cost);