From 1e59cf0ceba760e5783a5511473b3ed8892181f1 Mon Sep 17 00:00:00 2001 From: crowning- Date: Mon, 11 Jan 2016 21:49:42 +0100 Subject: [PATCH] Transaction View: LastMonth calculation fixed --- src/qt/transactionview.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 1fc99c81a..278745301 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -280,9 +280,16 @@ void TransactionView::chooseDate(int idx) TransactionFilterProxy::MAX_DATE); break; case LastMonth: - transactionProxyModel->setDateRange( + if (current.month() == 1){ + transactionProxyModel->setDateRange( + QDateTime(QDate(current.year()-1, 12, 1)), + QDateTime(QDate(current.year(), current.month(), 1))); + } + else { + transactionProxyModel->setDateRange( QDateTime(QDate(current.year(), current.month()-1, 1)), QDateTime(QDate(current.year(), current.month(), 1))); + } break; case ThisYear: transactionProxyModel->setDateRange(