agp zusaztfläache lager un 2. abstellplatz, desing color default an per projekt

This commit is contained in:
salam committed 2026-02-18 13:55:57 +01:00
1 parent 7c25584f33
commit 8562eb0f04
11 files changed
+84 -57

No files matched your search

+14 -5
View File
@@ -77,11 +77,20 @@ class PdfGenerator
$stylesheet = file_get_contents(__DIR__.'/../../../resources/css/pdf-download.css');
$bgcolors = [];
$bgcolors["'###BG_DECKBLATT###'"] = self::$projekt->deckblatt_bg;
$bgcolors["'###BG_HEADER###'"] = self::$projekt->schmuckfarbe_header;
$bgcolors["'###FARBE_RAHMEN###'"] = self::$projekt->farbe_borders;
$stylesheet = Platzhalter::replace($bgcolors, $stylesheet);
$colors = [];
if (self::$projekt->projekt_farben_verwenden) {
$colors["'###BG_DECKBLATT###'"] = self::$projekt->deckblatt_bg;
$colors["'###BG_HEADER###'"] = self::$projekt->schmuckfarbe_header;
$colors["'###FARBE_RAHMEN###'"] = self::$projekt->farbe_borders;
} else {
$colors["'###BG_DECKBLATT###'"] = self::$gutachter->deckblatt_bg;
$colors["'###BG_HEADER###'"] = self::$gutachter->schmuckfarbe_header;
$colors["'###FARBE_RAHMEN###'"] = self::$gutachter->farbe_borders;
}
$stylesheet = Platzhalter::replace($colors, $stylesheet);
// dd($stylesheet);
$mpdf->WriteHTML($stylesheet, HTMLParserMode::HEADER_CSS);
$mpdf->SetTitle($filename);
@@ -21,13 +21,13 @@ class Nutzwertberechnung
$html .= '<table autosize="1" style="page-break-inside:avoid;">';
$html .= '<thead><tr>';
$html .= '<th class="bl bt bg-user-set">Top Nr.</th>';
$html .= '<th class="bl bt bg-user-set">Geschoß</th>';
$html .= '<th class="bl bt bg-user-set">Orientierung</th>';
$html .= '<th class="bl bt bg-user-set">Typ</th>';
$html .= '<th class="bl bt bg-user-set">Raumart</th>';
$html .= '<th class="bl bt bg-user-set">Fläche</th>';
$html .= '<th class="bl bt bg-user-set" colspan="6"></th>';
$html .= '<th class="bl bt br bg-user-set">Nutzwert</th>';
$html .= '<th class="bt bb bg-user-set">Geschoß</th>';
$html .= '<th class="bt bb bg-user-set">Orientierung</th>';
$html .= '<th class="bt bb bg-user-set">Typ</th>';
$html .= '<th class="bt bb bg-user-set">Raumart</th>';
$html .= '<th class="bt bb bg-user-set">Fläche</th>';
$html .= '<th class="bt bb bg-user-set" colspan="6"></th>';
$html .= '<th class="bt br bb bg-user-set">Nutzwert</th>';
$html .= '</tr></thead>';
$summe_nutzwert = 0;
@@ -38,7 +38,7 @@ class Nutzwertberechnung
$flaeche = 0;
foreach ($methoden[1] as $komponente) {
$html .= '<tr>';
$html .= Html::td($komponente['top_nummer'], 'bg-user-set');
$html .= Html::td($komponente['top_nummer'], 'bl bg-user-set');
$html .= Html::td($komponente['geschoss'], 'bl');
$html .= Html::td($komponente['orientierung'], 'bl');
$html .= Html::td($komponente['type'], 'bl');
@@ -180,11 +180,11 @@ class Nutzwertberechnung
$html .= '<table autosize="1" style="page-break-inside:avoid;">';
$html .= '<thead><tr>';
$html .= '<th class="bl bt bg-user-set">Top Nr.</th>';
$html .= '<th class="bl bt bg-user-set">Geschoß</th>';
$html .= '<th class="bl bt bg-user-set">Raumart</th>';
$html .= '<th class="bl bt bg-user-set">Fläche</th>';
$html .= '<th class="bl bt bg-user-set" colspan="4"></th>';
$html .= '<th class="bl bt br bg-user-set">Nutzwert</th>';
$html .= '<th class="bt bb bg-user-set">Geschoß</th>';
$html .= '<th class="bt bb bg-user-set">Raumart</th>';
$html .= '<th class="bt bb bg-user-set">Fläche</th>';
$html .= '<th class="bt bb bg-user-set" colspan="4"></th>';
$html .= '<th class="bt bb br bg-user-set">Nutzwert</th>';
$html .= '</tr></thead>';
$nutzwert = 0;
@@ -199,10 +199,11 @@ class Nutzwertberechnung
$html .= Html::td('x', 'center bl');
$html .= Html::td(number_format($komponente['faktor'], 3), 'center bl');
$html .= Html::td('=', 'center bl');
$nutzwert = $komponente['flaeche'] * $komponente['faktor'];
$html .= Html::td(number_format($nutzwert, 3, ',', '.'), 'right bl');
$nutzwert = round($nutzwert) < 1 ? 1 : round($nutzwert);
$html .= Html::td($nutzwert, 'center bl br');
$flaeche = $komponente['flaeche'] * $komponente['faktor'];
$html .= Html::td(number_format($flaeche, 3, ',', '.'), 'right bl');
$tmp = round($flaeche) < 1 ? 1 : round($flaeche);
$html .= Html::td($tmp, 'center bl br');
$nutzwert += $tmp;
$html .= '</tr>';
}
}
+3 -1
View File
@@ -19,8 +19,10 @@ class Html
public static function table_footer($nutzwert_summe, $colspan = 12)
{
$colspan--;
$html = '<tfooter><tr>';
$html .= '<th colspan="'.$colspan.'" class="bl bb right bg-user-set">Nutzwert gerundet</th>';
$html .= '<th class="bl bb bg-user-set"></th>';
$html .= '<th colspan="'.$colspan.'" class="bt bb right bg-user-set">Nutzwert gerundet</th>';
$html .= '<th class="bt br bb center bg-user-set">'.$nutzwert_summe.'</th>';
$html .= '</tr></tfooter>';