Finished Building -> termination

This commit is contained in:
Frank Schubert
2021-07-29 17:07:35 +02:00
parent 4ff09b319b
commit 112df1a958
7 changed files with 162 additions and 687 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class Building extends mfBaseModel {
$code = "$cc-$zip-";
foreach($rnd as $r) {
$code .= dechex($r);
$code .= str_pad(dechex($r), 2, "0", STR_PAD_LEFT);
}
if(BuildingModel::search(['code' => $code])) {
+2 -2
View File
@@ -188,11 +188,11 @@ class BuildingController extends mfBaseController {
$this->layout()->setFlash("Objekt nicht gefunden", "error");
$this->redirect("Building");
}
/*
if(TerminationModel::search(["building_id" => $id])) {
$this->layout()->setFlash("Das Objekt kann nicht gelöscht werden, da noch Anschlüsse zugeordnet sind.", "error");
$this->redirect("Building");
}*/
}
$building->delete();