srp admin controller

This commit is contained in:
2019-07-03 20:08:05 -05:00
parent ce2fc54e66
commit e027147c99

View File

@@ -119,17 +119,12 @@ class SRPAdminController extends Controller
//Get the number of approved, denied, and under review payouts currently from the database //Get the number of approved, denied, and under review payouts currently from the database
$pieOpen = SRPShip::where(['approved' => 'Under Review']) $pieOpen = SRPShip::where(['approved' => 'Under Review'])
->whereBetween('created_at', [$now, $previous])
->count(); ->count();
$pieApproved = SRPShip::where(['approved' => 'Approved']) $pieApproved = SRPShip::where(['approved' => 'Approved'])
->whereBetween('created_at', [$now, $previous])
->count(); ->count();
$pieDenied = SRPShip::where(['approved' => 'Denied']) $pieDenied = SRPShip::where(['approved' => 'Denied'])
->whereBetween('created_at', [$now, $previous])
->count(); ->count();
dd($pieApproved);
dd($pieDenied);
//Get the amount of open orders //Get the amount of open orders
//Just copy the data from the previous data pull //Just copy the data from the previous data pull
$gaugeReview = $pieOpen; $gaugeReview = $pieOpen;
@@ -139,7 +134,6 @@ class SRPAdminController extends Controller
->pluck('fleet_commander_name'); ->pluck('fleet_commander_name');
foreach($fcNames as $name) { foreach($fcNames as $name) {
$total = SRPShip::where(['fleet_commander_name' => $name]) $total = SRPShip::where(['fleet_commander_name' => $name])
->whereBetween('created_at', [$now, $previous])
->sum('loss_value'); ->sum('loss_value');
$temp = [ $temp = [
'fc' => $name, 'fc' => $name,