From a092c4a234b9b57add3c77f7b7b744eb434239c3 Mon Sep 17 00:00:00 2001 From: Richard Toth Date: Wed, 18 Dec 2024 16:44:56 +0100 Subject: [PATCH] allow kids on presence list if they had lease last month --- _include/include_presence.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_include/include_presence.php b/_include/include_presence.php index 0811cc7..af2a076 100644 --- a/_include/include_presence.php +++ b/_include/include_presence.php @@ -72,6 +72,7 @@ if ($this->is_id()) { $exeptions[] = $user->get_uk_id(); } + $firstDayOfLastMonth = (new DateTime('first day of last month'))->format('Y-m-d'); $rest_user_query = " SELECT @@ -80,7 +81,7 @@ if ($this->is_id()) { user_kid LEFT JOIN money_deposit ON mod_user_kid_uk_id = uk_id - AND mod_expire_date > NOW() + AND mod_expire_date > {$firstDayOfLastMonth} AND mod_deleted = 0 LEFT JOIN lease ON l_id = mod_lease_l_id