From ab67929a223c0d973bf30a62beace4384e101f62 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 21 Jun 2023 16:03:56 -0400 Subject: [PATCH] Add All Years Option to Income by Clients Report --- report_income_by_client.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/report_income_by_client.php b/report_income_by_client.php index 5606eca9..de173992 100644 --- a/report_income_by_client.php +++ b/report_income_by_client.php @@ -4,7 +4,11 @@ require_once("inc_all_reports.php"); validateAccountantRole(); if (isset($_GET['year'])) { - $year = intval($_GET['year']); + if ($_GET['year'] === 'all') { + $year = 'all'; + } else { + $year = intval($_GET['year']); + } } else { $year = date('Y'); } @@ -26,6 +30,7 @@ $sql_payment_years = mysqli_query($mysqli, "SELECT DISTINCT YEAR(payment_date) A