diff --git a/application/Device/DeviceController.php b/application/Device/DeviceController.php
index 35b43e57f..f5d8e5ae5 100644
--- a/application/Device/DeviceController.php
+++ b/application/Device/DeviceController.php
@@ -43,6 +43,7 @@ class DeviceController extends mfBaseController
$this->layout()->setTemplate("Device/Detail");
$devicesconfig = DeviceModel::getconifg($id);
$devices = DeviceModel::getOne($id);
+ $devicesall= DeviceModel::getAll();
if ($devices->devicetype->olt == "1") {
$customer = DeviceModel::getOltCustomer($device->ip);
@@ -52,6 +53,7 @@ class DeviceController extends mfBaseController
$this->layout()->set("devicesconfig", $devicesconfig);
$this->layout()->set("devices", $devices);
+ $this->layout()->set("devicesall", $devicesall);
$this->layout()->set("customer", $customer);
}
@@ -61,6 +63,7 @@ class DeviceController extends mfBaseController
$this->layout()->setTemplate("Device/Form");
$this->layout()->set("devicetypes", DevicetypeModel::getAll());
$this->layout()->set("pops", PopModel::getAll());
+ $this->layout()->set("devices", DeviceModel::getAll());
}
@@ -102,6 +105,7 @@ class DeviceController extends mfBaseController
$data = [];
$data['name'] = trim($r->name);
$data['devicetype_id'] = $r->devicetype_id;
+ $data['parent_id'] = $r->parent_id;
$data['autobackup'] = trim($r->autobackup);
if (trim($r->pop_id) == "0") {
@@ -132,6 +136,9 @@ class DeviceController extends mfBaseController
if ($data['autobackup'] != "1") {
$data['autobackup'] = "0";
}
+ if (!$data['parent_id']) {
+ $data['parent_id'] = NULL;
+ }
$data['ip'] = $r->ip;
$data['mac'] = $r->mac;
$data['serial'] = $r->serial;
diff --git a/application/Device/DeviceModel.php b/application/Device/DeviceModel.php
index 05a0d9bb6..feae145ed 100644
--- a/application/Device/DeviceModel.php
+++ b/application/Device/DeviceModel.php
@@ -8,6 +8,7 @@ class DeviceModel
public $serial = null;
public $comment = null;
public $devicetype_id = null;
+ public $parent_id = null;
public $pop_id = null;
public $addr_street = null;
public $addr_number = null;
diff --git a/application/TimerecordingBilling/TimerecordingBillingController.php b/application/TimerecordingBilling/TimerecordingBillingController.php
index 9ea288a1b..a5a6f5f22 100644
--- a/application/TimerecordingBilling/TimerecordingBillingController.php
+++ b/application/TimerecordingBilling/TimerecordingBillingController.php
@@ -228,6 +228,7 @@ class TimerecordingBillingController extends mfBaseController
$employee_number = (string)$user->getFlag('employee_number');
$employeetypesbmd = TimerecordingEmployeeModel::$employeetypesbmd;
$employee_type = $employeetypesbmd[$timerecordingBillingEmployee->timerecordingEmployee->type];
+ $overtimebase = 0;
if ($nlz == 0) {
$hours = $timerecordingBillingEmployee->ishours / 3600;
$hours = round($hours, 2);
@@ -239,6 +240,7 @@ class TimerecordingBillingController extends mfBaseController
if ($timerecordingBillingEmployee->overtime50free > 0) {
$overtime50free = $timerecordingBillingEmployee->overtime50free / 3600;
$overtime50free = round($overtime50free, 2);
+ $overtimebase = $overtimebase + $overtime50free;
$overtime50free = str_replace(".", ",", $overtime50free);
$bodyarray = [$monthbmd, "1", $employee_number, "3110", $overtime50free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
@@ -246,10 +248,17 @@ class TimerecordingBillingController extends mfBaseController
if ($timerecordingBillingEmployee->overtime100free > 0) {
$overtime100free = $timerecordingBillingEmployee->overtime100free / 3600;
$overtime100free = round($overtime100free, 2);
+ $overtimebase = $overtimebase + $overtime100free;
$overtime100free = str_replace(".", ",", $overtime100free);
- $bodyarray = [$monthbmd, "1", $employee_number, "3150", $overtime100free, "", "", "", "", "", ""];
+ $bodyarray = [$monthbmd, "1", $employee_number, "3160", $overtime100free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
}
+ if ($overtimebase > 0) {
+ $overtimebase = str_replace(".", ",", $overtimebase);
+ $bodyarray = [$monthbmd, "1", $employee_number, "3100", $overtimebase, "", "", "", "", "", ""];
+ fputcsv($file, $bodyarray, ";");
+ }
+
if ($timerecordingBillingEmployee->homeoffice > 0) {
$homeoffice = $timerecordingBillingEmployee->homeoffice;
$homeoffice = round($homeoffice, 2);
diff --git a/db/migrations/20240409064828_fiber_plan_dispatcher.php b/db/migrations/20240409064828_fiber_plan_dispatcher.php
new file mode 100644
index 000000000..1a36c911a
--- /dev/null
+++ b/db/migrations/20240409064828_fiber_plan_dispatcher.php
@@ -0,0 +1,39 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("FiberPlanDispatcher", ["signed" => true]);
+
+ $table->addColumn("network_id", "integer", ["null" => false]);
+ $table->addColumn("object_type", "integer", ["null" => false]);
+ $table->addColumn("gps_lat", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
+ $table->addColumn("gps_long", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
+ $table->addColumn("description", "text", ["null" => false]);
+ $table->addColumn("type", "text", ["null" => true]);
+ $table->addColumn("comment", "text", ["null" => true]);
+ $table->addColumn("create_by", "integer", ["null" => false]);
+ $table->addColumn("edit_by", "integer", ["null" => false]);
+ $table->addColumn("create", "integer", ["null" => false]);
+ $table->addColumn("edit", "integer", ["null" => false]);
+ $table->save();
+ }
+
+ if ($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if ($this->getEnvironment() == "thetool") {
+ $this->table("FiberPlanDispatcher")->drop()->save();
+ }
+ if ($this->getEnvironment() == "addressdb") {
+ }
+ }
+}
diff --git a/db/migrations/20240409064838_fiber_plan_dispatchersleeve.php b/db/migrations/20240409064838_fiber_plan_dispatchersleeve.php
new file mode 100644
index 000000000..078b0d9e0
--- /dev/null
+++ b/db/migrations/20240409064838_fiber_plan_dispatchersleeve.php
@@ -0,0 +1,34 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("FiberPlanDispatchersleeve", ["signed" => true]);
+
+ $table->addColumn("fiberPlanDispatcher_id", "integer", ["null" => false]);
+ $table->addColumn("name", "text", ["null" => false]);
+ $table->addColumn("create_by", "integer", ["null" => false]);
+ $table->addColumn("edit_by", "integer", ["null" => false]);
+ $table->addColumn("create", "integer", ["null" => false]);
+ $table->addColumn("edit", "integer", ["null" => false]);
+ $table->save();
+ }
+
+ if ($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if ($this->getEnvironment() == "thetool") {
+ $this->table("FiberPlanDispatchersleeve")->drop()->save();
+ }
+ if ($this->getEnvironment() == "addressdb") {
+ }
+ }
+}
diff --git a/db/migrations/20240416123342_device_add_field_parent_id.php b/db/migrations/20240416123342_device_add_field_parent_id.php
new file mode 100644
index 000000000..662206069
--- /dev/null
+++ b/db/migrations/20240416123342_device_add_field_parent_id.php
@@ -0,0 +1,31 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("Device", ["signed" => true]);
+ $table->addColumn("parent_id", "integer", ["null" => true, "after" => "devicetype_id"]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+ $this->table("Device")->removeColumn("parent_id")->save();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}