diff --git a/app/Actions/Generate/Nutzwerte/Zusammenstellung.php b/app/Actions/Generate/Nutzwerte/Zusammenstellung.php deleted file mode 100644 index 8c5cabf..0000000 --- a/app/Actions/Generate/Nutzwerte/Zusammenstellung.php +++ /dev/null @@ -1,91 +0,0 @@ -where('projekts_id', $projekts_id); - $nutzwert_summe = $res->sum('nutzwert_summe'); - - $summe_prozent = []; - $summe_nutzwert = []; - - $html .= '
* Die Anteile wurden verdoppelt, sodaß die Mindestanteile jederzeit durch zwei geteilt werden können.'; - - return $html; - } -} diff --git a/app/Actions/Generate/Pdf.php b/app/Actions/Generate/Pdf.php index a830a2a..656ac15 100644 --- a/app/Actions/Generate/Pdf.php +++ b/app/Actions/Generate/Pdf.php @@ -9,6 +9,7 @@ use App\Actions\Generate\Pdf\Platzhalter; use App\Actions\Generate\Pdf\Ueberschrift; use App\Actions\Generate\Tabellen\Allgemeinflaechen; use App\Actions\Generate\Tabellen\Paragraph6; +use App\Actions\Generate\Tabellen\Zusammenstellung; use App\Actions\Generate\Tabellen\ZuUndAbschlaege; use App\Actions\Generate\Utilities\Format; use App\Models\Auftraggeber; @@ -121,6 +122,9 @@ class Pdf case '5': $html .= ZuUndAbschlaege::load($projekte_id); break; + case '7': + $html .= Zusammenstellung::load($projekte_id); + break; case '8': $str = RichContentRenderer::make(self::$auftraggeber->referenz_formatting)->toHtml(); $html .= Format::fix_str($str); diff --git a/app/Actions/Generate/Tabellen/Allgemeinflaechen.php b/app/Actions/Generate/Tabellen/Allgemeinflaechen.php index 1fcdbc8..e6326ef 100644 --- a/app/Actions/Generate/Tabellen/Allgemeinflaechen.php +++ b/app/Actions/Generate/Tabellen/Allgemeinflaechen.php @@ -17,18 +17,7 @@ class Allgemeinflaechen $_data = array_chunk($_allgemeine, 2); - $html = '
| '; - $html .= Html::td('Geschoß', 'head bl bt wp10'); - $html .= Html::td('Typ', 'head bl bt wp25'); - $html .= Html::td('Fläche', 'head bl bt br wp10'); - $html .= ''; - $html .= ' |
* Die Anteile wurden verdoppelt, sodaß die Mindestanteile jederzeit durch zwei geteilt werden können.'; + + return $html; + + // $_obj = Zusammenstellung_Methode5::load($projekte_id); + + // foreach ($_obj as $row) { + // $row['nutzwert_summe2'] = $row['nutzwert_summe'] * 2 .' / '.$nutzwert_summe * 2 .' tel Anteil ='; + // $tmp = ($row['nutzwert_summe'] * 2) / ($nutzwert_summe * 2) * 100; + // $row['prozent'] = Format::numeric($tmp, 3).'%'; + + // $summe_prozent[] = $tmp; + // $summe_nutzwert[] = $row['nutzwert_summe']; + + // $html .= '
* Die Anteile wurden verdoppelt, sodaß die Mindestanteile jederzeit durch zwei geteilt werden können.';
+
+ return $html;
+ }
+}
diff --git a/app/Actions/Generate/Utilities/Html.php b/app/Actions/Generate/Utilities/Html.php
index a94a187..f155a01 100644
--- a/app/Actions/Generate/Utilities/Html.php
+++ b/app/Actions/Generate/Utilities/Html.php
@@ -4,23 +4,53 @@ namespace App\Actions\Generate\Utilities;
class Html
{
- public static function table_header_90($header_row)
+ public static function table_header($header_row)
{
- $html = '';
- $mm = 190 / \count($header_row);
+ $html = ' ';
+ $html .= '
';
foreach ($header_row as $value) {
- $html .= ' ';
return $html;
}
- public static function td($value = '', $classname = '', $colspan = 0)
+ public static function table_header_90($header_row)
+ {
+ $html = ''.$value.' ';
+ $html .= ''.$value.' ';
}
$html .= '';
+ $html .= '
';
+ $mm = 190 / \count($header_row);
+ foreach ($header_row as $value) {
+ $html .= ' ';
+
+ return $html;
+ }
+
+ public static function table_2_columns($header_row)
+ {
+
+ $html = ''.$value.' ';
+ }
+ $html .= '';
+ foreach ($header_row as $value) {
+ $html .= ' ';
+
+ return $html;
+ }
+
+ public static function td($value = '', $classname = '', $colspan = 0, $style = '')
{
$cls = $classname != '' ? ' class="'.$classname.'"' : '';
$spn = $colspan != '' ? ' colspan="'.$colspan.'"' : '';
+ $style = $style != '' ? ' style="'.$style.'"' : '';
- return "'.$value.' ';
+ }
+ $html .= '';
+ foreach ($header_row as $value) {
+ $html .= ' '.$value.' ';
+ }
+ $html .= '".$value.' ';
+ return "".$value.' ';
}
}
diff --git a/app/Actions/Validation/GutachtenValidation.php b/app/Actions/Validation/GutachtenValidation.php
index 5f95194..7bd4c69 100644
--- a/app/Actions/Validation/GutachtenValidation.php
+++ b/app/Actions/Validation/GutachtenValidation.php
@@ -131,7 +131,7 @@ class GutachtenValidation
/**
* ProjektObjekte & ProjektObjekteImDetail
*/
- $res = ProjektObjekte::with('ProjektObjekteImDetail')->where('projekte_id', $record->id)->get();
+ $res = ProjektObjekte::with('projektobjekteimdetail')->where('projekte_id', $record->id)->get();
if (! $res->count()) {
Notification::make()
->title('Tabelle Objekte im Detail')
@@ -146,8 +146,7 @@ class GutachtenValidation
foreach ($res as $value) {
- $raeume = $value->ProjektObjekteImDetail->toArray();
- $raeume = $raeume[0] ?? [];
+ $raeume = $value->projektobjekteimdetail->toArray();
if (! count($raeume)) {
Notification::make()
diff --git a/app/Models/ProjektObjekteImDetail.php b/app/Models/ProjektObjekteImDetail.php
index 7fc09ac..6fb1a17 100644
--- a/app/Models/ProjektObjekteImDetail.php
+++ b/app/Models/ProjektObjekteImDetail.php
@@ -34,4 +34,9 @@ class ProjektObjekteImDetail extends Model
{
return $this->belongsTo(ProjektObjekte::class, 'projekt_objekte_id', 'id');
}
+
+ public function merkmale()
+ {
+ return $this->hasOne(ProjektMerkmale::class, 'raumart', 'raumart');
+ }
}
diff --git a/resources/css/pdf-download.css b/resources/css/pdf-download.css
index c786f56..08fe779 100644
--- a/resources/css/pdf-download.css
+++ b/resources/css/pdf-download.css
@@ -112,12 +112,12 @@ a {
color: #4a5565;
}
-.hellgrau {
- background-color: #e5e7eb;
+.bg-sky {
+ background-color: #eff6ff !important;
}
-.hellblau {
- background-color: #eff6ff !important;
+.bg-white {
+ background-color: #fff !important;
}
.green {
@@ -135,11 +135,17 @@ p {
margin: auto 5px;
}
+
.py-1 {
padding-top: 1mm;
padding-bottom: 1mm;
}
+.py-2 {
+ padding-top: 2mm;
+ padding-bottom: 2mm;
+}
+
.m10 {
margin: 10px;
}