summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-03 05:08:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:40:53 -0400
commit8f63d2d172f45238958347a0bdeae3af4d5a81f0 (patch)
tree7ae377f01e084734823ae37ebff2ad0a1564e540 /format.cc
parent93d8d2c81188919e3b7e80c645945e6d10808fb5 (diff)
downloadfork-ledger-8f63d2d172f45238958347a0bdeae3af4d5a81f0.tar.gz
fork-ledger-8f63d2d172f45238958347a0bdeae3af4d5a81f0.tar.bz2
fork-ledger-8f63d2d172f45238958347a0bdeae3af4d5a81f0.zip
(format_last_entry): Output tr:cost as an amount, not as an amount
string.
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/format.cc b/format.cc
index 534a592a..7b3012bb 100644
--- a/format.cc
+++ b/format.cc
@@ -654,8 +654,11 @@ void format_xml_entries::format_last_entry()
xml_write_value(output_stream, value_t((*i)->amount), 10);
output_stream << " </tr:amount>\n";
- if ((*i)->cost)
- output_stream << " <tr:cost>" << *(*i)->cost << "</tr:cost>\n";
+ if ((*i)->cost) {
+ output_stream << " <tr:cost>\n";
+ xml_write_value(output_stream, value_t(*(*i)->cost), 10);
+ output_stream << " </tr:cost>\n";
+ }
if (! (*i)->note.empty())
output_stream << " <tr:note>" << xml_string((*i)->note)