From 46f165d13bd9476ee53d72b734d819219d420acc Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Fri, 26 Oct 2018 20:38:55 +0000 Subject: [PATCH] Corrects the report math for members.php as pointed out at #42. --- stats/members.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats/members.php b/stats/members.php index 9e8a882..eb71c33 100644 --- a/stats/members.php +++ b/stats/members.php @@ -75,7 +75,7 @@ $query = "SELECT contact_id, full_name, normal_full_name, email, phone, sort_vis CONCAT(first_name, ' ', last_name) AS normal_full_name, contacts.email AS email, contacts.phone AS phone, COUNT(shop_hours.contact_id) as sort_visits, -ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in))) + MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS sort_hours +ROUND(SUM(HOUR(TIMEDIFF( time_out, time_in)) + MINUTE(TIMEDIFF( time_out, time_in))/60)) AS sort_hours FROM shop_hours LEFT JOIN contacts ON shop_hours.contact_id = contacts.contact_id LEFT JOIN shop_user_roles ON shop_hours.shop_user_role = shop_user_roles.shop_user_role_id