wip Nutzwerte pdf

This commit is contained in:
salam committed 2025-10-23 12:07:56 +02:00
1 parent 4ad27d8c19
commit 2296b708eb
31 files changed
+528 -1656

No files matched your search

@@ -3,6 +3,7 @@
namespace App\Actions\Generate\Nutzwerte;
use App\Models\Merkmale;
use App\Models\OrientierungZuAbschlaege;
use App\Models\Raumalles;
use App\Models\Raumorientierung;
use App\Utilities\Format;
@@ -10,14 +11,23 @@ use App\Utilities\Html;
class ZuUndAbschlaege
{
public static function load(int $projekts_id)
public static function load(int $projekte_id)
{
Raumorientierung::where('projekts_id', $projekts_id)->where('top_nr', '')->delete();
Raumorientierung::where('projekts_id', $projekts_id)->where('top_nr', 'like', '%---%')->delete();
// 3.21 Zu und Abschläge
$orientierungen = OrientierungZuAbschlaege::select()
->with('orientierung')
->where('projekte_id', $projekte_id)
->where('nicht_in_orientierung', 0)
->get();
foreach ($orientierungen as $orientierung) {
dd($orientierung);
}
// $total = Invoice::where('status', 'Completed')->sum('amount');
$header_row = ['Top', 'Geschoß', 'Typ', 'Nutzfläche', 'Loggia / sonst. Zusatzflächen', 'Gesamtnutzfläche'];
$merkmale = Merkmale::merkmale($projekts_id);
$merkmale = Merkmale::merkmale($projekte_id);
$markmale_col = [];
foreach ($merkmale as $value) {
$markmale_col[] = $value['col'];
@@ -27,14 +37,14 @@ class ZuUndAbschlaege
$header_row[] = 'Wohnungsbewertung';
$html = Html::table_header_90($header_row);
$res = Raumalles::select('raumorientierung_id', 'geschoss')->where('projekts_id', $projekts_id)->where('methodes_id', 1)->get();
$res = Raumalles::select('raumorientierung_id', 'geschoss')->where('projekte_id', $projekte_id)->where('methodes_id', 1)->get();
$geschoss = [];
foreach ($res as $value) {
$id = $value->raumorientierung_id;
$geschoss[$id] = $value['geschoss'];
}
$res = Raumorientierung::select()->where('projekts_id', $projekts_id)->where('nicht_in_orientierung', 0)->whereNotNull('top_nr')->orderBy('top_nr')->get();
$res = Raumorientierung::select()->where('projekte_id', $projekte_id)->where('nicht_in_orientierung', 0)->whereNotNull('top_nr')->orderBy('top_nr')->get();
foreach ($res as $value) {
$id = $value->id;
$html .= '<tr>';