Merge branch 'main' of http://gitea.nuhodds.com:3000/salam/nutzwerte_fi4
This commit is contained in:
commit
8e52b6159e
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();
|
||||
|
||||
Reference in new issue
Block a user