srp helper

This commit is contained in:
2019-07-01 21:04:12 -05:00
parent 3d93013f75
commit c8a1ccef30

View File

@@ -19,7 +19,7 @@ class SRPHelper {
} }
public function GetLossesByFC($start, $end) { public function GetLossesByFC($start, $end) {
$losses = 0.00; $losses = array();
$fcs = null; $fcs = null;
$fcs = SRPShip::whereBetween('created_at', [$start, $end]) $fcs = SRPShip::whereBetween('created_at', [$start, $end])
@@ -30,7 +30,7 @@ class SRPHelper {
$tempLosses = SRPShip::where(['fleet_commander_name' => $fc]) $tempLosses = SRPShip::where(['fleet_commander_name' => $fc])
->whereBetween('created_at', [$start, $end]) ->whereBetween('created_at', [$start, $end])
->sum('loss_value'); ->sum('loss_value');
dd($tempLosses);
$losses[$fc] = $tempLosses; $losses[$fc] = $tempLosses;
} }