summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-28 01:18:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-28 01:18:27 -0400
commitaa45d2d38cffe09ed2503e0df07bee373cc0e7de (patch)
treeb1ee9eaba7e7ff364e571ba74eb4a02afef9983f /src/textual.cc
parentcc532c31aa8aa745d6d02c5c0cb22b3d75866590 (diff)
downloadledger-aa45d2d38cffe09ed2503e0df07bee373cc0e7de.tar.gz
ledger-aa45d2d38cffe09ed2503e0df07bee373cc0e7de.tar.bz2
ledger-aa45d2d38cffe09ed2503e0df07bee373cc0e7de.zip
Further improvements to handling temporaries
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 26500596..4daecc79 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1014,21 +1014,8 @@ post_t * instance_t::parse_post(char * line,
if (! diff.is_zero()) {
if (! post->amount.is_null()) {
diff -= post->amount;
- if (! diff.is_zero()) {
-#if 1
+ if (! diff.is_zero())
throw_(parse_error, _("Balance assertion off by %1") << diff);
-#else
- // This code, rather than issuing an error if a balance assignment
- // fails, creates a balancing transaction that causes the
- // assertion to be true.
- post_t * temp = new post_t(post->account, diff,
- ITEM_GENERATED | POST_CALCULATED);
- xact->add_post(temp);
-
- DEBUG("textual.parse", "line " << linenum << ": "
- << "Created balancing posting");
-#endif
- }
} else {
post->amount = diff;
DEBUG("textual.parse", "line " << linenum << ": "