Can now delete Wohneinheit even if it has a canceled order
This commit is contained in:
@@ -125,7 +125,7 @@ class ADBWohneinheitController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
if(PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id])) {
|
||||
if(PreorderModel::getFirstActive(["adb_wohneinheit_id" => $unit->id])) {
|
||||
$this->layout()->setFlash("Wohneinheit kann nicht gelöscht werden, da sie in einer Bestellung verwendet wird.", "error");
|
||||
$this->redirect("AddressDB", "view", ["id" => $hausnummer_id]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user