srp testing

This commit is contained in:
2019-07-08 22:49:58 -05:00
parent 73034f2f74
commit db45c71636

View File

@@ -138,8 +138,10 @@ class SRPAdminController extends Controller
//Get the losses by Fleet Commander Name, and populate variables for the table
$fcNames = SRPShip::groupBy('fleet_commander_name')->get(['fleet_commander_name']);
foreach($fcNames as $name) {
$total = SRPShip::where(['fleet_commander_name' => $name->fleet_commander_name])
->sum('loss_value');
$total = SRPShip::where([
'fleet_commander_name' => $name->fleet_commander_name,
'approved' => 'Approved',
])->sum('loss_value');
$temp = [
'fc' => $name->fleet_commander_name,
'total' => $total,