ZuUndAbschlaege
This commit is contained in:
1 parent
7917777b93
commit
7715564e24
10 files changed
+187
-184
No files matched your search
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace App\Actions\Generate\Nutzwerte;
|
||||
|
||||
use App\Actions\Generate\Utilities\Format;
|
||||
use App\Actions\Generate\Utilities\Html;
|
||||
use App\Models\Merkmale;
|
||||
use App\Models\ProjektMethode;
|
||||
use App\Models\ProjektObjekte;
|
||||
use App\Actions\Generate\Utilities\Html;
|
||||
use App\Actions\Generate\Utilities\Format;
|
||||
|
||||
class ZuUndAbschlaege
|
||||
{
|
||||
@@ -17,9 +18,19 @@ class ZuUndAbschlaege
|
||||
->with('projektobjekteimdetail')
|
||||
->where('projekte_id', $projekte_id)
|
||||
->where('nicht_in_orientierung', 0)
|
||||
->get();
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche', 'Loggia / sonst. Zusatzflächen', 'Gesamtnutzfläche'];
|
||||
|
||||
$has_loggien = ProjektMethode::where('projekte_id', $projekte_id)->where('methode_id', 2)->count();
|
||||
|
||||
if($has_loggien){
|
||||
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche', 'Loggia / Zusatzflächen', 'Gesamtnutzfläche'];
|
||||
}
|
||||
else{
|
||||
$header_row = ['Top Nummer', 'Geschoß', 'Typ', 'Nutzfläche'];
|
||||
}
|
||||
|
||||
|
||||
$merkmale = Merkmale::where('projekte_id', $projekte_id)->pluck('name', 'code');
|
||||
|
||||
@@ -39,17 +50,19 @@ class ZuUndAbschlaege
|
||||
// dd($objekt);
|
||||
|
||||
$flaeche = 0;
|
||||
foreach ($objekt->projektobjekteimdetail as $key => $value) {
|
||||
foreach ($objekt['projektobjekteimdetail'] as $key => $value) {
|
||||
$geschoss = $value['geschoss'];
|
||||
$flaeche += $value['flaeche'];
|
||||
}
|
||||
|
||||
// dd($markmale_codes);
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= Html::td($objekt->top_nummer, 'left bl br bb');
|
||||
$html .= Html::td($objekt['top_nummer'], 'left bl br bb');
|
||||
$html .= Html::td($geschoss, 'center br bb');
|
||||
$html .= Html::td($objekt->type, 'wp20 br bb');
|
||||
$html .= Html::td($objekt['type'], 'wp20 br bb');
|
||||
// Nutzfläache
|
||||
$html .= Html::td(Format::dezimal($flaeche, 2), 'right br bb');
|
||||
$html .= Html::td(Format::dezimal($flaeche, 2).' m²', 'center br bb');
|
||||
// Loggia
|
||||
// $loggia = Raumalles::loggia($id);
|
||||
// $gesnutzfl = $loggia + $objekt->qm_m1;
|
||||
@@ -57,12 +70,12 @@ class ZuUndAbschlaege
|
||||
// $html .= Html::td($loggia, 'right br bb');
|
||||
// // Gesammtnutzfläche = Nutzfläache + Loggia
|
||||
// $html .= Html::td(Format::numeric($gesnutzfl, 2), 'right br bb');
|
||||
// foreach ($markmale_codes as $code) {
|
||||
// $tmp = (float) $objekt[$code] != 0 ? $objekt[$code] : '';
|
||||
// $html .= Html::td(Format::numeric($tmp, 2), 'right br bb');
|
||||
// }
|
||||
// $html .= Html::td(Format::numeric($objekt->summe_az, 2), 'right br bb');
|
||||
// $html .= Html::td(Format::numeric($objekt->bewertung, 2), 'right br bb');
|
||||
// dd($objekt);
|
||||
foreach ($markmale_codes as $code) {
|
||||
$html .= Html::td($objekt[$code], '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 .= '</tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
|
||||
@@ -4,12 +4,12 @@ namespace App\Actions\Generate\Utilities;
|
||||
|
||||
class Html
|
||||
{
|
||||
public static function table_header_90($_row)
|
||||
public static function table_header_90($header_row)
|
||||
{
|
||||
$html = '<thead><tr>';
|
||||
$mm = 190 / \count($_row);
|
||||
foreach ($_row as $value) {
|
||||
$html .= '<td class="rotated right bl bt br bb" style="background-color:#eff6ff; width: '.$mm.'mm;">'.$value.'</td>';
|
||||
$html = '<thead><tr text-rotate="90">';
|
||||
$mm = 190 / \count($header_row);
|
||||
foreach ($header_row as $value) {
|
||||
$html .= '<th class="bl bt br bb center hellblau" style="vertical-align: bottom; width: '.$mm.'mm;">'.$value.'</th>';
|
||||
}
|
||||
$html .= '</tr></thead>';
|
||||
|
||||
|
||||
Reference in new issue
Block a user