conditional oaid assignment on unit creation

This commit is contained in:
Frank Schubert
2024-01-23 13:39:14 +01:00
parent 9046180e7a
commit d6b5d5d7f0
7 changed files with 233 additions and 4 deletions
+4 -1
View File
@@ -135,12 +135,15 @@
<td><?=$oaid->origin_id?></td>
<td><?=$oaid->origin?></td>
<td><?=$oaid->owner->getCompanyOrName()?></td>
<td class="text-right <?=($oaid->adb_wohneinheit_count > 1 || $oaid->adb_wohneinheit_id && $oaid->adb_wohneinheit_count < 1) ? "text-danger" : ""?>"><?=($oaid->adb_wohneinheit_id) ? $oaid->adb_wohneinheit_count."x" : ""?></td>
<td class="text-right <?=($oaid->adb_wohneinheit_count > 1 || $oaid->adb_wohneinheit_id && $oaid->adb_wohneinheit_count < 1) ? "text-danger" : ""?>">
<?=($oaid->adb_wohneinheit_id) ? $oaid->adb_wohneinheit_count."x" : ""?>
</td>
<td>
<?php if($oaid->termination_id): ?>
<?=(is_object($oaid->termination) && $oaid->termination->building_id) ? $oaid->termination->building->getAddress() : ""?>
<?=($oaid->termination->name) ? " - ".$oaid->termination->name : ""?>
<?php elseif($oaid->adb_wohneinheit_id && is_object($oaid->adb_wohneinheit)): ?>
<!--a href="<?=self::getUrl("OpenAccessId", "changeADBWohneinheit", ["id" => $oaid->id])?>" class="mr-1"><i class="fas fa-edit"></i></a-->
[<?=$oaid->adb_wohneinheit->hausnummer->strasse->gemeinde->name?>]
<?=$oaid->adb_wohneinheit->hausnummer->plz->plz?>
<?=$oaid->adb_wohneinheit->hausnummer->ortschaft->name?>,