{"action":"created","issue":{"url":"https://api.github.com/repos/micwallace/wallacepos/issues/61","repository_url":"https://api.github.com/repos/micwallace/wallacepos","labels_url":"https://api.github.com/repos/micwallace/wallacepos/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/micwallace/wallacepos/issues/61/comments","events_url":"https://api.github.com/repos/micwallace/wallacepos/issues/61/events","html_url":"https://github.com/micwallace/wallacepos/issues/61","id":177973210,"number":61,"title":"SQL queries processdt for Graphs are wrong","user":{"login":"pwnyxxxpress","id":22263624,"avatar_url":"https://avatars.githubusercontent.com/u/22263624?v=3","gravatar_id":"","url":"https://api.github.com/users/pwnyxxxpress","html_url":"https://github.com/pwnyxxxpress","followers_url":"https://api.github.com/users/pwnyxxxpress/followers","following_url":"https://api.github.com/users/pwnyxxxpress/following{/other_user}","gists_url":"https://api.github.com/users/pwnyxxxpress/gists{/gist_id}","starred_url":"https://api.github.com/users/pwnyxxxpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwnyxxxpress/subscriptions","organizations_url":"https://api.github.com/users/pwnyxxxpress/orgs","repos_url":"https://api.github.com/users/pwnyxxxpress/repos","events_url":"https://api.github.com/users/pwnyxxxpress/events{/privacy}","received_events_url":"https://api.github.com/users/pwnyxxxpress/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T06:10:17Z","updated_at":"2016-09-20T07:18:29Z","closed_at":null,"body":"The Sale Graph on the dashboard and Graph page aren't showing any results. Dug deeper and noticed the date ranges for the Graph page are going from Thu, 01 Sep 2016 04:00:00 GMT (1472702400000) to Sun, 20 Oct 1957 04:24:32 GMT('-384982528) when I was expecting ranges between Sept 13 to Sept 20 2016. The Sale Stats on the Dashboard are updating properly though.\r\n\r\nDB query log. Note the processdt ranges\r\n\r\n551 Connect\tsystempos@localhost on posdb\r\n551 Query\tSET time_zone = '+00:00'\r\n550 Query\tSELECT *, d.id as groupid, d.name as name, SUM(s.total) as stotal, COUNT(s.id) as snum, COALESCE(GROUP_CONCAT(s.ref SEPARATOR ','),'') as refs FROM sales as s LEFT JOIN locations as d ON s.locationid=d.id WHERE (s.processdt>= '1472702400000' AND s.processdt<= '-384982528') AND status!= '3' GROUP BY s.locationid\r\n550 Query\tSELECT *, d.id as groupid, d.name as name, SUM(s.total) as stotal, COUNT(s.id) as snum, COALESCE(GROUP_CONCAT(s.ref SEPARATOR ','),'') as refs FROM sales as s LEFT JOIN locations as d ON s.locationid=d.id WHERE (s.processdt>= '1472702400000' AND s.processdt<= '-384982528') AND status= '3' GROUP BY s.locationid\r\n551 Query\tSELECT *, d.id as groupid, d.name as name, SUM(v.amount) as stotal, COUNT(v.id) as snum, GROUP_CONCAT(s.ref SEPARATOR ',') as refs FROM sale_voids as v LEFT JOIN sales as s ON v.saleid=s.id LEFT JOIN locations as d ON v.locationid=d.id WHERE (v.processdt>= '1472702400000' AND v.processdt<= '-384982528') AND v.void= '0' GROUP BY v.locationid\r\n550 Quit\t\r\n\r\n## Process\r\n\r\n1. Fresh install\r\n2. Add some POS sales\r\n3.  Sale Graph on the dashboard and Graph page don't update\r\n\r\n## Expected result\r\n\r\nExpected Sale Graph on the dashboard and Graph page to update with data.\r\n\r\n## Current result\r\n\r\nSale Graph on the dashboard and Graph page don't update with data.\r\n\r\n## Possible Fix\r\n\r\nNot sure yet still looking into it.\r\n\r\n## screenshot\r\n\r\nn/a\r\n"},"comment":{"url":"https://api.github.com/repos/micwallace/wallacepos/issues/comments/248223076","html_url":"https://github.com/micwallace/wallacepos/issues/61#issuecomment-248223076","issue_url":"https://api.github.com/repos/micwallace/wallacepos/issues/61","id":248223076,"user":{"login":"micwallace","id":3140819,"avatar_url":"https://avatars.githubusercontent.com/u/3140819?v=3","gravatar_id":"","url":"https://api.github.com/users/micwallace","html_url":"https://github.com/micwallace","followers_url":"https://api.github.com/users/micwallace/followers","following_url":"https://api.github.com/users/micwallace/following{/other_user}","gists_url":"https://api.github.com/users/micwallace/gists{/gist_id}","starred_url":"https://api.github.com/users/micwallace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micwallace/subscriptions","organizations_url":"https://api.github.com/users/micwallace/orgs","repos_url":"https://api.github.com/users/micwallace/repos","events_url":"https://api.github.com/users/micwallace/events{/privacy}","received_events_url":"https://api.github.com/users/micwallace/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T07:18:29Z","updated_at":"2016-09-20T07:18:29Z","body":"Check the output of the browser console to view the output of the api call. If your using mysql 5.7 you may need to disable ONLY_FULL_GROUP_BY:\r\nhttp://stackoverflow.com/questions/23921117/disable-only-full-group-by"}}
{"actor":{"display_login":"micwallace"}}