1
0

overview.php 821 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. use Carbon\CarbonImmutable;
  3. Core::addBreadcrumb("/account", __("Account"));
  4. Core::addBreadcrumb("/account/overview", __("Overview"));
  5. $page_title = __("Overview");
  6. $dt_now = CarbonImmutable::now(TIMEZONE);
  7. $ranges = [];
  8. $ranges[] = [
  9. "name" => __("Year to Date"),
  10. "start" => $dt_now->startOfYear(),
  11. "end" => $dt_now->endOfYear()
  12. ];
  13. $ranges[] = [
  14. "name" => __("Last Month"),
  15. "start" => $dt_now->subMonthNoOverflow()->startOfMonth(),
  16. "end" => $dt_now->subMonthNoOverflow()->endOfMonth(),
  17. ];
  18. $ranges[] = [
  19. "name" => __("This Month"),
  20. "start" => $dt_now->startOfMonth(),
  21. "end" => $dt_now->endOfMonth(),
  22. ];
  23. View::includeOnce("header", compact("page_title"));
  24. View::include("overview", compact("page_title", "ranges"));
  25. View::includeOnce("footer");