Add CSV Export
Set DateFrom to first of month for SearchBanner Fix a bug : for dates in Search Fix a bug : file was not truncated during export
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2010-2012 Grégory Soutadé
|
||||
Copyright 2010-2013 Grégory Soutadé
|
||||
|
||||
This file is part of KissCount.
|
||||
|
||||
@@ -42,7 +42,7 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
|
||||
// _calendarFrom->setNavigationBarVisible(false);
|
||||
_calendarFrom->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
|
||||
_calendarFrom->setMaximumSize(_calendarFrom->sizeHint());
|
||||
_calendarFrom->setSelectedDate(QDate::currentDate());
|
||||
_calendarFrom->setSelectedDate(firstOfMonth);
|
||||
|
||||
connect(_calendarFrom, SIGNAL(currentPageChanged(int, int)), this, SLOT(OnCalendarFromPageChanged(int, int)));
|
||||
|
||||
@@ -157,19 +157,19 @@ std::vector<Operation> * SearchBanner::Search()
|
||||
if (_checkDateFrom->checkState() == Qt::Checked)
|
||||
{
|
||||
dateFrom = new QDate();
|
||||
*dateFrom = _calendarFrom->selectedDate().addMonths(-1);
|
||||
*dateFrom = _calendarFrom->selectedDate();
|
||||
}
|
||||
|
||||
if (_checkDateTo->checkState() == Qt::Checked)
|
||||
{
|
||||
dateTo = new QDate();
|
||||
*dateTo = _calendarTo->selectedDate().addMonths(-1);
|
||||
*dateTo = _calendarTo->selectedDate();
|
||||
}
|
||||
|
||||
if (dateFrom && dateTo && *dateFrom > *dateTo)
|
||||
{
|
||||
QMessageBox::critical(0, _("Error"), _("Invalid date range"));
|
||||
goto end;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (_amountFrom->text().length())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2010-2012 Grégory Soutadé
|
||||
Copyright 2010-2013 Grégory Soutadé
|
||||
|
||||
This file is part of KissCount.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user