srp testing
This commit is contained in:
@@ -138,8 +138,10 @@ class SRPAdminController extends Controller
|
|||||||
//Get the losses by Fleet Commander Name, and populate variables for the table
|
//Get the losses by Fleet Commander Name, and populate variables for the table
|
||||||
$fcNames = SRPShip::groupBy('fleet_commander_name')->get(['fleet_commander_name']);
|
$fcNames = SRPShip::groupBy('fleet_commander_name')->get(['fleet_commander_name']);
|
||||||
foreach($fcNames as $name) {
|
foreach($fcNames as $name) {
|
||||||
$total = SRPShip::where(['fleet_commander_name' => $name->fleet_commander_name])
|
$total = SRPShip::where([
|
||||||
->sum('loss_value');
|
'fleet_commander_name' => $name->fleet_commander_name,
|
||||||
|
'approved' => 'Approved',
|
||||||
|
])->sum('loss_value');
|
||||||
$temp = [
|
$temp = [
|
||||||
'fc' => $name->fleet_commander_name,
|
'fc' => $name->fleet_commander_name,
|
||||||
'total' => $total,
|
'total' => $total,
|
||||||
|
|||||||
Reference in New Issue
Block a user