This commit is contained in:
salam committed 2026-09-18 09:51:51 +02:00
1 parent 9ea516347c
commit e1a23a8f55
1 file changed
+5 -5
@@ -7,7 +7,7 @@ use App\Actions\Generate\Utilities\Html;
use App\Models\ProjektMerkmale;
use App\Models\ProjektMethode;
use App\Models\ProjektObjekte;
use DB;
use Illuminate\Support\Facades\DB;
class ZuUndAbschlaege
{
@@ -19,9 +19,9 @@ class ZuUndAbschlaege
->where('nicht_in_orientierung', 0)
->get();
$has_loggien = ProjektMethode::where('projekte_id', $projekte_id)->where('methode_id', 2)->count();
$has_loggien = ProjektMethode::where('projekte_id', $projekte_id)->whereIn('methode_id', [2, 8])->count();
if ($has_loggien) {
if ($has_loggien > 0) {
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche', 'Loggia / Zusatzflächen', 'Gesamtnutzfläche'];
} else {
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche'];
@@ -73,12 +73,12 @@ class ZuUndAbschlaege
$summe_nutzfl += $flaeche;
// Loggia
if ($has_loggien) {
if ($has_loggien > 0) {
$loggien = DB::table('projekt_objekte_im_details')
->join('projekt_methodes', 'projekt_objekte_im_details.raumart', '=', 'projekt_methodes.raumart')
->select('projekt_objekte_im_details.flaeche')
->where('projekt_methodes.methode_id', 2)
->whereIn('projekt_methodes.methode_id', [2, 8])
->where('projekt_methodes.projekte_id', $projekte_id)
->where('projekt_objekte_im_details.projekt_objekte_id', $objekt->id)
->get();