A whole lot of stuff

This commit is contained in:
Courtney Arnold 2026-08-18 11:04:58 -05:00
parent faf319322a
commit ad850d2be6
50 changed files with 3013 additions and 213 deletions

View file

@ -106,6 +106,18 @@ class FuelReport {
}
}
/// The date range the Reports tab defaults to on open: a year-long window
/// from July 1 through the following June 30, matching how Missouri's
/// fuel tax refund periods run. Which specific year that window falls in
/// rolls over on August 1: from August of year Y through July of year
/// Y+1, this stays July Y–June (Y+1) throughout — the most recently
/// completed (or currently running) period — rather than jumping to a
/// brand new, still-empty one the moment August 1 hits.
(DateTime start, DateTime end) defaultReportDateRange(DateTime now) {
final fiscalStartYear = now.month >= 8 ? now.year : now.year - 1;
return (DateTime(fiscalStartYear, 7, 1), DateTime(fiscalStartYear + 1, 6, 30));
}
/// Builds a per-vehicle fuel summary for [startDate]–[endDate] (inclusive,
/// judged by each entry's purchase date, in local time), restricted to
/// entries that actually have a receipt attached — a report meant to