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