srp admin controller

This commit is contained in:
2019-07-03 18:39:37 -05:00
parent 574a95fd14
commit 727100f942

View File

@@ -133,11 +133,11 @@ class SRPAdminController extends Controller
$gaugeReview = $pieOpen;
//Get the losses by Fleet Commander Name, and populate variables for the table
$fcNames = SRPShip::whereBetween('created_at', [Carbon::now(), Carbon::now()=>subMonths(3)])
$fcNames = SRPShip::whereBetween('created_at', [$now, $previous])
->pluck('fleet_commander_name');
foreach($fcNames as $name) {
$total = SRPShip::where(['fleet_commander_name' => $name])
->whereBetween('created_at', [Carbon::now(), Carbon::now()->subMonths(3)])
->whereBetween('created_at', [$now, $previous])
->sum('loss_value');
$temp = [
'fc' => $name,