Merge branch 'fronkdev' into 'master'

Fronkdev

See merge request fronk/thetool!1107
This commit is contained in:
Frank Schubert
2025-03-12 14:03:37 +00:00
5 changed files with 24 additions and 10 deletions

View File

@@ -320,6 +320,12 @@
<input class="form-control" name="attributes[rtrcode]" id="rtrcode" value="<?=$address->attributes['rtrcode']->value?>">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="rtrcode">RML FIBU Verrechnungskonto</label>
<div class="col-lg-10">
<input class="form-control" name="attributes[rml-fibu-account]" id="rml-fibu-account" value="<?=$address->attributes['rml-fibu-account']->value?>">
</div>
</div>
</div>
</div>

View File

@@ -180,7 +180,14 @@
</tr><tr>
<th>RTR Code</th>
<td><?=(is_array($address->attributes) && array_key_exists("rtrcode", $address->attributes)) ? $address->attributes['rtrcode']->value : ""?></td>
</tr><tr>
</tr>
<?php if(is_array($address->attributes) && array_key_exists("rtrcode", $address->attributes) && $address->attributes['rml-fibu-account']->value): ?>
<tr>
<th>RML FIBU Konto</th>
<td><?=$address->attributes['rml-fibu-account']->value?></td>
</tr>
<?php endif; ?>
<tr>
<th></th>
<td></td>
</tr><tr>

View File

@@ -580,7 +580,6 @@ class Preorder extends mfBaseModel {
$hausnummer = $this->getProperty("adb_hausnummer");
foreach(ADBStatusflagModel::getAll() as $hflag) {
echo $hflag->code."\n";
$hflag_value = ADBHausnummerStatusflagValueModel::search(["hausnummer_id" => $hausnummer->id, "flag_id" => $hflag->id]);
if(!$hflag_value) {
$hflag_value = ADBHausnummerStatusflagValueModel::create([

View File

@@ -135,8 +135,8 @@ class AddressHelper
}
$name = trim($building->name);
$strasse_hausnummer = trim($building->address->name);
$name = $this->trimExtra($building->name);
$strasse_hausnummer = trim($this->trimExtra($building->address->name));
$split_result = $this->splitStreetHausnummer($strasse_hausnummer);
if (!$split_result) {
@@ -148,18 +148,18 @@ class AddressHelper
$hausnummer_name = $this->db->escape($split_result[1]);
$addresszusatz = $this->db->escape($split_result[2]);
$gem_kz = $this->db->escape(trim($building->municipality->name));
$gem_name = $this->db->escape(trim($building->municipality->userLabel));
$gem_kz = $this->db->escape($this->trimExtra($building->municipality->name));
$gem_name = $this->db->escape($this->trimExtra($building->municipality->userLabel));
$ort_name = $this->db->escape(trim($building->address->city));
$plz_name = $this->db->escape(trim($building->address->zipCode));
$ort_name = $this->db->escape($this->trimExtra($building->address->city));
$plz_name = $this->db->escape($this->trimExtra($building->address->zipCode));
$lat = ($building->address->latitude) ? $this->truncateFloat($building->address->latitude, 14) : null;
$long = ($building->address->longitude) ? $this->truncateFloat($building->address->longitude, 14) : null;
//$lat = $building->address->latitude;
//$long = $building->address->longitude;
$unit_count = $building->homesCount;
$lot_num = $building->address->lotNumber;
$lot_num = $this->trimExtra($building->address->lotNumber);
$fcp_name = false;
$adrcd = false;
@@ -551,4 +551,7 @@ class AddressHelper
echo $logtext . "\n";
}
public function trimExtra($string) {
return preg_replace(['/\\\r+/', '/\\\n+/', '/\\\t+/'], "", trim($string));
}
}