Implementation of final round (Ranking Payouts) incl. extension of Geldrangliste Display

This commit is contained in:
Torsten 2017-09-05 11:49:39 +02:00
parent 27dd7d97f3
commit 50cc4c75bf
5 changed files with 8400 additions and 31 deletions

View file

@ -82,7 +82,18 @@ class Quota extends Model
}
// Subfunction of setQuotas
public static function setQuota($name, $value, $season_id) {
$quota = Quota::all()->where('season_id','=',$season_id)->where('name','=',$name)->first();
if (!$quota) {
$quota = new Quota();
}
$quota->season_id = $season_id;
$quota->name = $name;
$quota->prc = $value;
$quota->save();
}
public static function getQuota($season_id,$quota_name) {
$quota=Quota::all()->where('season_id','=', $season_id)->where('name','=', $quota_name)->first();
@ -104,20 +115,7 @@ class Quota extends Model
}
}
// Subfunction of setQuotas
public static function setQuota($name, $value, $season_id) {
$quota = Quota::all()->where('season_id','=',$season_id)->where('name','=',$name)->first();
if (!$quota) {
$quota = new Quota();
}
$quota->season_id = $season_id;
$quota->name = $name;
$quota->prc = $value;
$quota->save();
}
public static function createDefaultQuota($season_id)