芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/portal.pulsehost.co.uk/modules/reports/new_customers.php
firstOfMonth()->toDateTimeString(); $firstOfMonth2 = $dateRangeLastYear->firstOfMonth()->toDateTimeString(); $lastOfMonth = $dateRange->endOfMonth()->toDateTimeString(); $lastOfMonth2 = $dateRangeLastYear->endOfMonth()->toDateTimeString(); $newsignups = Capsule::table('tblclients') ->whereBetween( 'datecreated', [ $firstOfMonth, $lastOfMonth ] )->count(); $totalorders = Capsule::table('tblorders') ->whereBetween( 'date', [ $firstOfMonth, $lastOfMonth ] )->count(); $completedorders = Capsule::table('tblorders') ->where('status', 'Active') ->whereBetween( 'date', [ $firstOfMonth, $lastOfMonth ] )->count(); $newsignups2 = Capsule::table('tblclients') ->whereBetween( 'datecreated', [ $firstOfMonth2, $lastOfMonth2 ] )->count(); $totalorders2 = Capsule::table('tblorders') ->whereBetween( 'date', [ $firstOfMonth2, $lastOfMonth2 ] )->count(); $completedorders2 = Capsule::table('tblorders') ->where('status', 'Active') ->whereBetween( 'date', [ $firstOfMonth2, $lastOfMonth2 ] )->count(); $reportdata["tablevalues"][] = array( $months[$rawmonth] . ' ' . $year, $newsignups, $totalorders, $completedorders ); switch ($show) { case 'orders': $chartdata['rows'][] = array( 'c' => array( array('v' => $months[$rawmonth]), array('v' => (int) $totalorders), array('v' => (int) $totalorders2), ), ); break; case 'orderscompleted': $chartdata['rows'][] = array( 'c' => array( array('v' => $months[$rawmonth]), array('v' => (int) $completedorders), array('v' => (int) $completedorders2), ), ); break; case 'show': default: $chartdata['rows'][] = array( 'c'=>array( array('v' => $months[$rawmonth]), array('v' => (int) $newsignups), array('v' => (int) $newsignups2), ), ); } } $chartdata['cols'][] = array('label' => 'Month','type' => 'string'); $chartdata['cols'][] = array('label' => $year,'type' => 'number'); $chartdata['cols'][] = array('label' => ($year - 1),'type' => 'number'); $args = array(); if (!$show || $show=="signups") { $args['title'] = 'New Signups'; $args['colors'] = '#3366CC,#888888'; } if ($show=="orders") { $args['title'] = 'Orders Placed'; $args['colors'] = '#DC3912,#888888'; } if ($show=="orderscompleted") { $args['title'] = 'Orders Completed'; $args['colors'] = '#FF9900,#888888'; } $args['legendpos'] = 'right'; $reportdata["headertext"] = $chart->drawChart('Area', $chartdata, $args, '400px'). '
'. '
New Signups
' . ' |
Orders Placed
' . ' |
Orders Completed
' . '
'; $reportdata["yearspagination"] = true;