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
9 changes: 8 additions & 1 deletion src/qt/transactionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down