Jump to content

Admin Summary useless - 5.1.2


zelatech

Recommended Posts

I'm opening this thread to see if there's other people believing that admin summary in v 5.1.2 is useless.

 

I mean, it's ok to have the possibility to look at % of active client/services and due invoices, but what about "Today Orders" or "Pending Order" direct link in admin summery? This is far more useful than percents...

 

Also, there's no point of having "Support Ticket Overview" of 300px height, as it's considered to be in "Attention Items" already, it would be better to have a better view of all the tickets like in v 5.0.3

 

 

All this is obviously IMHO, hope someone would like to reply or integrate with other feedback.

 

:)

Link to comment
Share on other sites

The biggest problem for me is that we only use 1 support department. I hate companies that make 100 different departments and try to act like a big corporate company by having "billing, support, technical, security, blah blah blah..." - All of our support people are all intelligent enough to be able to answer almost all support emails we get and therefore the pie chart for support departments is useless for us.

 

The system overview graph also doesn't make much sense to me but maybe someone can shed some light on how "active" and "inactive" clients are used... When do you mark a client as inactive? All of our clients are active. If they cancel a product or service we simply cancel that item not their entire account. Just because they cancelled something does not mean that they wont return later to buy something else. What am I missing here?

Link to comment
Share on other sites

I'm opening this thread to see if there's other people believing that admin summary in v 5.1.2 is useless.

 

I mean, it's ok to have the possibility to look at % of active client/services and due invoices, but what about "Today Orders" or "Pending Order" direct link in admin summery? This is far more useful than percents...

 

Also, there's no point of having "Support Ticket Overview" of 300px height, as it's considered to be in "Attention Items" already, it would be better to have a better view of all the tickets like in v 5.0.3

 

 

All this is obviously IMHO, hope someone would like to reply or integrate with other feedback.

 

:)

 

 

I feel the exact same way... I've already contacted support about this, I would love to roleback to the previous version, as it so was much better on the admin side.

 

The new version just has so much crap in it, it's silly. Bring back the old admin summary!

Link to comment
Share on other sites

for system summary i've edited like this:

 

<?php

 

function widget_system_overview($vars) {

global $_ADMINLANG;

 

$title = $_ADMINLANG['home']['sysoverview'];

 

if ($_POST['getsystemoverview']) {

 

$result = full_query("SELECT COUNT(*) FROM tblclients WHERE status='Active'");

$data = mysql_fetch_array($result);

$activeclients = $data[0];

 

$result = full_query("SELECT COUNT(*) FROM tblhosting WHERE domainstatus='Active'");

$data = mysql_fetch_array($result);

$activeservices = $data[0];

 

$result = full_query("SELECT COUNT(*),SUM(total)-COALESCE(SUM((SELECT SUM(amountin) FROM tblaccounts WHERE tblaccounts.invoiceid=tblinvoices.id)),0) FROM tblinvoices WHERE tblinvoices.status='Unpaid' AND duedate<'" . date("Ymd") . "'");

$data = mysql_fetch_array($result);

$overdueinvoices = $data[0];

$overdueinvoicesbal = $data[1];

 

$result = full_query("SELECT COUNT(*) FROM tblcancelrequests INNER JOIN tblhosting ON tblhosting.id=tblcancelrequests.relid WHERE (tblhosting.domainstatus!='Cancelled' AND tblhosting.domainstatus!='Terminated')");

$data = mysql_fetch_array($result);

$pendingcancellations = $data[0];

 

$orders = array();

$orders["today"]["active"]=$orders["today"]["fraud"]=$orders["today"]["pending"]=$orders["today"]["cancelled"]=0;

$query = "SELECT status,COUNT(*) FROM tblorders WHERE date LIKE '".date("Y-m-d")."%' GROUP BY status";

$result = mysql_query($query);

while ($data = mysql_fetch_array($result)) {

$orders["today"][strtolower($data[0])] = $data[1];

}

$orders["today"]["total"] = $orders["today"]["active"]+$orders["today"]["fraud"]+$orders["today"]["pending"]+$orders["today"]["cancelled"];

$orders["yesterday"]["active"]=$orders["yesterday"]["fraud"]=$orders["yesterday"]["pending"]=$orders["yesterday"]["cancelled"]=0;

$query = "SELECT status,COUNT(*) FROM tblorders WHERE date LIKE '".date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y")))."%' GROUP BY status";

$result = mysql_query($query);

while ($data = mysql_fetch_array($result)) {

$orders["yesterday"][strtolower($data[0])] = $data[1];

}

$orders["yesterday"]["total"] = $orders["yesterday"]["active"]+$orders["yesterday"]["fraud"]+$orders["yesterday"]["pending"]+$orders["yesterday"]["cancelled"];

 

$statusfilter = '';

$result = select_query("tblticketstatuses","title",array("showawaiting"=>"1"));

while ($data = mysql_fetch_array($result)) $statusfilter .= "'".$data[0]."',";

$statusfilter = substr($statusfilter,0,-1);

$result = full_query("SELECT COUNT(*) FROM tbltickets WHERE status IN ($statusfilter)");

$data = mysql_fetch_array($result);

$ticketsawaitingreply = $data[0];

 

$validquotes = get_query_val("tblquotes","COUNT(*)",array("validuntil"=>array("sqltype"=>">","value"=>date("Ymd"))));

 

//v5.1.2

$activeclients = get_query_val("tblclients","COUNT(id)","status='Active'");

$totalclients = get_query_val("tblclients","COUNT(id)","");

$clientsactive = round((($activeclients/$totalclients)*100),0);

 

$activeservices = get_query_val("tblhosting","COUNT(id)","domainstatus='Active'");

$totalservices = get_query_val("tblhosting","COUNT(id)","");

$servicesactive = round((($activeservices/$totalservices)*100),0);

 

$unpaidinvoices = get_query_val("tblinvoices","COUNT(id)","status='Unpaid'");

$overdueinvoices = get_query_val("tblinvoices","COUNT(id)","status='Unpaid' AND duedate<'".date("Ymd")."'");

$overduestatus = round((($overdueinvoices/$unpaidinvoices)*100),0);

// Fine v5.1.2

echo '

<table width="100%">

<tr>

<td class="sysoverviewstat"><div class="sysoverviewbox"><a href="orders.php">'.$orders["today"]["total"].'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['todaysorders'].'</td>

<td class="sysoverviewstat"><div class="sysoverviewbox green"><a href="clients.php?status=Active">'.$activeclients.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['activeclients'].'</a></td>

</tr>

<tr>

<td class="sysoverviewstat"><div class="sysoverviewbox"><a href="orders.php">'.$orders["yesterday"]["total"].'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['yesterdaysorders'].'</a></td>

<td class="sysoverviewstat"><div class="sysoverviewbox green"><a href="clientshostinglist.php?status=Active">'.$activeservices.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['activeservices'].'</a></td>

</tr>

<tr>

<td class="sysoverviewstat"><div class="sysoverviewbox gold"><a href="orders.php?status=Pending">'.$orders["today"]["pending"].'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['todayspending'].'</a></td>

<td class="sysoverviewstat"><div class="sysoverviewbox red"><a href="invoices.php?status=Overdue">'.$overdueinvoices.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['overdueinvoices'].'</a></td>

</tr>

<tr>

<td class="sysoverviewstat"><div class="sysoverviewbox green"><a href="orders.php?status=Active">'.$orders["today"]["active"].'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['todayscompleted'].'</a></td>

<td class="sysoverviewstat"><div class="sysoverviewbox gold"><a href="cancelrequests.php">'.$pendingcancellations.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['pendingcancellations'].'</a></td>

</tr>

<tr>

<td class="sysoverviewstat"><div class="sysoverviewbox red"><a href="supporttickets.php">'.$ticketsawaitingreply.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['ticketsawaitingreply'].'</a></td>

<td class="sysoverviewstat"><div class="sysoverviewbox"><a href="quotes.php?validity=Valid">'.$validquotes.'</a></div></td>

<td class="sysoverviewlabel">'.$_ADMINLANG['stats']['validquotes'].'</a></td>

</tr>

</table>

<table width="100%">

<tr>

<td width="150">Clients</td>

<td>

<div class="percentbar">

<div class="active" style="width:'.$clientsactive.'%">'.$clientsactive.'% Active</div>

</div>

</td>

<td class="totals">'.$totalclients.'</td>

</tr>

<tr>

<td>Services</td>

<td>

<div class="percentbar">

<div class="active" style="width:'.$servicesactive.'%">'.$servicesactive.'% Active</div>

</div>

</td>

<td class="totals">'.$totalservices.'</td>

</tr>

<tr>

<td>Unpaid Invoices</td>

<td>

<div class="percentbar">

<div class="overdue" style="width:'.$overduestatus.'%">'.$overduestatus.'% Overdue</div>

</div>

</td>

<td class="totals">'.$unpaidinvoices.'</td>

</tr>

</table>

';

 

exit;

 

}

 

$adminusername = get_query_val("tbladmins","username",array("id"=>$vars['adminid']));

$lastlogin = get_query_vals("tbladminlog","lastvisit,ipaddress",array("adminusername"=>$adminusername),"lastvisit","DESC","1,1");

$lastlogindate = ($lastlogin[0]) ? fromMySQLDate($lastlogin[0],true) : '(None Recorded)';

$lastloginip = ($lastlogin[1]) ? $lastlogin[1] : '-';

 

$content = '

<style>

.sysoverviewlabel {

width: 30%;

text-align: left;

color: #444;

}

.sysoverviewstat {

width: 20%;

}

.sysoverviewbox {

margin: 0 10px 0 auto;

padding: 0;

width: 100px;

background-color: #fff;

border: 1px dashed #ccc;

color: #fff;

font-size: 1.6em;

text-align: center;

-moz-border-radius: 5px;

-webkit-border-radius: 5px;

-o-border-radius: 5px;

border-radius: 5px;

}

.sysoverviewbox a {

padding: 2px;

color: #1A4D80;

text-decoration: none;

display: block;

}

.sysoverviewbox.red a {

color: #cc0000;

}

.sysoverviewbox.gold a {

color: #D5AA00;

}

.sysoverviewbox.green a {

color: #61AB3D;

}

.lastlogin {

margin-top:5px;

padding:3px;

background-color:#efefef;

text-align: center;

-moz-border-radius: 4px;

-webkit-border-radius: 4px;

-o-border-radius: 4px;

border-radius: 4px;

}

 

#systemoverviewstats div.percentbar {

width: 100%;

height: 24px;

border: 1px solid #ccc;

background-color: #efefef;

}

#systemoverviewstats div.percentbar div.active {

height: 24px;

line-height: 24px;

background-color: #84B429;

color: #fff;

font-weight: bold;

text-align: center;

overflow: hidden;

}

#systemoverviewstats div.percentbar div.overdue {

height: 24px;

line-height: 24px;

background-color: #cc0000;

color: #fff;

font-weight: bold;

text-align: center;

}

</style>

 

<div id="systemoverviewstats">'.$vars['loading'].'</div>

 

<div style="clear:both;"></div>

 

<div class="lastlogin">'.$_ADMINLANG['home']['lastlogin'].': <b>'.$lastlogindate.'</b> '.$_ADMINLANG['home']['lastloginip'].' <b>'.$lastloginip.'</b></div>

 

';

 

$statusfilter = '';

$result = select_query("tblticketstatuses","title",array("showawaiting"=>"1"));

while ($data = mysql_fetch_array($result)) $statusfilter .= "'".$data[0]."',";

$statusfilter = substr($statusfilter,0,-1);

$result = full_query("SELECT COUNT(*) FROM tbltickets WHERE status IN ($statusfilter)");

$data = mysql_fetch_array($result);

$ticketsawaitingreply = $data[0];

$result = full_query("SELECT COUNT(*) FROM tblcancelrequests INNER JOIN tblhosting ON tblhosting.id=tblcancelrequests.relid WHERE (tblhosting.domainstatus!='Cancelled' AND tblhosting.domainstatus!='Terminated')");

$data = mysql_fetch_array($result);

$cancellationrequests = $data[0];

$result = full_query("SELECT COUNT(*) FROM tbltodolist WHERE status!='Completed' AND status!='Postponed' AND duedate<='".date("Y-m-d")."'");

$data = mysql_fetch_array($result);

$todoitemsdue = $data[0];

$result = full_query("SELECT COUNT(*) FROM tblnetworkissues WHERE status!='Scheduled' AND status!='Resolved'");

$data = mysql_fetch_array($result);

$opennetworkissues = $data[0];

 

$jquerycode = 'jQuery.post("index.php", { getsystemoverview: 1 },

function(data){

jQuery("#systemoverviewstats").html(data);

jQuery("#systemoverviewstats").slideDown();

jQuery("#sysoverviewbanner").html("<div style=\"margin:0 0 -5px 0;padding: 10px;background-color: #FBEEEB;border: 1px dashed #cc0000;font-weight: bold;color: #cc0000;font-size:14px;text-align: center;-moz-border-radius: 10px;-webkit-border-radius: 10px;-o-border-radius: 10px;border-radius: 10px;\">'.$_ADMINLANG['global']['attentionitems'].':   <a href=\"supporttickets.php\">'.$ticketsawaitingreply.' '.$_ADMINLANG['stats']['ticketsawaitingreply'].'</a>  -  <a href=\"cancelrequests.php\">'.$cancellationrequests.' '.$_ADMINLANG['stats']['pendingcancellations'].'</a>  -  <a href=\"todolist.php\">'.$todoitemsdue.' '.$_ADMINLANG['stats']['todoitemsdue'].'</a>  -  <a href=\"networkissues.php\">'.$opennetworkissues.' '.$_ADMINLANG['stats']['opennetworkissues'].'</a></div>");

});';

 

return array('title'=>$title,'content'=>$content,'jquerycode'=>$jquerycode);

 

}

 

function widget_system_overview_home_banner() {

return '<div id="sysoverviewbanner"><div style="margin:0;padding: 10px;background-color: #FBEEEB;border: 1px dashed #cc0000;font-weight: bold;color: #cc0000;font-size:14px;text-align: center;"><img src="images/loading.gif" /></div></div>';

}

 

add_hook("AdminHomeWidgets",1,"widget_system_overview");

add_hook("AdminHomepage",1,"widget_system_overview_home_banner");

 

 

?>

 

As for ticket i've edited like this:

 

<?php

 

function widget_supporttickets_overview($vars) {

global $_ADMINLANG;

 

$title = "Support Tickets Overview";

 

if ($_POST['getsupportticketsoverview']) {

 

if (!function_exists("getShortLastReplyTime")) require(ROOTDIR.'/includes/ticketfunctions.php');

 

$result = select_query("tbladmins","supportdepts",array("id"=>$_SESSION['adminid']));

$data = mysql_fetch_array($result);

$admin_supportdepts = $data["supportdepts"];

$admin_supportdepts_qry = array();

$admin_supportdepts = explode(',',$admin_supportdepts);

foreach ($admin_supportdepts AS $deptid) if (trim($deptid)) $admin_supportdepts_qry[] = (int)$deptid;

 

$allactive=$awaitingreply=0;

$ticketcounts = array();

$result = select_query("tbltickets","COUNT(*)","status!='Closed' AND flag='".(int)$_SESSION["adminid"]."'");

$data = mysql_fetch_array($result);

$query = "SELECT tblticketstatuses.id,tblticketstatuses.title,(SELECT COUNT(*) FROM tbltickets WHERE did IN (".implode(',',$admin_supportdepts).") AND tbltickets.status=tblticketstatuses.title),showactive,showawaiting FROM tblticketstatuses ORDER BY sortorder ASC";

$result = mysql_query($query);

while ($data = mysql_fetch_array($result)) {

$ticketcounts[] = array("id"=>$data[0],"title"=>$data[1],"count"=>$data[2]);

if ($data['showactive']) $allactive += $data[2];

if ($data['showawaiting']) $awaitingreply += $data[2];

}

$ticketcounts = array_reverse($ticketcounts);

 

echo '<div class="ticketstatuses">';

foreach ($ticketcounts AS $vals) echo '<div onclick="loadTickets(\''.$vals['id'].'\')">'.$vals['title'].' ('.$vals['count'].')</div>';

echo '</div>

<div class="clear"></div>

<div class="ticketsoverviewcontainer">

<table width="100%" bgcolor="#cccccc" cellspacing="1">

<tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td width="20"></td><td>'.$_ADMINLANG['fields']['date'].'</td><td>'.$_ADMINLANG['support']['department'].'</td><td>'.$_ADMINLANG['fields']['subject'].'</td><td>'.$_ADMINLANG['support']['lastreply'].'</td></tr>

';

if (is_numeric($_REQUEST['statusid'])) {

$status = get_query_val("tblticketstatuses","title",array("id"=>$_REQUEST['statusid']));

$result = select_query("tbltickets","tbltickets.*,(SELECT name FROM tblticketdepartments WHERE tblticketdepartments.id=tbltickets.did) AS deptname","did IN (".implode(',',$admin_supportdepts).") AND status='".db_escape_string($status)."'","lastreply","DESC","0,25");

}

 

$notickets = true;

while ($data = mysql_fetch_array($result)) {

$id = $data['id'];

$date = $data['date'];

$deptname = $data['deptname'];

$tid = $data['tid'];

$title = $data['title'];

$priority = $data['urgency'];

$lastreply = $data['lastreply'];

$lastreply = getShortLastReplyTime($lastreply);

$title = (strlen($title)>60) ? substr($title,0,60).'...' : $title;

echo '<tr bgcolor="#ffffff"><td align="center"><img src="images/'.strtolower($priority).'priority.gif" width="16" height="16" alt="'.$priority.'" class="absmiddle" /></td><td align="center">'.fromMySQLDate($date,1).'</td><td align="center">'.$deptname.'</td><td><a href="supporttickets.php?action=viewticket&id='.$id.'">#'.$tid.' - '.$title.'</a></td><td align="center">'.$lastreply.'</td></tr>';

$notickets = false;

}

if ($notickets) echo '<tr bgcolor="#ffffff"><td colspan="5" align="center">'.$_ADMINLANG['global']['norecordsfound'].'</td></tr>';

echo '</table>

<div class="ticketoverviewlink"><a href="supporttickets.php?view='.$status.'">'.$_ADMINLANG['home']['viewall'].' »</a></div>

</div>';

exit;

}

 

$content = '

<style>

.ticketstatuses div {

float: right;

margin: 0 5px 5px 0;

padding: 3px 7px;

background-color:#1A4D80;

font-size: 11px;

color:#fff;

-moz-border-radius: 6px;

-webkit-border-radius: 6px;

-o-border-radius: 6px;

border-radius: 6px;

}

.ticketstatuses div:hover {

background-color:#E5E5E5;

color:#000;

cursor: hand;

cursor: pointer;

}

.ticketsoverviewcontainer {

max-height:150px;

overflow:auto;

}

.ticketoverviewlink {

padding: 8px 10px 4px 0;

text-align: right;

}

</style>

<div id="ticketsoverviewtable">'.$vars['loading'].'</div>

';

 

$jscode = 'function loadTickets(status) {

$("#ticketsoverviewcontainer").html("'.str_replace('"','\"',$vars['loading']).'");

jQuery.post("index.php", { getsupportticketsoverview: 1, statusid: status },

function(data){

jQuery("#ticketsoverviewtable").html(data);

});

}';

$jquerycode = 'loadTickets();';

 

return array('title'=>$title,'content'=>$content,'jquerycode'=>$jquerycode,'jscode'=>$jscode);

 

}

 

add_hook("AdminHomeWidgets",1,"widget_supporttickets_overview");

 

?>

 

you have to edit files in /modules/widgets

 

This is with the red notice bar at the top and the % as for v 5.1.2 for admin summary with no uninvoicedbillableitems and flagged plus tickets summary like v5.0.3 without flagged, hope this helps. :)

Link to comment
Share on other sites

I feel the exact same way... I've already contacted support about this, I would love to roleback to the previous version, as it so was much better on the admin side.

 

The new version just has so much crap in it, it's silly. Bring back the old admin summary!

 

I do believe that the instructions for upgrading said to backup your entire WHMCS to include the database. On that basis, it would be a simple matter to rollback to the previous version.

 

If it is the widgets you do not like, see Matt's response in http://forum.whmcs.com/showthread.php?50818-Not-impressed-with-5-1-2-so-far-quite-dissapointed.

Link to comment
Share on other sites

I also was missing Admin Summary, but that was very easy to fix. Just copy the system_overview.php from the previous version to .../modules/widgets/ Thats it.

 

I wish that would be that easy with orders_overview.php. Unfortunately he does not find the graph since the update. Anybody got a fix for that issue? I opened a Thread: http://forum.whmcs.com/showthread.php?52022-Oder-Overview-missing-after-Update-to-5-1-2&p=238322#post238322

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated