Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction View: LastMonth calculation fixed #670

Closed
wants to merge 13 commits into from
Closed
Prev Previous commit
Transaction View: LastMonth calculation fixed
crowning- committed Jan 11, 2016
commit eff7231c3e0830524484ec04114040fba919680d
9 changes: 8 additions & 1 deletion src/qt/transactionview.cpp
Original file line number Diff line number Diff line change
@@ -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(