commit dd7ac7170332c50cbeeee639c985a2398c0c0b22
parent 67f70eea1f65569d1c79f71097211148e0dab6b9
Author: cfillion <cfillion@users.noreply.github.com>
Date: Tue, 19 Jan 2016 17:44:22 -0800
format numbers using the locale format in the report dialog
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/report.cpp b/src/report.cpp
@@ -23,6 +23,7 @@
#include "transaction.hpp"
#include <boost/range/adaptor/reversed.hpp>
+#include <locale>
using namespace std;
@@ -32,6 +33,8 @@ static const char *NL = "\r\n";
Report::Report(Transaction *transaction)
: Dialog(IDD_REPORT_DIALOG), m_transaction(transaction)
{
+ // enable number formatting (ie. "1,234" instead of "1234")
+ m_stream.imbue(locale(""));
}
void Report::onInit()