Fixed rankinglist display ManualPayout, fixed Liga Payout Quota Entry+Storage

This commit is contained in:
Torsten 2018-02-06 08:24:41 +01:00
parent e482986eac
commit def862bc13
3 changed files with 9 additions and 8 deletions

View file

@ -346,15 +346,17 @@ class UsersController extends Controller
// Add GShirt, Playoff, Pokal payout
Log::info("!> ".$user_id);
$rankingDisplay[$user_id]['gshirt_payout'] = 0;
$rankingDisplay[$user_id]['pokal'] = 0;Log::info("Setting pokal for user_id ".$user_id);
$rankingDisplay[$user_id]['pokal'] = 0;
$rankingDisplay[$user_id]['playoff'] = 0;
$userPayouts = $payoutList[$user_id];
$hasGreenShirtGame=Season::hasGreenShirtGame();
foreach ($userPayouts as $payoutItem) {
Log::info($user_id." - ".$payoutItem['roundname']);
if ($hasGreenShirtGame) {
if ($payoutItem['roundname'] == "Grünes Trikot") {
$rankingDisplay[$user_id]["gshirt_payout"] = $payoutItem['payout'];
Log::info("GreenShirt goes to: ".$user_id);
}
}
if ($payoutItem['roundname'] == 'Pokal') {
@ -364,14 +366,13 @@ class UsersController extends Controller
if (strpos($payoutItem['roundname'], 'Liga') !== false) {
$rankingDisplay[$user_id]["playoff"] = $payoutItem['payout'];
Log::info($payoutItem['roundname']." goes to: ".$user_id);
}
}
}
}
$userids = array_keys($rankingDisplay);
$round=Round::where('id','=',$max_round_id)->first();
$games=Game::where('round_id','=',$max_round_id)->get();