|
|
@ -11,6 +11,8 @@ include_once('path.inc.php'); // get the path ;)
|
|
|
|
include "db.php";
|
|
|
|
include "db.php";
|
|
|
|
include_once ('inclu/messagefunctions.inc.php');
|
|
|
|
include_once ('inclu/messagefunctions.inc.php');
|
|
|
|
include_once (ROOT_PATH.'/include/usergroup.inc.php');
|
|
|
|
include_once (ROOT_PATH.'/include/usergroup.inc.php');
|
|
|
|
|
|
|
|
include_once (ROOT_PATH.'/include/defines.inc.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($test == "02") {
|
|
|
|
if ($test == "02") {
|
|
|
|
$i = 0;
|
|
|
|
$i = 0;
|
|
|
@ -68,11 +70,26 @@ if ($i == 11) {
|
|
|
|
// Kann erstmal bleiben!
|
|
|
|
// Kann erstmal bleiben!
|
|
|
|
mysql_query('Update arena set zustand = zustand - 1/4 where mietlasten >= 2 and einnahmen > 0');
|
|
|
|
mysql_query('Update arena set zustand = zustand - 1/4 where mietlasten >= 2 and einnahmen > 0');
|
|
|
|
mysql_query('Update arena set zustand = 0 where zustand < 0'); // No negatives any more
|
|
|
|
mysql_query('Update arena set zustand = 0 where zustand < 0'); // No negatives any more
|
|
|
|
$freibetrag = 300000;
|
|
|
|
defineIfNotDefined('TAX_NOOB_MIN_TAX', 0.5, true);
|
|
|
|
$steuersatz_start = 25;
|
|
|
|
defineIfNotDefined('TAX_NOOB_MAX_LEVEL', 10, true);
|
|
|
|
$faktor_level = 3;
|
|
|
|
defineIfNotDefined('TAX_START_TAX', 0.85, true);
|
|
|
|
$faktor_finanz = 2;
|
|
|
|
defineIfNotDefined('TAX_REDUCTION', 0.05, true);
|
|
|
|
$sql = 'Update arena set mietlasten = mietlasten + 1, steuerlasten = steuerlasten + ceil((einnahmen - '.$freibetrag.') * (('.$steuersatz_start.' + level * '.$faktor_level.' -hausmeister * '.$faktor_finanz.')/100)) where ceil((einnahmen - '.$freibetrag.') * (('.$steuersatz_start.' + level * '.$faktor_level.' -hausmeister * '.$faktor_finanz.')/100)) > 0';
|
|
|
|
defineIfNotDefined('TAX_FREE_START', 250000, true);
|
|
|
|
|
|
|
|
defineIfNotDefined('TAX_FREE_X', 50000, true);
|
|
|
|
|
|
|
|
defineIfNotDefined('TAX_FREE_Y', 17500, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$NOOB_MIN_TAX = TAX_NOOB_MIN_TAX;
|
|
|
|
|
|
|
|
$NOOB_MAX_LEVEL = TAX_NOOB_MAX_LEVEL;
|
|
|
|
|
|
|
|
$TAX_START=TAX_START_TAX;
|
|
|
|
|
|
|
|
$TAX_REDUCTION=TAX_REDUCTION;
|
|
|
|
|
|
|
|
$FREE_START=TAX_FREE_START;
|
|
|
|
|
|
|
|
$X=TAX_FREE_X;
|
|
|
|
|
|
|
|
$Y=TAX_FREE_Y;
|
|
|
|
|
|
|
|
$noob_rabatt='GREATEST('.$NOOB_MIN_TAX.', least(1, level / '.$NOOB_MAX_LEVEL.'))';
|
|
|
|
|
|
|
|
$steuersatz='('.$TAX_START.'-hausmeister*'.$TAX_REDUCTION.')';
|
|
|
|
|
|
|
|
$freibetrag='(('.$FREE_START.'+(hausmeister*'.$X.')+(hausmeister*hausmeister*'.$Y.')) * (1/'.$noob_rabatt.'))';
|
|
|
|
|
|
|
|
$steuerbetrag='ROUND((einnahmen - '.$freibetrag.')*'.$noob_rabatt.'*'.$steuersatz.')';
|
|
|
|
|
|
|
|
$sql = 'Update arena set mietlasten = mietlasten + 1, steuerlasten = steuerlasten + '.$steuerbetrag.' where '.$steuerbetrag.' > 0';
|
|
|
|
// echo $sql.'<br>';
|
|
|
|
// echo $sql.'<br>';
|
|
|
|
mysql_query($sql);
|
|
|
|
mysql_query($sql);
|
|
|
|
|
|
|
|
|
|
|
|