48 lines
2.4 KiB
PHP
48 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\Downloads;
|
|
|
|
use HermannTelser\Gutachten\Utility\Helper;
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
|
|
class AllgemeinTabelle
|
|
{
|
|
public static function load()
|
|
{
|
|
|
|
$_allgemeine = DbFunction::select('tx_gutachten_allgemein', ['geschoss', 'typ', 'qm'], ['pid' => DbFunction::$projektid]);
|
|
|
|
$_data = array_chunk($_allgemeine, 2);
|
|
|
|
$html = '<table class="pure-table pure-table-striped br size07" style="width: 100%;">';
|
|
$html .= '<tr>';
|
|
$html .= '<th class="allheader" style="border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Geschoß</th>';
|
|
$html .= '<th class="allheader" style="width:50mm; border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Typ</th>';
|
|
$html .= '<th class="allheader" style="border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Fläche</th>';
|
|
$html .= '<td style="background-color:#fff;"></td>';
|
|
$html .= '<th class="allheader" style="border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Geschoß</th>';
|
|
$html .= '<th class="allheader" style="width:50mm; border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Typ</th>';
|
|
$html .= '<th class="allheader" style="border-top: 0.1mm solid #cbcbcb; border-bottom: 0.1mm solid #cbcbcb;">Fläche</th>';
|
|
$html .= '</tr>';
|
|
|
|
foreach ($_data as $key => $value) {#
|
|
$html .= '<tr>';
|
|
if (isset($value[0])) {
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$value[0]['geschoss'].'</td>';
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$value[0]['typ'].'</td>';
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.Helper::number_format_de($value[0]['qm'], 2).'</td>';
|
|
$html .= '<td style="background-color:#fff;"></td>';
|
|
}
|
|
if (isset($value[1])) {
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$value[1]['geschoss'].'</td>';
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$value[1]['typ'].'</td>';
|
|
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.Helper::number_format_de($value[1]['qm'], 2).'</td>';
|
|
}
|
|
$html .= '</tr>';
|
|
|
|
}
|
|
$html .= '</table>';
|
|
return $html;
|
|
}
|
|
}
|