(format_last_entry): Output tr:cost as an amount, not as an amount

string.
This commit is contained in:
John Wiegley 2005-02-03 05:08:00 +00:00
parent 93d8d2c811
commit 8f63d2d172

View file

@ -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)