-
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
class ConstructionConsent extends mfBaseModel {
|
||||
protected $forcestr = ["name", "ez", "kg", "gst", "gstnr", "usage_length"];
|
||||
private $project;
|
||||
private $netzgebiet;
|
||||
private $netzgebiet_id;
|
||||
private $termnination;
|
||||
private $adb_hausnummer;
|
||||
private $adb_strasse;
|
||||
@@ -138,6 +140,15 @@ class ConstructionConsent extends mfBaseModel {
|
||||
return $this->project;
|
||||
}
|
||||
|
||||
if($name == 'netzgebiet') {
|
||||
if(!$this->data->netzgebiet_id) return null;
|
||||
$netzgebiet = new ADBNetzgebiet($this->data->netzgebiet_id);
|
||||
if($netzgebiet->id) {
|
||||
$this->netzgebiet = $netzgebiet;
|
||||
}
|
||||
return $this->netzgebiet;
|
||||
}
|
||||
|
||||
if($name == "adb_hausnummer") {
|
||||
if(!$this->adb_hausnummer_id) return null;
|
||||
$hausnummer = new ADBHausnummer($this->adb_hausnummer_id);
|
||||
@@ -597,7 +608,7 @@ FROM ConstructionConsent
|
||||
if(array_key_exists("network", $filter)) {
|
||||
$network = FronkDB::singleton()->escape($filter["network"]);
|
||||
if($network) {
|
||||
$where .= " AND vh.netzgebiet_id=$network";
|
||||
$where .= " AND (vh.netzgebiet_id=$network OR ConstructionConsent.netzgebiet_id=$network)";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user