Add excursion option
Change-Id: I70133582d92c3a6385fefb46a99743d47f68cd46
diff --git a/User.php b/User.php
index e7efc44..9fe4899 100644
--- a/User.php
+++ b/User.php
@@ -32,6 +32,7 @@
public $lunch_day_1;
public $lunch_day_2;
public $lunch_day_3;
+ public bool $excursion;
public float $total_due;
public $invoice;
public bool $presentation_confirmed;
@@ -66,6 +67,7 @@
$this->lunch_day_1 = "";
$this->lunch_day_2 = "";
$this->lunch_day_3 = "";
+ $this->excursion = false;
$this->total_due = 0.0;
$this->invoice = "";
$this->presentation_confirmed = false;
@@ -91,7 +93,8 @@
if (array_key_exists($key, (array) $this))
$this->{$key} = $value;
}
- if (isset($data->password)) $this->set_password($data->password);
+ if (isset($data->password))
+ $this->set_password($data->password);
}
function init_from_object(object $data)
@@ -100,7 +103,8 @@
if (array_key_exists($key, (array) $this))
$this->{$key} = $value;
}
- if (isset($data->password)) $this->set_password($data->password);
+ if (isset($data->password))
+ $this->set_password($data->password);
}
function init_from_array(array $data)
@@ -113,7 +117,8 @@
$this->{$key} = $value;
}
}
- if (!empty($data["password"])) $this->set_password($data["password"]);
+ if (!empty($data["password"]))
+ $this->set_password($data["password"]);
}
@@ -140,7 +145,7 @@
$tmp_user->invoice = "";
$tmp_user->password = "***";
$tmp_user->user_hash = "***";
- return json_encode($tmp_user);
+ return json_encode($tmp_user);
}
function backup_in_session()
@@ -151,14 +156,17 @@
}
}
- function to_table() {
+ function to_table()
+ {
$table = "<table style='border: 1px solid #e1e4e8; border-collapse: collapse; width: 100%;'>";
foreach ($this as $key => $value) {
if ($key != "password" && $key != "user_hash" && !empty($value) && $key != "invoice") {
if (is_bool($value)) {
- if ($value) $value = "yes";
- else $value = "no";
- } elseif(is_float($value)) {
+ if ($value)
+ $value = "yes";
+ else
+ $value = "no";
+ } elseif (is_float($value)) {
$key .= " €";
$value = number_format($value, 2, '.', ' ');
}