How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Disable "group by month" on affiliate overview (admin area)



Idea is to allow an option (toggle) whether to group by month affiliate data inside chart or to display them individually per each day. Reason for implementation is to see the daily trend.
This is the url I'm talking about: https://whmcs_root/admin/affiliates.php?action=edit&id=1

Proposal for implementation (convert it to capsule syntax you're using, it should be easier to do it that way):


$query = 'select tblaffiliates_hits.created_at,COUNT(tblaffiliates_hits.id) as hits from tblaffiliates_hits inner join tblaffiliates_referrers on tblaffiliates_referrers.id = tblaffiliates_hits.referrer_id where tblaffiliates_hits.affiliate_id = ? and tblaffiliates_hits.created_at > ?';
if ('month' === $_GET['group']) {
$query .= ' group by date_format(tblaffiliates_hits.created_at, '%M %Y')';
}
$query .= ' order by tblaffiliates_hits.created_at desc';


Thanks in advance,
Viktor

Post the first comment

Login to post a comment.