bugfix interface.cpp/reportfuncts

This commit is contained in:
MassiveAtoms 2019-07-20 23:37:52 -03:00
parent 8c2cbb8a11
commit ef5ae9dac8
2 changed files with 6 additions and 4 deletions

View File

@ -264,11 +264,13 @@ pair<int, int> create_week_period() {
void report_all_spots(bool weekly) { void report_all_spots(bool weekly) {
pair<int, int> period; pair<int, int> period;
if (weekly) { if (weekly) {
pair<int, int> period = create_week_period(); period = create_week_period(); // remove the pair<int, int>
} else { } else {
pair<int, int> period = create_month_period(); period = create_month_period(); // ^
} }
cout << "working timeperiods: " << period.first << ", " << period.second; // DEBUG
reports_from_allparkspots(period); // TODO: namechange of reports_from_allparkspots in query? reports_from_allparkspots(period); // TODO: namechange of reports_from_allparkspots in query?
} }
@ -280,9 +282,9 @@ void report_single_spot(bool weekly) {
cin.ignore(10000, '\n'); cin.ignore(10000, '\n');
pair<int, int> period; pair<int, int> period;
if (weekly) { if (weekly) {
pair<int, int> period = create_week_period(); period = create_week_period(); // remove the pair<int, int>
} else { } else {
pair<int, int> period = create_month_period(); period = create_month_period();
} }
reports_from_parkspot(spotID, period); reports_from_parkspot(spotID, period);
} }

BIN
test.db3

Binary file not shown.