wip
This commit is contained in:
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\ProjektMerkmale;
|
||||||
use App\Models\ProjektMethode;
|
use App\Models\ProjektMethode;
|
||||||
use App\Models\ProjektObjekte;
|
use App\Models\ProjektObjekte;
|
||||||
use DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class ZuUndAbschlaege
|
class ZuUndAbschlaege
|
||||||
{
|
{
|
||||||
@@ -19,9 +19,9 @@ class ZuUndAbschlaege
|
|||||||
->where('nicht_in_orientierung', 0)
|
->where('nicht_in_orientierung', 0)
|
||||||
->get();
|
->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'];
|
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche', 'Loggia / Zusatzflächen', 'Gesamtnutzfläche'];
|
||||||
} else {
|
} else {
|
||||||
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche'];
|
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche'];
|
||||||
@@ -73,12 +73,12 @@ class ZuUndAbschlaege
|
|||||||
$summe_nutzfl += $flaeche;
|
$summe_nutzfl += $flaeche;
|
||||||
|
|
||||||
// Loggia
|
// Loggia
|
||||||
if ($has_loggien) {
|
if ($has_loggien > 0) {
|
||||||
|
|
||||||
$loggien = DB::table('projekt_objekte_im_details')
|
$loggien = DB::table('projekt_objekte_im_details')
|
||||||
->join('projekt_methodes', 'projekt_objekte_im_details.raumart', '=', 'projekt_methodes.raumart')
|
->join('projekt_methodes', 'projekt_objekte_im_details.raumart', '=', 'projekt_methodes.raumart')
|
||||||
->select('projekt_objekte_im_details.flaeche')
|
->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_methodes.projekte_id', $projekte_id)
|
||||||
->where('projekt_objekte_im_details.projekt_objekte_id', $objekt->id)
|
->where('projekt_objekte_im_details.projekt_objekte_id', $objekt->id)
|
||||||
->get();
|
->get();
|
||||||
|
|||||||
Reference in new issue
Block a user