ZuUndAbschlaege wip
This commit is contained in:
1 parent
622b37bb90
commit
c7f69d2efe
4 files changed
+27
-28
No files matched your search
@@ -7,6 +7,7 @@ use App\Actions\Generate\Utilities\Html;
|
||||
use App\Models\ProjektMerkmale;
|
||||
use App\Models\ProjektMethode;
|
||||
use App\Models\ProjektObjekte;
|
||||
use App\Models\ProjektObjekteImDetail;
|
||||
|
||||
class ZuUndAbschlaege
|
||||
{
|
||||
@@ -15,11 +16,9 @@ class ZuUndAbschlaege
|
||||
|
||||
$objekte = ProjektObjekte::select()
|
||||
->with('orientierung')
|
||||
->with('projektobjekteimdetail')
|
||||
->where('projekte_id', $projekte_id)
|
||||
->where('nicht_in_orientierung', 0)
|
||||
->get()
|
||||
->toArray();
|
||||
->get();
|
||||
|
||||
$has_loggien = ProjektMethode::where('projekte_id', $projekte_id)->where('methode_id', 2)->count();
|
||||
|
||||
@@ -36,7 +35,7 @@ class ZuUndAbschlaege
|
||||
$markmale_codes[] = $key;
|
||||
$header_row[] = $value;
|
||||
}
|
||||
$header_row[] = 'Summe ProjektMerkmale';
|
||||
$header_row[] = 'Summe Merkmale';
|
||||
$header_row[] = 'Wohnungsbewertung';
|
||||
|
||||
$html = '<table class="table-striped">';
|
||||
@@ -44,15 +43,9 @@ class ZuUndAbschlaege
|
||||
|
||||
foreach ($objekte as $objekt) {
|
||||
|
||||
// dd($objekt);
|
||||
|
||||
$flaeche = 0;
|
||||
foreach ($objekt['projektobjekteimdetail'] as $key => $value) {
|
||||
$geschoss = $value['geschoss'];
|
||||
$flaeche += $value['flaeche'];
|
||||
}
|
||||
|
||||
// dd($markmale_codes);
|
||||
$detail = ProjektObjekteImDetail::where('projekt_objekte_id', $objekt->id)->get();
|
||||
$flaeche = $detail->sum('flaeche');
|
||||
$geschoss = $detail->first()->geschoss;
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= Html::td($objekt['top_nummer'], 'left bl br bb');
|
||||
@@ -68,11 +61,13 @@ class ZuUndAbschlaege
|
||||
// // Gesammtnutzfläche = Nutzfläache + Loggia
|
||||
// $html .= Html::td(Format::numeric($gesnutzfl, 2), 'right br bb');
|
||||
// dd($objekt);
|
||||
$nutwert = 0;
|
||||
foreach ($markmale_codes as $code) {
|
||||
$html .= Html::td($objekt[$code], 'center br bb');
|
||||
$nutwert += $objekt[$code];
|
||||
$html .= Html::td(Format::dezimal($objekt[$code], 2), 'center br bb');
|
||||
}
|
||||
$html .= Html::td(Format::dezimal($objekt['nutzwert'], 2), 'center br bb');
|
||||
$html .= Html::td(Format::dezimal(100 + $objekt['nutzwert'], 2), 'right br bb');
|
||||
$html .= Html::td(Format::dezimal($nutwert, 2), 'center br bb');
|
||||
$html .= Html::td(Format::dezimal(100 + $nutwert, 2), 'right br bb');
|
||||
$html .= '</tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
|
||||
Reference in new issue
Block a user