summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)