Chore: Verschiebe Git-Repository in das Hauptverzeichnis und richte .gitignore ein
This commit is contained in:
commit
96d0545193
502 files changed
+176027
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
|
||||
class Deckblatt
|
||||
{
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param mixed $_platzhalter
|
||||
* @param mixed $_gutachter
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function create($value, $_projekt, $_platzhalter, $_gutachter, $_auftraggeber)
|
||||
{
|
||||
|
||||
$gutachter = Helper::replacePlatzhalter($_platzhalter, $_gutachter[0]['txt']);
|
||||
// gutachter
|
||||
$html = '<div class="deckblatt">';
|
||||
if ($_gutachter[0]['id'] == 1) {
|
||||
$image = Environment::getProjectPath()."/public/typo3conf/ext/gutachten/Resources/Public/BenutzerLogos/" . $_gutachter[0]['logo'];
|
||||
$html .= '<div class="gutachter">';
|
||||
$html .= '<img src="'.$image.'" style="width:80mm; height:auto">';
|
||||
$html .= '</div>';
|
||||
} else {
|
||||
$kopf = Helper::replacePlatzhalter($_platzhalter, $_gutachter[0]['kopf']);
|
||||
$html .= '<div class="gutachter"><h3>'.strip_tags($kopf).'</h3>'.$gutachter.'</div>';
|
||||
}
|
||||
|
||||
// title
|
||||
$title = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$title = explode('<br />', $title);
|
||||
if (isset($value['paragraph6'])) {
|
||||
$html .= '<div class="gutachten"><h1>GUTACHTEN gem. §6</h1>';
|
||||
} else {
|
||||
$txt = $value['titel']=='Deckblatt' ? 'GUTACHTEN' : $value['titel'];
|
||||
$html .= '<div class="gutachten"><h1>' . $txt . '</h1>';
|
||||
}
|
||||
$html .= '<div class="pl-1">'.strip_tags($title[0]).'</div></div>';
|
||||
|
||||
$projektname = $title[0];
|
||||
// zweck
|
||||
if (isset($value['paragraph6'])) {
|
||||
$html .= '<div class="zweckbox bold">'.$_projekt[0]['name'].'<br />'.$title[1].'</div>';
|
||||
}
|
||||
else {
|
||||
$html .= '<div class="zweckbox"><h3>ZUR FESTSETZUNG DER NUTZWERTE</h3>'.$_projekt[0]['name'].'<br />'.$title[1].'</div>';
|
||||
}
|
||||
|
||||
$auftraggeber = Helper::replacePlatzhalter($_platzhalter, $_auftraggeber[0]['txt']);
|
||||
// first line h3
|
||||
$auftraggeber = str_replace("<br />", "|||", $auftraggeber);
|
||||
$auftraggeber = str_replace("</div>", "|||", $auftraggeber);
|
||||
$auftraggeber = strip_tags($auftraggeber);
|
||||
$tmp = explode('|||', $auftraggeber);
|
||||
$html .= '<div class="auftraggeber">';
|
||||
foreach ($tmp as $key => $value) {
|
||||
if ($value[0] == '-') {
|
||||
$html .= '<h3>' . trim(substr($value, 1)) . '</h3>';
|
||||
} else {
|
||||
$html .= trim(strip_tags($value)).'<br />';
|
||||
}
|
||||
}
|
||||
$html .= '</div>';
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
// Mpdf installed by typo3 extension
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Color;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use HermannTelser\Gutachten\Utility\Message;
|
||||
|
||||
class ExcelAufstellung
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function download()
|
||||
{
|
||||
// Message::debug(__file__,__line__, "DOWNLOAD SPREAD SHEET AUFSTELLUNG");
|
||||
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
$local_debug = 0;
|
||||
|
||||
$projektid = GeneralUtility::_GP('projekt_aktive');
|
||||
if (0 == $projektid or !is_numeric($projektid)) {
|
||||
die('aktive projekt ID fehlt!');
|
||||
}
|
||||
|
||||
$_aufstellung = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_generell',
|
||||
['[>]tx_gutachten_aufstellung' => ['tx_gutachten_raume_generell.aufstellung_id' => 'id']],
|
||||
[
|
||||
'tx_gutachten_raume_generell.raum',
|
||||
'tx_gutachten_raume_generell.aufstellung_id',
|
||||
'tx_gutachten_aufstellung.titel'
|
||||
],
|
||||
[
|
||||
'AND' =>
|
||||
[
|
||||
'tx_gutachten_raume_generell.pid' => $projektid,
|
||||
'tx_gutachten_raume_generell.aufstellung_id[!]' => 0
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$_aufstellung_map = [];
|
||||
$_aufstellung_header = [];
|
||||
foreach ($_aufstellung as $key => $value) {
|
||||
$_aufstellung_map[$value['raum']] = $value['titel'];
|
||||
if(!in_array($value['titel'], $_aufstellung_header)){
|
||||
$_aufstellung_header[] = $value['titel'];
|
||||
}
|
||||
}
|
||||
|
||||
if(!$_aufstellung_map){
|
||||
Message::note('Die "Aufstellung Titel" fehlen, bitte bei Methoden hinzufügen (Top Menu).');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($local_debug){
|
||||
print_r($_aufstellung_header);
|
||||
}
|
||||
|
||||
|
||||
$_projekt = DbFunction::select(
|
||||
'tx_gutachten_projekte',
|
||||
['id', 'auftraggeber_id', 'gutachter_id', 'intname', 'name', 'beschreibung', 'erstellung', 'onoff', 'upload', 'allgemeinupload', 'recalculate', 'zuabTitel', 'nwbTitel', 'zustTitel', 'allgemTitel', 'loggia_title', 'nwbStartSeite', 'm1pP', 'm5pP', 'timestamp', 'status', 'erstelldatum'],
|
||||
['id' => $projektid]
|
||||
);
|
||||
$projektname = str_replace(',', '', $_projekt[0]['name']);
|
||||
$projektname = preg_replace("'\W, '", '', $projektname) . ' ' . date('d. m. y. H:i:s');
|
||||
|
||||
if($local_debug){
|
||||
print_r($_projekt);
|
||||
}
|
||||
|
||||
$join = [];
|
||||
$join['[>]tx_gutachten_raume_all']['tx_gutachten_raume_basis.id'] = 'tt_raume_basis_id';
|
||||
$join['[>]tx_gutachten_orientierung']['tx_gutachten_raume_basis.tt_orientierung_id'] = 'id';
|
||||
|
||||
$fields = [];
|
||||
$fields[] = 'tx_gutachten_raume_basis.id';
|
||||
$fields[] = 'tx_gutachten_raume_basis.topNr';
|
||||
$fields[] = 'tx_gutachten_raume_basis.typ';
|
||||
$fields[] = 'tx_gutachten_orientierung.orientierung';
|
||||
$fields[] = 'tx_gutachten_raume_all.geschoss';
|
||||
$fields[] = 'tx_gutachten_raume_all.raum';
|
||||
$fields[] = 'tx_gutachten_raume_all.qm';
|
||||
$fields[] = 'tx_gutachten_raume_all.tt_raumart_id';
|
||||
|
||||
$where = [];
|
||||
$where['AND']['tx_gutachten_raume_basis.pid'] = $projektid;
|
||||
// $where['AND']['tx_gutachten_raume_basis.id'] = 43538;
|
||||
$where['AND']['tx_gutachten_raume_all.tt_raumart_id'] = [1, 2, 3, 4, 7];
|
||||
$where['AND']['tx_gutachten_raume_basis.noDispInOrientierung'] = 0;
|
||||
$where['ORDER']['tx_gutachten_raume_basis.topNr'] = 'ASC';
|
||||
$where['ORDER']['tx_gutachten_raume_all.raum'] = 'ASC';
|
||||
// $where['LIMIT'] = 2;
|
||||
$_raeume_alle = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_basis',
|
||||
$join,
|
||||
$fields,
|
||||
$where
|
||||
);
|
||||
|
||||
// print_r($_raeume_alle);
|
||||
// exit;
|
||||
|
||||
// [id] => 79543
|
||||
// [topNr] => W01
|
||||
// [orientierung] => N/W
|
||||
// [geschoss] => EG
|
||||
// [raum] => AR
|
||||
// [qm] => 0.75
|
||||
// [tt_raumart_id] => 1
|
||||
|
||||
$_sorted = [];
|
||||
$_header = [];
|
||||
$_header4 = [];
|
||||
$_header7 = [];
|
||||
foreach ($_raeume_alle as $row) {
|
||||
$tt_raume_basis_id = $row['id'];
|
||||
$_sorted[$tt_raume_basis_id]['Top'] = $row['topNr'];
|
||||
$_sorted[$tt_raume_basis_id]['Geschoß'] = $row['geschoss'];
|
||||
$_sorted[$tt_raume_basis_id]['Orientierung'] = $row['orientierung'];
|
||||
$_sorted[$tt_raume_basis_id]['Type'] = $row['typ'];
|
||||
$raum = $row['raum'];
|
||||
$_sorted[$tt_raume_basis_id][$raum] = $row['qm'];
|
||||
if($row['tt_raumart_id'] == 1)
|
||||
$_sorted[$tt_raume_basis_id]['Summe Nutzflächen'] += $row['qm'];
|
||||
if ($row['tt_raumart_id'] == 1){
|
||||
$_header[] = $row['raum'];
|
||||
}
|
||||
else if ($row['tt_raumart_id'] == 4)
|
||||
$_header4[$tt_raume_basis_id][] = $row['raum'];
|
||||
else if ($row['tt_raumart_id'] == 7)
|
||||
$_header7[$tt_raume_basis_id][] = $row['raum'];
|
||||
|
||||
}
|
||||
|
||||
$_header = array_unique($_header);
|
||||
sort($_header);
|
||||
array_unshift($_header, 'Top', 'Geschoß', 'Orientierung', 'Type');
|
||||
array_push($_header, 'Summe Nutzflächen');
|
||||
$_header = array_merge($_header, $_aufstellung_header);
|
||||
// print_r($_header);
|
||||
|
||||
$_header_char = [];
|
||||
$char = 'A';
|
||||
$summe_position = '';
|
||||
foreach ($_header as $value) {
|
||||
if ($value == 'Summe Nutzflächen') {
|
||||
$summe_position = $char;
|
||||
}
|
||||
$_header_char[$char] = $value;
|
||||
++$char;
|
||||
}
|
||||
$tmp = array_flip($_header_char);
|
||||
|
||||
if($local_debug){
|
||||
print_r($_aufstellung_map);
|
||||
print_r($tmp);
|
||||
}
|
||||
|
||||
$_final = [];
|
||||
foreach ($_sorted as $key => $flat) {
|
||||
|
||||
// print_r($flat);
|
||||
|
||||
|
||||
foreach ($flat as $name => $value) {
|
||||
|
||||
if(isset($_aufstellung_map[$name])){
|
||||
$name = $_aufstellung_map[$name];
|
||||
}
|
||||
|
||||
// if(!isset($tmp[$name])){
|
||||
// echo "\n" . $name . "\n";
|
||||
// print_r($_header4);
|
||||
// }
|
||||
|
||||
$char = $tmp[$name];
|
||||
if(isset($_final[$key][$char])){
|
||||
$_final[$key][$char] += $value;
|
||||
}
|
||||
else {
|
||||
$_final[$key][$char] = $value;
|
||||
}
|
||||
|
||||
}
|
||||
ksort($_final[$key]);
|
||||
// print_r($_final);
|
||||
// exit;
|
||||
}
|
||||
// print_r($_final);
|
||||
// exit;
|
||||
|
||||
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$spreadsheet->getProperties()->setCreator('Architekt Vogl-Fernheim')->setTitle('Nutzwerte Aufstellung')->setDescription($projektname . ", erstellt am " . date("d.M.Y"));
|
||||
$activeSheet = $spreadsheet->getActiveSheet();
|
||||
$activeWorksheet = $spreadsheet->getActiveSheet();
|
||||
|
||||
foreach ($_header_char as $coll => $value) {
|
||||
$cell = $coll . 1;
|
||||
$activeWorksheet->getStyle($cell)->getAlignment()->setTextRotation(90);
|
||||
$activeWorksheet->getRowDimension('1')->setRowHeight(180);
|
||||
$activeWorksheet->setCellValue($cell, $value);
|
||||
$cellStyle = $activeWorksheet->getStyle($cell);
|
||||
$cellStyle->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
|
||||
$cellStyle->getFill()->setFillType(Fill::FILL_SOLID);
|
||||
if (in_array($coll, ['A', 'B', 'C', 'D', $summe_position])) {
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00000000');
|
||||
} else {
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00595959');
|
||||
}
|
||||
|
||||
$cellStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||
$cellStyle->getAlignment()->setVertical(Alignment::VERTICAL_CENTER);
|
||||
// $activeWorksheet->getStyle($cell)->getBorders()->getOutline()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color('FFFFFFFF'));
|
||||
}
|
||||
|
||||
foreach ($_header_char as $coll => $value) {
|
||||
$cell = $coll . 2;
|
||||
$cellStyle = $activeWorksheet->getStyle($cell);
|
||||
$cellStyle->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
|
||||
$cellStyle->getFill()->setFillType(Fill::FILL_SOLID);
|
||||
if (in_array($coll, ['A', 'B', 'C', 'D', $summe_position])) {
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00000000');
|
||||
} else {
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00595959');
|
||||
}
|
||||
if (!in_array($coll, ['A', 'B', 'C', 'D'])) {
|
||||
$activeWorksheet->setCellValue($cell, 'm²');
|
||||
}
|
||||
$cellStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||
// $activeWorksheet->getStyle($cell)->getBorders()->getOutline()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color('FFFFFFFF'));
|
||||
}
|
||||
$row = '3';
|
||||
// print_r($_final);
|
||||
// exit;
|
||||
foreach ($_final as $id => $einheit) {
|
||||
foreach ($einheit as $colum => $value) {
|
||||
$cell = $colum . $row;
|
||||
$activeWorksheet->setCellValue($cell, $value);
|
||||
$cellStyle = $activeWorksheet->getStyle($cell);
|
||||
|
||||
if (in_array($colum, ['A', $summe_position])) {
|
||||
$cellStyle->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
|
||||
$cellStyle->getFill()->setFillType(Fill::FILL_SOLID);
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00000000');
|
||||
// $activeWorksheet->getStyle($cell)->getBorders()->getOutline()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color('FFFFFFFF'));
|
||||
} else if (in_array($colum, ['B', 'C'])) {
|
||||
$cellStyle->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
|
||||
$cellStyle->getFill()->setFillType(Fill::FILL_SOLID);
|
||||
$cellStyle->getFill()->getStartColor()->setARGB('00595959');
|
||||
// $activeWorksheet->getStyle($cell)->getBorders()->getOutline()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color('FFFFFFFF'));
|
||||
} else {
|
||||
// $activeWorksheet->getStyle($cell)->getBorders()->getOutline()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color('00000000'));
|
||||
}
|
||||
}
|
||||
++$row;
|
||||
}
|
||||
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment;filename="' . $projektname . '.xlsx"');
|
||||
header('Cache-Control: max-age=0');
|
||||
|
||||
// If you're serving to IE over SSL, then the following may be needed
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
|
||||
header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
|
||||
header('Pragma: public'); // HTTP/1.0
|
||||
|
||||
// Xls
|
||||
// $writer = new Xlsx($spreadsheet);
|
||||
// $writer->save('hello world.xlsx');
|
||||
$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
|
||||
$writer->save('php://output');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\ObjekteExcel;
|
||||
use HermannTelser\Gutachten\DB\Select\Select;
|
||||
use HermannTelser\Gutachten\Utility\Message;
|
||||
use Mpdf;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
// Mpdf installed by typo3 extension
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class ExcelNutzflaeche
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function download()
|
||||
{
|
||||
// Message::debug(__file__,__line__, "DOWNLOAD SPREAD SHEET");
|
||||
|
||||
DbFunction::$debug = 0;
|
||||
|
||||
$projektid = GeneralUtility::_GP('projekt_aktive');
|
||||
|
||||
if (0 == $projektid or !is_numeric($projektid)) {
|
||||
die('aktive projekt ID fehlt!');
|
||||
}
|
||||
|
||||
$_projekt = DbFunction::select(
|
||||
'tx_gutachten_projekte',
|
||||
['id', 'auftraggeber_id', 'gutachter_id', 'intname', 'name', 'beschreibung', 'erstellung', 'onoff', 'upload', 'allgemeinupload', 'recalculate', 'zuabTitel', 'nwbTitel', 'zustTitel', 'allgemTitel', 'loggia_title', 'nwbStartSeite', 'm1pP', 'm5pP', 'timestamp', 'status', 'erstelldatum'],
|
||||
['id' => $projektid]
|
||||
);
|
||||
|
||||
$projektname = str_replace(',', '', $_projekt[0]['name']);
|
||||
$projektname = preg_replace("'\W, '", '', $projektname);
|
||||
|
||||
$file = file_get_contents(__DIR__.'/excel_header.txt');
|
||||
$file = preg_replace("/[\n\r]/", '', $file);
|
||||
$_headers = explode(',', $file);
|
||||
|
||||
//
|
||||
// // Create new Spreadsheet object
|
||||
$spreadsheet = new Spreadsheet();
|
||||
|
||||
// Set document properties
|
||||
$spreadsheet->getProperties()->setCreator('Hermann Telser Nutzwertberechnung')
|
||||
->setLastModifiedBy('Hermann Telser Nutzwertberechnung')
|
||||
->setTitle('Nutzwertberechnung')
|
||||
->setDescription('Nutzwertberechnung v10.1.3, © Hermann Telser 2007 - 2023');
|
||||
|
||||
// $_rot = [2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 90, 91, 92, 93];
|
||||
// $_gelb = [8, 19, 29];
|
||||
$_rot = [2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 91, 92, 93, 94];
|
||||
$_gelb = [8, 19, 29];
|
||||
|
||||
$row = '1';
|
||||
$coll = 'A';
|
||||
foreach ($_headers as $key => $value) {
|
||||
$cell = $coll.$row;
|
||||
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value);
|
||||
|
||||
if (\in_array($key, $_rot)) {
|
||||
$spreadsheet->getActiveSheet()->getStyle($cell)->getFont()->getColor()->setARGB('ffffff');
|
||||
$spreadsheet->getActiveSheet()->getStyle($cell)->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)->getStartColor()->setARGB('ff0000');
|
||||
} elseif (\in_array($key, $_gelb)) {
|
||||
$spreadsheet->getActiveSheet()->getStyle($cell)->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)->getStartColor()->setARGB('ffff00');
|
||||
}
|
||||
|
||||
$spreadsheet->getActiveSheet()
|
||||
->getStyle($cell)
|
||||
->getBorders()
|
||||
->getBottom()
|
||||
->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK);
|
||||
|
||||
++$coll;
|
||||
}
|
||||
|
||||
$_objekte_all = ObjekteExcel::select($projektid);
|
||||
|
||||
// print_r($_objekte_all);
|
||||
// exit;
|
||||
|
||||
$row = 2;
|
||||
foreach ($_objekte_all as $key => $value) {
|
||||
$tt_raume_basis_id = $value['id'];
|
||||
|
||||
$cell = 'B'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value['topNr']);
|
||||
|
||||
if (0 == $value['nodspl']) {
|
||||
$cell = 'C'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value['GNO']);
|
||||
|
||||
$cell = 'D'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value['qmM1']);
|
||||
|
||||
// M2
|
||||
$_methode_2 = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_all',
|
||||
['[>]tx_gutachten_raume_generell' => 'tt_raumart_id'],
|
||||
[
|
||||
'tx_gutachten_raume_all.uid',
|
||||
'tx_gutachten_raume_all.geschoss',
|
||||
'tx_gutachten_raume_all.raum',
|
||||
'tx_gutachten_raume_all.factor',
|
||||
'tx_gutachten_raume_all.qm',
|
||||
'tx_gutachten_raume_all.NW',
|
||||
'tx_gutachten_raume_all.NWungerundet',
|
||||
'tx_gutachten_raume_all.NWm2',
|
||||
'tx_gutachten_raume_all.uid',
|
||||
'tx_gutachten_raume_all.timestamp',
|
||||
'tx_gutachten_raume_generell.zunutzwert',
|
||||
],
|
||||
[
|
||||
'AND' => [
|
||||
'tx_gutachten_raume_all.tt_raumart_id' => [2, 8],
|
||||
'tx_gutachten_raume_all.tt_raume_basis_id' => $tt_raume_basis_id,
|
||||
'tx_gutachten_raume_all.pid' => $projektid,
|
||||
'tx_gutachten_raume_generell.pid' => $projektid,
|
||||
],
|
||||
'ORDER' => 'tx_gutachten_raume_all.raum',
|
||||
]
|
||||
);
|
||||
|
||||
$zunutzwert = 0;
|
||||
foreach ($_methode_2 as $k => $v) {
|
||||
//if($b['tt_raumart_id']==2) //M2
|
||||
//{
|
||||
// $summeM2_factor += $b['NWm2'];
|
||||
//}
|
||||
//else //M2b
|
||||
//{
|
||||
// $summeM2_ohne_factor += $b['NWm2'];
|
||||
//}
|
||||
if (1 == $v['zunutzwert']) {
|
||||
$zunutzwert += $v['qm'];
|
||||
}
|
||||
}
|
||||
if ($zunutzwert > 0) {
|
||||
$cell = 'E'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $zunutzwert);
|
||||
}
|
||||
|
||||
$cell = 'F'.$row;
|
||||
$gesamt = $value['qmM1'] + $zunutzwert;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $gesamt);
|
||||
} else {
|
||||
$cell = 'I'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value['GNO']);
|
||||
|
||||
// STELLPLATZ qm
|
||||
// Methode 5
|
||||
$_m5 = DbFunction::select('tx_gutachten_raume_all', ['qm','raum'], ['AND' => ['tt_raume_basis_id' => $tt_raume_basis_id, 'tt_raumart_id' => 5]]);
|
||||
|
||||
$_qm = 0;
|
||||
$raum = '';
|
||||
foreach ($_m5 as $k => $m5) {
|
||||
$_qm += (float) $m5['qm'];
|
||||
$raum = (string) $m5['raum'];
|
||||
}
|
||||
|
||||
// echo "\n" . $raum;
|
||||
|
||||
$cell = 'L'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, number_format($_qm, 2, ',', ''));
|
||||
$cell = 'AT'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, "SALAM " . $raum);
|
||||
}
|
||||
|
||||
// Parifizierer
|
||||
$cell = 'R'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $_projekt[0]['gutachter']);
|
||||
|
||||
// LAGE
|
||||
$_lage = Select::raume_all($projektid, $tt_raume_basis_id, 1);
|
||||
$cell = 'AQ'.$row;
|
||||
$lage = $_lage[0]['geschoss'] ?? '';
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $lage);
|
||||
$cell = 'AR'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $value['orientierung']);
|
||||
|
||||
// WOHNUNG
|
||||
if (0 == $value['nodspl']) {
|
||||
// BESCHREIBUNG
|
||||
$_beschreibung = Select::raume_all($projektid, $tt_raume_basis_id, [1, 2, 8]);
|
||||
if (\count($_beschreibung) > 0) {
|
||||
$_tmp = [];
|
||||
|
||||
// print_r($_beschreibung);
|
||||
foreach ($_beschreibung as $key => $value) {
|
||||
if (!\in_array($value['raum'], ['Loggia', 'Loggia 1', 'Loggia 2'])) {
|
||||
$_tmp[] = $value['raum'];
|
||||
}
|
||||
}
|
||||
$beschreibung = implode(', ', $_tmp);
|
||||
$cell = 'AT'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $beschreibung);
|
||||
}
|
||||
|
||||
// M2
|
||||
if (\count($_methode_2) > 0) {
|
||||
$_tmp = [];
|
||||
foreach ($_methode_2 as $key => $value) {
|
||||
if (\in_array($value['raum'], ['Loggia', 'Loggia 1', 'Loggia 2'])) {
|
||||
$_tmp[] = $value['raum'].': '.number_format($value['qm'], 2, ',', '').' m²';
|
||||
}
|
||||
}
|
||||
$beschreibung = implode(', ', $_tmp);
|
||||
$cell = 'AU'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $beschreibung);
|
||||
}
|
||||
|
||||
// M3
|
||||
$_m3 = Select::raume_all($projektid, $tt_raume_basis_id, [3, 7]);
|
||||
if (\count($_m3) > 0) {
|
||||
$_tmp = [];
|
||||
foreach ($_m3 as $key => $value) {
|
||||
$_tmp[] = $value['raum'].' '.number_format($value['qm'], 2, ',', '').' m²';
|
||||
}
|
||||
$m3 = implode(', ', $_tmp);
|
||||
$cell = 'AV'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $m3);
|
||||
}
|
||||
|
||||
// M4
|
||||
$_m4 = Select::raume_all($projektid, $tt_raume_basis_id, 4);
|
||||
if (\count($_m4) > 0) {
|
||||
$_tmp = [];
|
||||
foreach ($_m4 as $key => $value) {
|
||||
$_tmp[] = $value['raum'].' '.number_format($value['qm'], 2, ',', '').' m²';
|
||||
}
|
||||
$m4 = implode(', ', $_tmp);
|
||||
$cell = 'AW'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $m4);
|
||||
}
|
||||
} else {
|
||||
// Methode 5a & Methode 5b
|
||||
// $_m56 = Select::raume_all($projektid, $tt_raume_basis_id, [5, 6, 9]);
|
||||
$_m56 = DbFunction::select('tx_gutachten_raume_all', ['qm','raum'], ['AND' => ['tt_raume_basis_id' => $tt_raume_basis_id, 'tt_raumart_id' => [5, 6, 9] ],'ORDER' => ['tt_raumart_id' => 'ASC']]);
|
||||
|
||||
if (\count($_m56) > 0) {
|
||||
|
||||
$tmp1 = $_m56[0]['raum'];
|
||||
$cell = 'AT'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $tmp1);
|
||||
if(isset($_m56[1])){
|
||||
$tmp2 = $_m56[1]['raum'] . ' ' . number_format($_m56[1]['qm'], 2, ',', '').' m²';
|
||||
$cell = 'AV'.$row;
|
||||
$spreadsheet->setActiveSheetIndex(0)->setCellValue($cell, $tmp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++$row;
|
||||
}
|
||||
|
||||
|
||||
// exit;
|
||||
|
||||
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
||||
$spreadsheet->setActiveSheetIndex(0);
|
||||
// Rename worksheet
|
||||
$spreadsheet->getActiveSheet()->setTitle('Daten für den Kaufvertrag');
|
||||
|
||||
// Redirect output to a client’s web browser (Xls)
|
||||
header('Content-Type: application/vnd.ms-excel');
|
||||
header('Content-Disposition: attachment;filename="'.$projektname.'.xlsx"');
|
||||
header('Cache-Control: max-age=0');
|
||||
// If you're serving to IE 9, then the following may be needed
|
||||
header('Cache-Control: max-age=1');
|
||||
|
||||
// If you're serving to IE over SSL, then the following may be needed
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
|
||||
header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
|
||||
header('Pragma: public'); // HTTP/1.0
|
||||
|
||||
// Xls
|
||||
$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
|
||||
$writer->save('php://output');
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
|
||||
class Inhaltsverzeichnis
|
||||
{
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param mixed $_platzhalter
|
||||
* @param mixed $_gutachter
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function create($value, $_platzhalter)
|
||||
{
|
||||
$html .= '<div class="header">INHALTSVERZEICHNIS</div>';
|
||||
|
||||
$tmp = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$_inhalt = explode('<br />', $tmp);
|
||||
|
||||
$table = '<table class="inhalt">';
|
||||
foreach ($_inhalt as $key => $value) {
|
||||
|
||||
$_row = explode('|', $value);
|
||||
$table .= Helper::table_row($_row, 0, 0);
|
||||
}
|
||||
$table .= '</table>';
|
||||
$html .= $table;
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads\Nutzflaeche;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\ObjektProjektByMethode;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
use HermannTelser\Gutachten\Downloads\PdfNutzflaeche;
|
||||
|
||||
class NutzflaecheZusammenstellung
|
||||
{
|
||||
/**
|
||||
* @param mixed $_projekt
|
||||
* @param mixed DbFunction::$projektid
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function load($_projekt) :string
|
||||
{
|
||||
// ZUSAMMENSTELLUNG
|
||||
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
$_objekte_all = ObjektProjektByMethode::select(1);
|
||||
|
||||
$summeNW = DbFunction::sum('tx_gutachten_raume_basis', 'GNO', ['pid' => DbFunction::$projektid]);
|
||||
|
||||
// print_r($_objekte_all);
|
||||
// exit;
|
||||
|
||||
$countProzent = [];
|
||||
$countNW = [];
|
||||
|
||||
// $html = '<table class="pure-table nutzwert" style="page-break-inside:avoid;">';
|
||||
$html = '<table class="pure-table pure-table-striped nutzwert-neu">';
|
||||
$html .= '<thead><tr class="header-row">';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Top</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Geschoß</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Orientierung</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Typ</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">NW</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">x2 *</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">%</th>';
|
||||
$html .= '</tr></thead>';
|
||||
|
||||
// $html .= Helper::table_header_row(explode('|', 'Top|Geschoß|Orientierung|Typ|NW|x2*|%'));
|
||||
|
||||
foreach ($_objekte_all as $key => $row) {
|
||||
if ($summeNW > 0) {
|
||||
$row['GNO2'] = $row['GNO'] * 2 .' / '.$summeNW * 2 .' tel Anteil =';
|
||||
$tmp = ($row['GNO'] * 2) / ($summeNW * 2) * 100;
|
||||
$row['prozent'] = Helper::number_format_de($tmp, 3).'%';
|
||||
} else {
|
||||
$row['GNO2'] = '';
|
||||
$row['prozent'] = '';
|
||||
}
|
||||
$countProzent[] = $tmp;
|
||||
$countNW[] = $row['GNO'];
|
||||
|
||||
$row['geschoss'] = PdfNutzflaeche::$_objekte_geschosse[$row['id']];
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['topNr'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['geschoss'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['orientierung'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['typ'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" class="right">'.$row['GNO'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb; text-align:center;">'.$row['GNO2'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['prozent'].'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
$_objekte_all = ObjektProjektByMethode::select([5, 9]);
|
||||
|
||||
foreach ($_objekte_all as $key => $row) {
|
||||
$row['GNO2'] = $row['GNO'] * 2 .' / '.$summeNW * 2 .' tel Anteil =';
|
||||
|
||||
$tmp = ($row['GNO'] * 2) / ($summeNW * 2) * 100;
|
||||
$row['prozent'] = Helper::number_format_de($tmp, 3).'%';
|
||||
$countProzent[] = $tmp;
|
||||
$countNW[] = $row['GNO'];
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['topNr'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['geschoss'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['orientierung'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['typ'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" class="right">'.$row['GNO'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb; text-align:center;">'.$row['GNO2'].'</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$row['prozent'].'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
$str = '||||'.array_sum($countNW).'|'.$summeNW * 2 .' / '.$summeNW * 2 .' tel Anteil =|'.round(array_sum($countProzent)).'%';
|
||||
$html .= Helper::table_row_abschluss(explode('|', $str));
|
||||
$html .= '</table>';
|
||||
|
||||
$html .= '<p class="size07">* Die Anteile wurden verdoppelt, sodaß die Mindestanteile jederzeit durch zwei geteilt werden können.</p>';
|
||||
|
||||
// $_gutachter = DbFunction::select(
|
||||
// 'tx_gutachten_gutachter',
|
||||
// '*',
|
||||
// ['id' => $_projekt[0]['gutachter_id']]
|
||||
// );
|
||||
|
||||
// $html .= '<br><br><br><br><br><br><br><table class="nutzwert-neu">';
|
||||
// $html .= '<tr>';
|
||||
// $html .= '<td>'.$_projekt[0]['erstellung'].'</td>';
|
||||
// if (!\count($_gutachter)) {
|
||||
// $html .= '<td class="right">Gutacher Fehlt</td>';
|
||||
// } else {
|
||||
// $html .= '<td class="right">'.$_gutachter[0]['kopf'].'</td>';
|
||||
// }
|
||||
// $html .= '</tr>';
|
||||
// $html .= '</table>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads\Nutzflaeche;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\Select;
|
||||
use HermannTelser\Gutachten\Downloads\PdfNutzflaeche;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
|
||||
class NutzwertberechnungM1M4
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function berechnen()
|
||||
{
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
// OBSOLET
|
||||
// $_raum['NWm2'];
|
||||
|
||||
$exception = 364106;
|
||||
|
||||
|
||||
$join = [];
|
||||
$join['[>]tx_gutachten_orientierung']['tx_gutachten_raume_basis.tt_orientierung_id'] = 'id';
|
||||
|
||||
$fields = [];
|
||||
$fields[] = 'tx_gutachten_raume_basis.id';
|
||||
$fields[] = 'tx_gutachten_raume_basis.uid';
|
||||
$fields[] = 'tx_gutachten_raume_basis.topNr';
|
||||
$fields[] = 'tx_gutachten_raume_basis.typ';
|
||||
$fields[] = 'tx_gutachten_raume_basis.factor';
|
||||
$fields[] = 'tx_gutachten_raume_basis.GNO';
|
||||
$fields[] = 'tx_gutachten_raume_basis.qmM1';
|
||||
$fields[] = 'tx_gutachten_raume_basis.qmM1uM2bis';
|
||||
$fields[] = 'tx_gutachten_raume_basis.qmM1uM2';
|
||||
$fields[] = 'tx_gutachten_raume_basis.NWM1uM2';
|
||||
$fields[] = 'tx_gutachten_raume_basis.summe_az';
|
||||
$fields[] = 'tx_gutachten_raume_basis.bewertung';
|
||||
$fields[] = 'tx_gutachten_orientierung.orientierung';
|
||||
foreach (range('a', 'u') as $key => $feld) {
|
||||
$fields[] = 'tx_gutachten_raume_basis.'.$feld;
|
||||
}
|
||||
$where = [];
|
||||
$where['AND']['tx_gutachten_raume_basis.noDispInOrientierung'] = 0;
|
||||
$where['AND']['tx_gutachten_raume_basis.pid'] = DbFunction::$projektid;
|
||||
$where['ORDER']['tx_gutachten_raume_basis.topNr'] = 'ASC';
|
||||
// $where['LIMIT'] = 2;
|
||||
$_raeume_alle = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_basis',
|
||||
$join,
|
||||
$fields,
|
||||
$where
|
||||
);
|
||||
|
||||
// $part1 = [];
|
||||
// $part2 = [];
|
||||
// foreach ($_raeume_alle as $key => $_raum) {
|
||||
// if ('' != $_raum['typ']) {
|
||||
// $part1[] = $_raum;
|
||||
// } else {
|
||||
// $part2[] = $_raum;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// $topNr = array_column($part1, 'topNr');
|
||||
// array_multisort($topNr, SORT_ASC, $part1);
|
||||
//
|
||||
// $topNr = array_column($part2, 'topNr');
|
||||
// array_multisort($topNr, SORT_ASC, $part2);
|
||||
//
|
||||
// $_raeume_alle = array_merge($part1, $part2);
|
||||
|
||||
$html = '';
|
||||
foreach ($_raeume_alle as $key => $_objekte) {
|
||||
$tt_raume_basis_id = $_objekte['id'];
|
||||
|
||||
$_raume_m1 = Select::raume_all(DbFunction::$projektid, $tt_raume_basis_id, [1]);
|
||||
$_raume_m2 = Select::raume_all(DbFunction::$projektid, $tt_raume_basis_id, [2, 8]);
|
||||
$_raume_m3 = Select::raume_all(DbFunction::$projektid, $tt_raume_basis_id, [3, 7], $exception);
|
||||
|
||||
$pagebrake = \count($_raume_m1) + \count($_raume_m2) + \count($_raume_m3);
|
||||
|
||||
// Header
|
||||
if ($pagebrake > 45) {
|
||||
$html .= '<table class="pure-table nutzwert-neu">';
|
||||
} else {
|
||||
$html .= '<table class="pure-table nutzwert-neu" style="page-break-inside:avoid;">';
|
||||
}
|
||||
$html .= '<tr class="header-row">';
|
||||
$html .= '<td>Top Nr.</td>';
|
||||
$html .= '<td>Geschoß</td>';
|
||||
$html .= '<td>Orientierung</td>';
|
||||
$html .= '<td>Typ</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="right">qm</td>';
|
||||
$html .= '<td colspan="6"></td>';
|
||||
$html .= '<td>NW</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
// if($tt_raume_basis_id == 86321){
|
||||
// print_r($_objekte);
|
||||
// exit;
|
||||
// }
|
||||
|
||||
// METHODE 1
|
||||
foreach ($_raume_m1 as $key => $_raum) {
|
||||
if ($key > 0) {
|
||||
$_objekte['topNr'] = '';
|
||||
$_raum['geschoss'] = '';
|
||||
$_objekte['orientierung'] = '';
|
||||
$_objekte['typ'] = '';
|
||||
} else {
|
||||
$_raum['geschoss'] = PdfNutzflaeche::$_objekte_geschosse[$tt_raume_basis_id];
|
||||
}
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first">'.$_objekte['topNr'].'</td>';
|
||||
$html .= '<td>'.$_raum['geschoss'].'</td>';
|
||||
$html .= '<td>'.$_objekte['orientierung'].'</td>';
|
||||
$html .= '<td>'.$_objekte['typ'].'</td>';
|
||||
$html .= '<td>'.$_raum['raum'].'</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['qm'], 2).'</td>';
|
||||
$html .= '<td colspan="7"></td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
$NutzwertSummeGerundet = 0;
|
||||
|
||||
// METHODE 2 + 2b
|
||||
if (\count($_raume_m2) > 0) {
|
||||
// Methode 2 summen
|
||||
|
||||
// if($_objekte['id'] == 84964){
|
||||
// print_r($_objekte);
|
||||
// print_r($_raume_m2);
|
||||
// exit;
|
||||
// }
|
||||
|
||||
|
||||
$nw = $_objekte['qmM1'] * $_objekte['factor'];
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_objekte['qmM1'], 2).'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_objekte['factor'], 3).'</td>';
|
||||
$html .= '<td>=</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($nw, 3).'</td>';
|
||||
$html .= '<td class="right">'.round($nw).'</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
$factorSumme = 0;
|
||||
// $zunutzwert = 0;
|
||||
foreach ($_raume_m2 as $key => $_raum) {
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td>'.$_raum['raum'].'</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['qm'], 2).'</td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['factor'], 3).'</td>';
|
||||
|
||||
if (2 == $_raum['tt_raumart_id']) {
|
||||
// Methode 2 (2)
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td>'.Helper::number_format_de($_objekte['factor'], 3).'</td>';
|
||||
$html .= '<td>=</td>';
|
||||
$factorSumme = $_raum['qm'] * $_raum['factor'] * $_objekte['factor'];
|
||||
$nw += $factorSumme;
|
||||
$html .= '<td class="right">'.Helper::number_format_de($factorSumme, 3).'</td>';
|
||||
} else {
|
||||
// Methode 2b (8) )
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td>=</td>';
|
||||
$factorSumme = $_raum['qm'] * $_raum['factor'];
|
||||
$nw += $factorSumme;
|
||||
$html .= '<td class="right">'.Helper::number_format_de($factorSumme, 3).'</td>';
|
||||
}
|
||||
$html .= '<td></td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
$ungerundet = $nw;
|
||||
|
||||
$NutzwertSummeGerundet = round($ungerundet);
|
||||
|
||||
// if ($zunutzwert) {
|
||||
// $zunutzwert = $zunutzwert + $_objekte['qmM1'];
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
// $html .= '<td>Gesamtnutzfläche</td>';
|
||||
// $html .= '<td class="right">'.Helper::number_format_de($zunutzwert, 2).'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($ungerundet, 3).'</td>';
|
||||
$html .= '<td class="right">'.$NutzwertSummeGerundet.'</td>';
|
||||
$html .= '</tr>';
|
||||
} else {
|
||||
// UNGERUNDETE CALCULATION
|
||||
$ungerundet = $_objekte['qmM1'] * $_objekte['factor'];
|
||||
$NutzwertSummeGerundet = round($ungerundet);
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_objekte['qmM1'], 2).'</td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_objekte['factor'], 3).'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="center">=</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($ungerundet, 3).'</td>';
|
||||
$html .= '<td class="right">'.$NutzwertSummeGerundet.'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
METHODE 3 + 3b
|
||||
(wie Methode 3 aber ohne Wohnungsfactor)
|
||||
********************************************************/
|
||||
foreach ($_raume_m3 as $key => $_raum) {
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td>'.$_raum['geschoss'].'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td>'.$_raum['raum'].'</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['qm'], 2).'</td>';
|
||||
|
||||
|
||||
if (3 == $_raum['tt_raumart_id']) { //Methode 3
|
||||
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td>'.Helper::number_format_de($_objekte['factor'], 3).'</td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['factor'], 3).'</td>';
|
||||
$html .= '<td class="center">=</td>';
|
||||
|
||||
// $nw = $_raum['qm'] * $_raum['factor'] * $_objekte['factor'];
|
||||
$nw = $_raum['qm'] * $_raum['factor'] * $_objekte['factor'];
|
||||
$html .= '<td class="right">'.Helper::number_format_de($nw, 3).'</td>';
|
||||
$nw_gerundet = round($nw) < 1 ? 1 : round($nw);
|
||||
} else { //Methode 3b
|
||||
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['factor'], 3).'</td>';
|
||||
$html .= '<td class="center">=</td>';
|
||||
|
||||
$nw = $_raum['qm'] * $_raum['factor'];
|
||||
// $nw = $_raum['qm'] * $_raum['factor'];
|
||||
$html .= '<td class="right">'.Helper::number_format_de($nw, 3).'</td>';
|
||||
$nw_gerundet = round($nw) < 1 ? 1 : round($nw);
|
||||
}
|
||||
$html .= '<td class="right">'.round($nw_gerundet).'</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
$NutzwertSummeGerundet += $nw_gerundet;
|
||||
|
||||
// $html .= Helper::table_row(explode('|', $str));
|
||||
}
|
||||
|
||||
// METHODE 4
|
||||
$_raume = Select::raume_all(DbFunction::$projektid, $tt_raume_basis_id, 4, 0, $exception);
|
||||
|
||||
// if($tt_raume_basis_id == 82909){
|
||||
// print_r($_raume);
|
||||
// exit;
|
||||
// }
|
||||
|
||||
foreach ($_raume as $key => $_raum) {
|
||||
$nw = $_raum['qm'] * $_raum['factor'];
|
||||
$nw_gerundet = round($nw) < 1 ? 1 : round($nw);
|
||||
$NutzwertSummeGerundet += $nw_gerundet;
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first"></td>';
|
||||
$html .= '<td>'.$_raum['geschoss'].'</td>';
|
||||
$html .= '<td></td>';
|
||||
if($_raum['tt_raumart_id'] == 4){
|
||||
$html .= '<td>Zubehör</td>';
|
||||
}
|
||||
else{
|
||||
// exception type methode 7 and 4 anhängen, ist kein Zubehör
|
||||
$html .= '<td>*</td>';
|
||||
}
|
||||
|
||||
$html .= '<td>'.$_raum['raum'].'</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['qm'], 2).'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($_raum['factor'], 3).'</td>';
|
||||
$html .= '<td class="center">=</td>';
|
||||
$html .= '<td class="right">'.Helper::number_format_de($nw, 3).'</td>';
|
||||
$html .= '<td class="right">'.round($nw_gerundet).'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// Nutzwert gerundet
|
||||
$html .= '<tr class="header-row">';
|
||||
$html .= '<td class="abschluss-first right" colspan="12">Nutzwert gerundet</td>';
|
||||
$html .= '<td class="abschluss right">'.$NutzwertSummeGerundet.'</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
$html .= '</table>';
|
||||
|
||||
DbFunction::secureUpdate('tx_gutachten_raume_basis', ['GNO' => $NutzwertSummeGerundet], ['id' => $_objekte['id']]);
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads\Nutzflaeche;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\Select;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
|
||||
class NutzwertBerechnungM5
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function berechnen()
|
||||
{
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
$res = DbFunction::select('tx_gutachten_orientierung', ['id', 'orientierung'], ['ORDER' => 'sortierung']);
|
||||
$map = [];
|
||||
foreach ($res as $field => $value) {
|
||||
$map[$value['id']] = $value['orientierung'];
|
||||
}
|
||||
|
||||
// $basis_stellplaetze = DbFunction::select('tx_gutachten_raume_all', 'tt_raume_basis_id', ['pid' => $projektid, 'raum' => ['Stellplatz+', 'Stellplatz']]);
|
||||
$_objekte_all = DbFunction::select('tx_gutachten_raume_basis', '*', ['pid' => DbFunction::$projektid, 'noDispInOrientierung' => 1, 'ORDER' => 'topNr']);
|
||||
foreach ($_objekte_all as $key => $value) {
|
||||
$_objekte_all[$key]['orientierung'] = $map[$value['tt_orientierung_id']];
|
||||
}
|
||||
|
||||
foreach ($_objekte_all as $key => $value) {
|
||||
$_objekte_all[$key]['id'] = (int) $value['id'];
|
||||
$_objekte_all[$key]['pid'] = (int) $value['pid'];
|
||||
$_objekte_all[$key]['uid'] = (int) $value['uid'];
|
||||
$_objekte_all[$key]['GNO'] = (int) $value['GNO'];
|
||||
$_objekte_all[$key]['tt_orientierung_id'] = (int) $value['tt_orientierung_id'];
|
||||
$_objekte_all[$key]['noDispInOrientierung'] = (int) $value['noDispInOrientierung'];
|
||||
}
|
||||
// print_r($_objekte_all);
|
||||
// exit;
|
||||
$html = '';
|
||||
foreach ($_objekte_all as $key => $_objekte) {
|
||||
$tt_raume_basis_id = $_objekte['id'];
|
||||
|
||||
// Notizen
|
||||
// if ($value['notizen']!="") {
|
||||
// $str = "|".$v['notizen'];
|
||||
// $pdf->nwbTabelle($str, "13|13|120", 7);
|
||||
// }
|
||||
|
||||
//if methode 5+ Zubehöhr in liste schreiben
|
||||
|
||||
$_raume = DbFunction::select('tx_gutachten_raume_all', '*',
|
||||
[
|
||||
'AND' => [
|
||||
'tt_raume_basis_id' => $tt_raume_basis_id,
|
||||
'tt_raumart_id' => [5, 6, 9]
|
||||
],
|
||||
'ORDER' => ['tt_raumart_id' => 'ASC']
|
||||
]);
|
||||
|
||||
// if(86917 == $tt_raume_basis_id){
|
||||
// print_r($_objekte);
|
||||
// print_r($_raume);
|
||||
// exit;
|
||||
// }
|
||||
|
||||
if (\count($_raume) > 0) {
|
||||
$html .= '<table class="pure-table nutzwert-neu" style="page-break-inside:avoid;">';
|
||||
$html .= '<tr class="header-row">';
|
||||
$html .= '<td style="border-left: 1px solid #cbcbcb;">Top Nr.</td>';
|
||||
$html .= '<td>Geschoß</td>';
|
||||
$html .= '<td>Orientierung</td>';
|
||||
$html .= '<td>Typ</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '<td>qm</td>';
|
||||
$html .= '<td colspan="4"></td>';
|
||||
$html .= '<td class="center">NW</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
$zubehoer = 6 == $_raume[0]['tt_raumart_id'] ? 'Zubehör' : $_objekte['typ'];
|
||||
|
||||
// Methode 5
|
||||
foreach ($_raume as $key => $value) {
|
||||
if ($key > 0) {
|
||||
$_objekte['topNr'] = '';
|
||||
$value['geschoss'] = '';
|
||||
$_objekte['orientierung'] = '';
|
||||
$_objekte['typ'] = '';
|
||||
}
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="first">'.$_objekte['topNr'].'</td>';
|
||||
$html .= '<td>'.$value['geschoss'].'</td>';
|
||||
$html .= '<td>'.$_objekte['orientierung'].'</td>';
|
||||
$html .= '<td>'.$zubehoer.'</td>';
|
||||
$html .= '<td>'.$value['raum'].'</td>';
|
||||
$html .= '<td class="center">'.Helper::number_format_de($value['qm'], 2).'</td>';
|
||||
$html .= '<td class="center">x</td>';
|
||||
$html .= '<td class="center">'.Helper::number_format_de($value['factor'], 3).'</td>';
|
||||
$html .= '<td class="center">=</td>';
|
||||
|
||||
$tmp = $value['qm'] * $value['factor'];
|
||||
|
||||
$html .= '<td class="center">'.Helper::number_format_de($tmp, 3).'</td>';
|
||||
|
||||
if (9 == $value['tt_raumart_id']) {
|
||||
$html .= '<td class="center">'.round($value['NWungerundet']).'</td>';
|
||||
} else {
|
||||
$html .= '<td class="center">'.$value['NW'].'</td>';
|
||||
}
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
$html .= '<tr class="header-row">';
|
||||
$html .= '<td class="abschluss-first" colspan="10">Nutzwert gerundet</td>';
|
||||
$html .= '<td class="abschluss center">'.$_objekte['GNO'].'</td>';
|
||||
$html .= '</tr>';
|
||||
$html .= '</table>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads\Nutzflaeche;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
|
||||
class ObjectAufGeschossen
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
$_arr = DbFunction::select(
|
||||
'tx_gutachten_raume_all',
|
||||
['tt_raume_basis_id', 'geschoss'],
|
||||
[
|
||||
'AND' => ['pid' => DbFunction::$projektid, 'tt_raumart_id[!]' => 4],
|
||||
'GROUP' => ['tt_raume_basis_id', 'geschoss'],
|
||||
]
|
||||
);
|
||||
|
||||
$_objekte_geschosse = [];
|
||||
foreach ($_arr as $key => $value) {
|
||||
$basisid = $value['tt_raume_basis_id'];
|
||||
$geschoss = $value['geschoss'];
|
||||
$_objekte_geschosse[$basisid][] = $geschoss;
|
||||
}
|
||||
|
||||
foreach ($_objekte_geschosse as $key => $value) {
|
||||
$_objekte_geschosse[$key] = implode(',', $value);
|
||||
}
|
||||
|
||||
return $_objekte_geschosse;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads\Nutzflaeche;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\Downloads\PdfNutzflaeche;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
|
||||
class TabelleZuAbschlaege
|
||||
{
|
||||
/**
|
||||
* @param mixed $_projekt
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function load($_projekt)
|
||||
{
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
$projektid = $_projekt[0]['id'];
|
||||
|
||||
$header_row = ['Top', 'Geschoß', 'Typ', 'Nutzfläche'];
|
||||
$header_row[] = 0 != $_projekt[0]['loggia_title'] ? $_projekt[0]['loggia_title'] : 'Loggia / sonst. Zusatzflächen';
|
||||
$header_row[] = 'Gesamtnutzfläche';
|
||||
|
||||
$_column_titel = DbFunction::select(
|
||||
'tx_gutachten_help',
|
||||
['colid', 'coltitel'],
|
||||
['pid' => $projektid]
|
||||
);
|
||||
foreach ($_column_titel as $key => $value) {
|
||||
$header_row[] = $value['coltitel'];
|
||||
}
|
||||
$header_row[] = 'Summe A-Z';
|
||||
$header_row[] = 'Wohnungsbewertung';
|
||||
$html = Helper::table_header_row_r($header_row);
|
||||
|
||||
$_fields = [
|
||||
'tx_gutachten_raume_basis.id',
|
||||
'tx_gutachten_raume_basis.topNr',
|
||||
'tx_gutachten_raume_all.geschoss',
|
||||
'tx_gutachten_raume_basis.typ',
|
||||
'tx_gutachten_raume_basis.u(nutzflaeche)',
|
||||
'tx_gutachten_raume_basis.u(loggia)',
|
||||
'tx_gutachten_raume_basis.u(gesammtnutzflaeche)',
|
||||
];
|
||||
foreach ($_column_titel as $key => $value) {
|
||||
$_fields[] = 'tx_gutachten_raume_basis.'.$value['colid'];
|
||||
}
|
||||
$_fields[] = 'tx_gutachten_raume_basis.summe_az';
|
||||
$_fields[] = 'tx_gutachten_raume_basis.bewertung';
|
||||
|
||||
$_where = [];
|
||||
$_where['AND']['tx_gutachten_raume_basis.pid'] = $projektid;
|
||||
$_where['AND']['tx_gutachten_raume_basis.noDispInOrientierung'] = 0;
|
||||
$_where['AND']['tx_gutachten_raume_all.tt_raumart_id'] = 1;
|
||||
// $_where['AND']['tx_gutachten_raume_basis.typ[!]'] = '';
|
||||
$_where['GROUP'] = 'tx_gutachten_raume_basis.id';
|
||||
$_where['ORDER']['tx_gutachten_raume_basis.topNr'] = 'ASC';
|
||||
|
||||
$_raeume = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_basis',
|
||||
['[>]tx_gutachten_raume_all' => ['tx_gutachten_raume_basis.id' => 'tt_raume_basis_id']],
|
||||
$_fields,
|
||||
$_where
|
||||
);
|
||||
|
||||
|
||||
|
||||
// $part1 = [];
|
||||
// $part2 = [];
|
||||
// foreach ($_raeume as $key => $value) {
|
||||
// if($value['typ'] != '')
|
||||
// {
|
||||
// $part1[] = $value;
|
||||
//
|
||||
// }
|
||||
// else {
|
||||
// $part2[] = $value;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// $topNr = array_column($part1, 'topNr');
|
||||
// array_multisort($topNr, SORT_ASC, $part1);
|
||||
//
|
||||
// $topNr = array_column($part2, 'topNr');
|
||||
// array_multisort($topNr, SORT_ASC, $part2);
|
||||
|
||||
// $_raeume = array_merge($part1, $part2);
|
||||
|
||||
$summe_nutzfache = 0;
|
||||
$summe_loggien = 0;
|
||||
|
||||
foreach ($_raeume as $key => $value) {
|
||||
unset($_raeume[$key]['id']);
|
||||
|
||||
$tt_raume_basis_id = $value['id'];
|
||||
|
||||
$nutzflaeche = DbFunction::sum('tx_gutachten_raume_all', 'qm', ['AND' => ['tt_raumart_id' => 1, 'tt_raume_basis_id' => $tt_raume_basis_id]]);
|
||||
|
||||
$summe_nutzfache += $nutzflaeche;
|
||||
|
||||
$_raeume[$key]['nutzflaeche'] = Helper::number_format_de($nutzflaeche, 2);
|
||||
|
||||
$res = DbFunction::selectJoin(
|
||||
'tx_gutachten_raume_all',
|
||||
['[>]tx_gutachten_raume_generell' => 'tt_raumart_id'],
|
||||
'tx_gutachten_raume_all.qm',
|
||||
[
|
||||
'AND' => [
|
||||
'tx_gutachten_raume_all.pid' => $projektid,
|
||||
'tx_gutachten_raume_all.tt_raume_basis_id' => $tt_raume_basis_id,
|
||||
'tx_gutachten_raume_all.tt_raumart_id' => [2, 8],
|
||||
'tx_gutachten_raume_generell.zunutzwert' => 1,
|
||||
],
|
||||
'GROUP' => 'tx_gutachten_raume_all.id',
|
||||
]
|
||||
);
|
||||
$loggia = array_sum($res);
|
||||
$summe_loggien += $loggia;
|
||||
$_raeume[$key]['tt_raume_basis_id'] = $tt_raume_basis_id;
|
||||
$_raeume[$key]['loggia'] = round($loggia, 2);
|
||||
$sum = round($nutzflaeche + $loggia, 2);
|
||||
$_raeume[$key]['gesammtnutzflaeche'] = Helper::number_format_de($sum, 2);
|
||||
}
|
||||
|
||||
$_columns = range('a', 'u');
|
||||
$_columns[] = 'loggia';
|
||||
$_raeume = Helper::zero_to_null($_raeume, $_columns);
|
||||
|
||||
// print_r(PdfNutzflaeche::$_objekte_geschosse);
|
||||
//
|
||||
foreach ($_raeume as $key => $_row) {
|
||||
$basisid = $_row['tt_raume_basis_id'];
|
||||
|
||||
if (isset(PdfNutzflaeche::$_objekte_geschosse[$basisid])) {
|
||||
$_row['geschoss'] = PdfNutzflaeche::$_objekte_geschosse[$basisid];
|
||||
}
|
||||
unset($_row['tt_raume_basis_id']);
|
||||
|
||||
$html .= '<tr>';
|
||||
$i = 1;
|
||||
foreach ($_row as $key => $value) {
|
||||
if (is_numeric($value)) {
|
||||
$value = Helper::number_format_de($value, 2);
|
||||
}
|
||||
if ($i > 3) {
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" class="right">'.$value.'</td>';
|
||||
} else {
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;">'.$value.'</td>';
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// SUMMEN
|
||||
$html .= '<tr>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" colspan="3">Summen</td>';
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" class="right">'.Helper::number_format_de($summe_nutzfache, 2).'</td>';
|
||||
if($summe_loggien){
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;" class="right">'.Helper::number_format_de($summe_loggien, 2).'</td>';
|
||||
}else {
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb;"> </td>';
|
||||
}
|
||||
$sum_total = $summe_nutzfache + $summe_loggien;
|
||||
$html .= '<td style="border-bottom: 0.1mm solid #cbcbcb; border-right: 0.1mm solid #cbcbcb;" class="right">'.Helper::number_format_de($sum_total, 2).'</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
use HermannTelser\Gutachten\Berechnungen\Berechnung;
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\Downloads\Nutzflaeche\NutzflaecheZusammenstellung;
|
||||
use HermannTelser\Gutachten\Downloads\Nutzflaeche\NutzwertBerechnungM1M4;
|
||||
use HermannTelser\Gutachten\Downloads\Nutzflaeche\NutzwertBerechnungM5;
|
||||
use HermannTelser\Gutachten\Downloads\Nutzflaeche\TabelleZuAbschlaege;
|
||||
use HermannTelser\Gutachten\Downloads\Nutzflaeche\ObjectAufGeschossen;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
// Mpdf installed by typo3 extension
|
||||
use Mpdf;
|
||||
|
||||
class PdfNutzflaeche
|
||||
{
|
||||
public static $projektname = '';
|
||||
public static $_platzhalter = [];
|
||||
public static $_projekt = [];
|
||||
public static $_objekte_geschosse = [];
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function download()
|
||||
{
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
Berechnung::berechnen();
|
||||
|
||||
self::$_objekte_geschosse = ObjectAufGeschossen::load();
|
||||
|
||||
ob_clean(); // set to remove wrong headers which crashed some files (e.g. xls, dot, ...)
|
||||
|
||||
if (!isset(DbFunction::$projektid) or 0 == DbFunction::$projektid) {
|
||||
die('aktive projekt ID fehlt!');
|
||||
}
|
||||
|
||||
$_projekt = DbFunction::select(
|
||||
'tx_gutachten_projekte',
|
||||
['id', 'auftraggeber_id', 'gutachter_id', 'intname', 'name', 'beschreibung', 'erstellung', 'onoff', 'upload', 'allgemeinupload', 'recalculate', 'zuabTitel', 'nwbTitel', 'zustTitel', 'allgemTitel', 'loggia_title', 'nwbStartSeite', 'm1pP', 'm5pP', 'timestamp', 'status', 'erstelldatum'],
|
||||
['id' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
|
||||
$zuabTitel = ('' == $_projekt[0]['zuabTitel'] or 'fehlt!' == $_projekt[0]['zuabTitel']) ? '3.21 ZU UND ABSCHLAEGE' : $_projekt[0]['zuabTitel'];
|
||||
$nwbTitel = ('' == $_projekt[0]['nwbTitel'] or 'fehlt!' == $_projekt[0]['nwbTitel']) ? '3.30 NUTZWERTBERECHNUNG' : $_projekt[0]['nwbTitel'];
|
||||
$zustTitel = ('' == $_projekt[0]['zustTitel'] or 'fehlt!' == $_projekt[0]['zustTitel']) ? '3.40 ZUSAMMENSTELLUNG' : $_projekt[0]['zustTitel'];
|
||||
$allgemTitel = ('' == $_projekt[0]['allgemTitel'] or 'fehlt!' == $_projekt[0]['allgemTitel']) ? '3.40 ZUSAMMENSTELLUNG' : $_projekt[0]['allgemTitel'];
|
||||
|
||||
$_platzhalter = DbFunction::select(
|
||||
'tx_gutachten_projekteplatzhalter',
|
||||
['code', 'txt'],
|
||||
['pid' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
$_projektestandards = DbFunction::select(
|
||||
'tx_gutachten_projektestandards',
|
||||
['pos', 'neueseite', 'kennung', 'titel', 'txt', 'platzhalter', 'textart_id'],
|
||||
['pid' => DbFunction::$projektid, 'ORDER' => 'pos']
|
||||
);
|
||||
|
||||
foreach ($_projektestandards as $key => $value) {
|
||||
if (4 == $value['textart_id']) {
|
||||
$title = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$title = explode('<br />', $title);
|
||||
$projektname = $title[0];
|
||||
}
|
||||
}
|
||||
// $title = DbFunction::get('tx_gutachten_projektestandards', 'txt', ['AND' => ['textart_id' => 4, 'pid' => $projektid]]);
|
||||
// $title = Helper::replacePlatzhalter($_platzhalter, $title);
|
||||
|
||||
$mpdf = new \Mpdf\Mpdf([
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 10,
|
||||
'margin_right' => 10,
|
||||
'margin_top' => 22,
|
||||
'margin_bottom' => 20,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
]);
|
||||
$mpdf->shrink_tables_to_fit = 1;
|
||||
|
||||
$stylesheet = file_get_contents(__DIR__.'/style.css');
|
||||
$mpdf->WriteHTML($stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS);
|
||||
|
||||
// 1 Tabelle Zu und Abschläge
|
||||
$mpdf->AddPage('', '', $_projekt[0]['nwbStartSeite']);
|
||||
// $footer = Helper::footer($projektname);
|
||||
$mpdf->SetHTMLFooter('<div class="size07 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$zuabTitel.'</div>';
|
||||
$html .= '<table class="pure-table pure-table-striped nutzwert-neu">';
|
||||
$html .= TabelleZuAbschlaege::load($_projekt);
|
||||
$html .= '</table>';
|
||||
$mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
// // 2 NUTZWERTBERECHNUNG M1 - M4
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size07 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$nwbTitel.'</div>';
|
||||
$html .= NutzwertBerechnungM1M4::berechnen();
|
||||
$mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
// 3 NUTZWERTBERECHNUNG M5
|
||||
$html = NutzwertBerechnungM5::berechnen();
|
||||
$mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
// 4 ZUSAMMENSTELLUNG
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size07 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$zustTitel.'</div>';
|
||||
$html .= NutzflaecheZusammenstellung::load($_projekt);
|
||||
|
||||
// 5 DIGITALE SIGNATUR
|
||||
$image = Environment::getProjectPath()."/public/typo3conf/ext/gutachten/Resources/Public/Images/avf_stempel.png";
|
||||
$html .= '<div style="height: 150mm; padding: 0; page-break-inside: avoid;">';
|
||||
$html .= '<div class="header">3.41 Digitale Signatur</div>';
|
||||
$html .= '<table style="width:194mm; margin-top:80mm;"><tr>';
|
||||
$html .= '<td style="vertical-align:middle; text-align:right;">'.$_projekt[0]['erstellung'].'</td>';
|
||||
$html .= '<td style="text-align:right;"><img src="'.$image.'" style="width:36mm; height:36mm"></td>';
|
||||
$html .= '</tr></table>';
|
||||
$html .= '</div>';
|
||||
$mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
// 6 ALLGEMEINTABELLE
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size07 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$allgemTitel.'</div>';
|
||||
$html .= AllgemeinTabelle::load();
|
||||
$mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
// finale
|
||||
$mpdf->Output('Nutzflächen.pdf', Mpdf\Output\Destination::INLINE);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\Paragraph62;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
|
||||
use Mpdf;
|
||||
// Mpdf installed by typo3 extension
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class PdfParagraph6
|
||||
{
|
||||
public static $Mpdf;
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function download()
|
||||
{
|
||||
// ob_clean(); // set to remove wrong headers which crashed some files (e.g. xls, dot, ...)
|
||||
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
DbFunction::$projektid = GeneralUtility::_GP('projekt_aktive');
|
||||
|
||||
if (0 == DbFunction::$projektid or !is_numeric(DbFunction::$projektid)) {
|
||||
die('aktive projekt ID fehlt!');
|
||||
}
|
||||
|
||||
$_platzhalter = DbFunction::select(
|
||||
'tx_gutachten_projekteplatzhalter',
|
||||
['code', 'txt'],
|
||||
['pid' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
$_projekt = DbFunction::select(
|
||||
'tx_gutachten_projekte',
|
||||
['auftraggeber_id', 'gutachter_id', 'intname', 'name', 'beschreibung', 'erstellung', 'onoff', 'upload', 'allgemeinupload', 'recalculate', 'zuabTitel', 'nwbTitel', 'zustTitel', 'allgemTitel', 'loggia_title', 'nwbStartSeite', 'm1pP', 'm5pP', 'timestamp', 'status', 'erstelldatum'],
|
||||
['id' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
$_auftraggeber = DbFunction::select(
|
||||
'tx_gutachten_auftraggeber',
|
||||
'*',
|
||||
['id' => $_projekt[0]['auftraggeber_id']]
|
||||
);
|
||||
|
||||
$_gutachter = DbFunction::select(
|
||||
'tx_gutachten_gutachter',
|
||||
'*',
|
||||
['id' => $_projekt[0]['gutachter_id']]
|
||||
);
|
||||
|
||||
|
||||
// print_r($_projekt);
|
||||
// print_r($_auftraggeber);
|
||||
// print_r($_gutachter);
|
||||
// exit;
|
||||
|
||||
self::$Mpdf = new \Mpdf\Mpdf([
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 10,
|
||||
'margin_right' => 10,
|
||||
'margin_top' => 10,
|
||||
'margin_bottom' => 10,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
]);
|
||||
|
||||
$stylesheet = file_get_contents(__DIR__.'/style.css');
|
||||
|
||||
self::$Mpdf->WriteHTML($stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS);
|
||||
// 1 tabelle
|
||||
// 2 inhaltsverzeichnis
|
||||
// 3 textblock
|
||||
// 4 deckblatt
|
||||
// 5 nur Überschrift
|
||||
// 6 auftraggeber
|
||||
// 7 tabelle § 6/2
|
||||
// 8 allgemeinflächen
|
||||
$_standards = DbFunction::select('tx_gutachten_projektestandards', '*', ['AND' => ['pid' => DbFunction::$projektid, 'kennung' => ['Deckblatt', '2.30 § 6 Teil 1', 'Tabelle § 6', '2.30 § 6 Teil 2']], 'ORDER' => 'pos']);
|
||||
|
||||
foreach ($_standards as $key => $value) {
|
||||
$textartid = (int)$value['textart_id'];
|
||||
switch ($textartid) {
|
||||
case '4':
|
||||
// DECKBLATT
|
||||
$value['paragraph6'] = 1;
|
||||
$html = Deckblatt::create($value, $_projekt, $_platzhalter, $_gutachter, $_auftraggeber);
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '3':
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPageByArray(['mgt' => 22, 'mgb' => 22, 'mgl' => 10, 'mgr' => 10]);
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
// if ('' != $value['titel']) {
|
||||
// $html = '<div class="header">'.$value['titel'].'</div>';
|
||||
// } elseif ('' != $value['kennung']) {
|
||||
// $html = '<div class="header">'.$value['kennung'].'</div>';
|
||||
// }
|
||||
$textblock = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$html = '<div class="textblock">' . $textblock . '</div>';
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '7':
|
||||
// 7 tabelle § 6/2
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
|
||||
$_paragraph_62 = Paragraph62::select(DbFunction::$projektid);
|
||||
|
||||
$html = '<table class="pure-table pure-table-striped nutzwert-neu center">';
|
||||
$html .= '<thead><tr class="header-row">';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Top</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Geschoß</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Orientierung</th>';
|
||||
$html .= '<th style="border-bottom: 0.1mm solid #cbcbcb;">Typ</th>';
|
||||
$html .= '</tr></thead>';
|
||||
|
||||
// $html = '<table class="pure-table pure-table-striped nutzwert-neu">';
|
||||
// $html .= Helper::table_header_row(['Top', 'Geschoß', 'Orientierung', 'Typ']);
|
||||
foreach ($_paragraph_62 as $key => $value) {
|
||||
$html .= Helper::table_row($value, 1);
|
||||
}
|
||||
$html .= '</table>';
|
||||
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 5 DIGITALE SIGNATUR
|
||||
$image = Environment::getProjectPath()."/public/typo3conf/ext/gutachten/Resources/Public/Images/avf_stempel.png";
|
||||
$html = '<div style="height: 150mm; padding: 0; page-break-inside: avoid;">';
|
||||
$html .= '<div class="header">Digitale Signatur</div>';
|
||||
$html .= '<table style="width:194mm; margin-top:80mm;"><tr>';
|
||||
$html .= '<td style="vertical-align:middle; text-align:right;">'.$_projekt[0]['erstellung'].'</td>';
|
||||
$html .= '<td style="text-align:right;"><img src="'.$image.'" style="width:36mm; height:36mm"></td>';
|
||||
$html .= '</tr></table>';
|
||||
$html .= '</div>';
|
||||
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
self::$Mpdf->Output('GutachtenParagraph6.pdf', Mpdf\Output\Destination::INLINE);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\DB\DbFunction;
|
||||
use HermannTelser\Gutachten\DB\Select\Paragraph62;
|
||||
use HermannTelser\Gutachten\DB\Select\Select;
|
||||
use HermannTelser\Gutachten\Utility\Helper;
|
||||
use HermannTelser\Gutachten\Downloads\AllgemeinTabelle;
|
||||
|
||||
use Mpdf;
|
||||
// Mpdf installed by typo3 extension
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class PdfStandards
|
||||
{
|
||||
public static $Mpdf;
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function download()
|
||||
{
|
||||
// ob_clean(); // set to remove wrong headers which crashed some files (e.g. xls, dot, ...)
|
||||
|
||||
// DbFunction::$debug = 1;
|
||||
|
||||
DbFunction::$projektid = GeneralUtility::_GP('projekt_aktive');
|
||||
|
||||
if (0 == DbFunction::$projektid or !is_numeric(DbFunction::$projektid)) {
|
||||
die('aktive projekt ID fehlt!');
|
||||
}
|
||||
|
||||
$_platzhalter = DbFunction::select(
|
||||
'tx_gutachten_projekteplatzhalter',
|
||||
['code', 'txt'],
|
||||
['pid' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
$_projekt = DbFunction::select(
|
||||
'tx_gutachten_projekte',
|
||||
['auftraggeber_id', 'gutachter_id', 'intname', 'name', 'beschreibung', 'erstellung', 'onoff', 'upload', 'allgemeinupload', 'recalculate', 'zuabTitel', 'nwbTitel', 'zustTitel', 'allgemTitel', 'loggia_title', 'nwbStartSeite', 'm1pP', 'm5pP', 'timestamp', 'status', 'erstelldatum'],
|
||||
['id' => DbFunction::$projektid]
|
||||
);
|
||||
|
||||
$_auftraggeber = DbFunction::select(
|
||||
'tx_gutachten_auftraggeber',
|
||||
'*',
|
||||
['id' => $_projekt[0]['auftraggeber_id']]
|
||||
);
|
||||
|
||||
$_gutachter = DbFunction::select(
|
||||
'tx_gutachten_gutachter',
|
||||
'*',
|
||||
['id' => $_projekt[0]['gutachter_id']]
|
||||
);
|
||||
|
||||
|
||||
// print_r($_projekt);
|
||||
// print_r($_auftraggeber);
|
||||
// print_r($_gutachter);
|
||||
// exit;
|
||||
|
||||
self::$Mpdf = new \Mpdf\Mpdf([
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 0,
|
||||
'margin_right' => 0,
|
||||
'margin_top' => 0,
|
||||
'margin_bottom' => 0,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
]);
|
||||
|
||||
$stylesheet = file_get_contents(__DIR__.'/style.css');
|
||||
|
||||
self::$Mpdf->WriteHTML($stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS);
|
||||
// 1 tabelle
|
||||
// 2 inhaltsverzeichnis
|
||||
// 3 textblock
|
||||
// 4 deckblatt
|
||||
// 5 nur Überschrift
|
||||
// 6 auftraggeber
|
||||
// 7 tabelle § 6/2
|
||||
// 8 allgemeinflächen
|
||||
$_standards = DbFunction::select('tx_gutachten_projektestandards', '*', ['AND' => ['hidden' => 0, 'pid' => DbFunction::$projektid], 'ORDER' => 'pos']);
|
||||
|
||||
foreach ($_standards as $key => $value) {
|
||||
$textartid = (int)$value['textart_id'];
|
||||
switch ($textartid) {
|
||||
case '4':
|
||||
// DECKBLATT
|
||||
$html = Deckblatt::create($value, $_projekt, $_platzhalter, $_gutachter, $_auftraggeber);
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '2':
|
||||
// INHALTSVERZEICHNIS
|
||||
self::$Mpdf->AddPageByArray(['mgt' => 22, 'mgb' => 22, 'mgl' => 10, 'mgr' => 10]);
|
||||
$html = Inhaltsverzeichnis::create($value, $_platzhalter);
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
|
||||
break;
|
||||
case '1':
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '';
|
||||
if ('' != $value['titel']) {
|
||||
$html = '<div class="header">'.$value['titel'].'</div>';
|
||||
} elseif ('' != $value['kennung']) {
|
||||
$html = '<div class="header">'.$value['kennung'].'</div>';
|
||||
}
|
||||
|
||||
$text = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$_text = explode('<br />', $text);
|
||||
$html .= '<table class="pure-table pure-table-striped ganzebreite size09">';
|
||||
foreach ($_text as $key => $value) {
|
||||
$_row = explode('|', $value);
|
||||
$html .= Helper::table_row($_row);
|
||||
}
|
||||
$html .= '</table>';
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '3':
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '';
|
||||
if ('' != $value['titel']) {
|
||||
$html = '<div class="header">'.$value['titel'].'</div>';
|
||||
} elseif ('' != $value['kennung']) {
|
||||
$html = '<div class="header">'.$value['kennung'].'</div>';
|
||||
}
|
||||
$textblock = Helper::replacePlatzhalter($_platzhalter, $value['txt']);
|
||||
$html .= '<div class="textblock">'.$textblock.'</div>';
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '5':
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
if ('' != $value['titel']) {
|
||||
$html = '<div class="header">'.$value['titel'].'</div>';
|
||||
} elseif ('' != $value['kennung']) {
|
||||
$html = '<div class="header">'.$value['kennung'].'</div>';
|
||||
}
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '6':
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$value['titel'].'</div>';
|
||||
|
||||
$auftraggeber = str_replace('<br />', '|||', $_auftraggeber[0]['txt']);
|
||||
$auftraggeber = str_replace('</div>', '|||', $auftraggeber);
|
||||
$tmp = explode('|||', $auftraggeber);
|
||||
$string = '';
|
||||
foreach ($tmp as $key => $value) {
|
||||
$value = strip_tags($value);
|
||||
if ('-' == $value[0]) {
|
||||
$value = substr($value, 1);
|
||||
}
|
||||
$string .= trim(strip_tags($value)).'<br>';
|
||||
}
|
||||
$html .= '<div class="textblock">'.$string.'</div>';
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '7':
|
||||
// 7 tabelle § 6/2
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
|
||||
$_paragraph_62 = Paragraph62::select(DbFunction::$projektid);
|
||||
$html = '<table class="pure-table pure-table-striped ganzebreite size08 center">';
|
||||
$html .= Helper::table_header_row(['Top', 'Geschoß', 'Orientierung', 'Typ']);
|
||||
foreach ($_paragraph_62 as $key => $value) {
|
||||
$html .= Helper::table_row($value, 1);
|
||||
}
|
||||
$html .= '</table>';
|
||||
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
case '8':
|
||||
// ALLGEMEINFLÄCHEN
|
||||
if (1 == $value['neueseite']) {
|
||||
self::$Mpdf->AddPage();
|
||||
self::$Mpdf->SetHTMLFooter('<div class="center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
|
||||
if ('' != $value['titel']) {
|
||||
$html = '<div class="header">'.$value['titel'].'</div>';
|
||||
} elseif ('' != $value['kennung']) {
|
||||
$html = '<div class="header">'.$value['kennung'].'</div>';
|
||||
}
|
||||
$html .= AllgemeinTabelle::load(DbFunction::$projektid);
|
||||
$html .= '<br><br><br><br><br><table class="inhalt"><tr>';
|
||||
$html .= '<td>'.$_projekt[0]['erstellung'].'</td>';
|
||||
$html .= '<td class="right">'.$_gutachter[0]['kopf'].'</td>';
|
||||
$html .= '</tr></table>';
|
||||
self::$Mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
self::$Mpdf->Output('Standard.pdf', Mpdf\Output\Destination::INLINE);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Gutachten\Downloads;
|
||||
|
||||
use HermannTelser\Gutachten\Utility\Message;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/***
|
||||
*
|
||||
* This file is part of the "NuhOdds Comparatore" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2019 Hermann Telser <hermann.telser@gmail.com>
|
||||
*
|
||||
* https://developmentgutachten.nuhodds.com/index.php?eID=tx_gutachten&controller=download_controller&action=pdf_excel&projekt_aktive=814
|
||||
***/
|
||||
|
||||
class _DownloadController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// Message::debug(__file__,__line__, "_DownloadController");
|
||||
// exit;
|
||||
|
||||
switch (GeneralUtility::_GP('action')) {
|
||||
// DOWNLOADS
|
||||
case 'pdf_standards':
|
||||
PdfStandards::download();
|
||||
break;
|
||||
case 'pdf_para6':
|
||||
PdfParagraph6::download();
|
||||
break;
|
||||
case 'pdf_nutzflaechen':
|
||||
PdfNutzflaeche::download();
|
||||
break;
|
||||
case 'excel_nutzflaechen':
|
||||
ExcelNutzflaeche::download();
|
||||
break;
|
||||
case 'excel_aufstellung':
|
||||
ExcelAufstellung::download();
|
||||
break;
|
||||
default:
|
||||
Message::error(
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
'no controller switch defined'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
Bautengruppe,
|
||||
TopNr,
|
||||
NWWhg,
|
||||
Nutzfläche,
|
||||
Loggia,
|
||||
Ges.Nutzfläche,
|
||||
AbstellplatzTop,
|
||||
AbstellplatzTop2,
|
||||
NWAbstellplatz,
|
||||
NWAbstellplatz2,
|
||||
Anzahl Pkw,
|
||||
Stellplatzfläche_,
|
||||
Stellplatzfläche2,
|
||||
NW-Whg+Pkw1,
|
||||
NW-Whg+Pkw1+2,
|
||||
Gesamtnutzwert,
|
||||
Gesamtnutzwert2,
|
||||
Parifizierer,
|
||||
Datum_Parifi,
|
||||
Anzahl Whg,
|
||||
Anzahl AP,
|
||||
Durchgang,
|
||||
Anrede,
|
||||
Titel,
|
||||
Vorname,
|
||||
Nachname,
|
||||
Geburt,
|
||||
Beruf,
|
||||
PersonStraße,
|
||||
PLZ,
|
||||
Ort,
|
||||
Partner ja=1,
|
||||
Anrede_P,
|
||||
Titel_P,
|
||||
Vorname_P,
|
||||
Nachname_P,
|
||||
Geburt_P,
|
||||
Beruf_P,
|
||||
Straße_P,
|
||||
Plz_P,
|
||||
Ort_P,
|
||||
Haus,
|
||||
Lage,
|
||||
Orientierung,
|
||||
Orientierung PPL,
|
||||
Beschreibung,
|
||||
Loggien,
|
||||
Zuschlag,
|
||||
Zubehör,
|
||||
Grundkosten,
|
||||
Baukosten,
|
||||
15% Eigenmittel,
|
||||
zusätz. Eigenmittel,
|
||||
KP-Wohnung und AP,
|
||||
KP-Wohnung,
|
||||
KP-Stellplatz,
|
||||
KP-Stellplatz2,
|
||||
Kaufpreis,
|
||||
UST ja=1,
|
||||
KP WHG netto,
|
||||
Ust WHG,
|
||||
Brutto WHG,
|
||||
KP TG netto,
|
||||
Ust TG,
|
||||
Brutto TG,
|
||||
UST WHG+TG,
|
||||
Netto WHG+TG,
|
||||
Brutto WHG+TG,
|
||||
Fälligk_KP_1,
|
||||
Fälligk_KP_2,
|
||||
Fälligk_KP_3,
|
||||
KPTeil1,
|
||||
KPTeil1 UST,
|
||||
KPTeil2,
|
||||
KPTeil2 UST,
|
||||
KPTeil3,
|
||||
KPTeil3 UST,
|
||||
KPTeil4,
|
||||
KPTeil4 UST,
|
||||
Kontrolle_KP,
|
||||
Kontrolle_KP UST,
|
||||
pfand_ngs,
|
||||
pfand_ngs UST,
|
||||
VertrKo,
|
||||
Bankgarantie,
|
||||
Wohnung.WbfDarlehen,
|
||||
Globaldarlehen,
|
||||
Globaldarlehen abzügl.zusätzl.EM,
|
||||
Globalbank,
|
||||
GrundstückNummer,
|
||||
GstGröße,
|
||||
Einlagezahl,
|
||||
Grundbuch,
|
||||
Baubeginn,
|
||||
Baufertigstellung,
|
||||
Spät_Übergabe,
|
||||
Bau-Ausstatt,
|
||||
Architekt,
|
||||
Baubescheid,
|
||||
Zahl-Baubescheid,
|
||||
Baubescheid2,
|
||||
Zahl-Baubescheid2,
|
||||
UnterschriftKaufvertragAm,
|
||||
Beglaubigungsnummer,
|
||||
UB1_Datum,
|
||||
EFNR1,
|
||||
STNR1,
|
||||
UB2_Datum,
|
||||
EFNR2,
|
||||
STNR2,
|
||||
GVKB_Datum,
|
||||
GVKB_Zahl,
|
||||
Fremdfinanzierung,
|
||||
KPVertr,
|
||||
TZl
|
||||
Bautengruppe,
|
||||
TopNr,
|
||||
NWWhg,
|
||||
Nutzfläche,
|
||||
Loggia,
|
||||
Ges.Nutzfläche,
|
||||
AbstellplatzTop,
|
||||
AbstellplatzTop2,
|
||||
NWAbstellplatz,
|
||||
NWAbstellplatz2,
|
||||
Anzahl Pkw,
|
||||
Stellplatzfläche_,
|
||||
Stellplatzfläche2,
|
||||
NW-Whg+Pkw1,
|
||||
NW-Whg+Pkw1+2,
|
||||
Gesamtnutzwert,
|
||||
Gesamtnutzwert2,
|
||||
Parifizierer,
|
||||
Datum_Parifi,
|
||||
Anzahl Whg,
|
||||
Anzahl AP,
|
||||
Durchgang,
|
||||
Anrede,
|
||||
Titel,
|
||||
Vorname,
|
||||
Nachname,
|
||||
Geburt,
|
||||
Beruf,
|
||||
PersonStraße,
|
||||
PLZ,
|
||||
Ort,
|
||||
Partner ja=1,
|
||||
Anrede_P,
|
||||
Titel_P,
|
||||
Vorname_P,
|
||||
Nachname_P,
|
||||
Geburt_P,
|
||||
Beruf_P,
|
||||
Straße_P,
|
||||
Plz_P,
|
||||
Ort_P,
|
||||
Haus,
|
||||
Lage,
|
||||
Orientierung,
|
||||
Orientierung PPL,
|
||||
Beschreibung,
|
||||
Loggien,
|
||||
Balkone,
|
||||
Zubehör,
|
||||
Grundkosten,
|
||||
Baukosten,
|
||||
15% Eigenmittel,
|
||||
zusätz. Eigenmittel,
|
||||
KP-Wohnung und AP,
|
||||
KP-Wohnung,
|
||||
KP-Stellplatz,
|
||||
KP-Stellplatz2,
|
||||
Kaufpreis,
|
||||
UST ja=1,
|
||||
KP WHG netto,
|
||||
Ust WHG,
|
||||
Brutto WHG,
|
||||
KP TG netto,
|
||||
Ust TG,
|
||||
Brutto TG,
|
||||
UST WHG+TG,
|
||||
Netto WHG+TG,
|
||||
Brutto WHG+TG,
|
||||
Fälligk_KP_1,
|
||||
Fälligk_KP_2,
|
||||
Fälligk_KP_3,
|
||||
KPTeil1,
|
||||
KPTeil1 UST,
|
||||
KPTeil2,
|
||||
KPTeil2 UST,
|
||||
KPTeil3,
|
||||
KPTeil3 UST,
|
||||
KPTeil4,
|
||||
KPTeil4 UST,
|
||||
Kontrolle_KP,
|
||||
Kontrolle_KP UST,
|
||||
pfand_ngs,
|
||||
pfand_ngs UST,
|
||||
VertrKo,
|
||||
Bankgarantie,
|
||||
Wohnung.WbfDarlehen,
|
||||
Globaldarlehen,
|
||||
Globaldarlehen abzügl.zusätzl.EM,
|
||||
Globalbank,
|
||||
GrundstückNummer,
|
||||
GstGröße,
|
||||
Einlagezahl,
|
||||
Grundbuch,
|
||||
Baubeginn,
|
||||
Baufertigstellung,
|
||||
Spät_Übergabe,
|
||||
Bau-Ausstatt,
|
||||
Architekt,
|
||||
Baubescheid,
|
||||
Zahl-Baubescheid,
|
||||
Baubescheid2,
|
||||
Zahl-Baubescheid2,
|
||||
UnterschriftKaufvertragAm,
|
||||
Beglaubigungsnummer,
|
||||
UB1_Datum,
|
||||
EFNR1,
|
||||
STNR1,
|
||||
UB2_Datum,
|
||||
EFNR2,
|
||||
STNR2,
|
||||
GVKB_Datum,
|
||||
GVKB_Zahl,
|
||||
Fremdfinanzierung,
|
||||
KPVertr,
|
||||
TZl
|
||||
@@ -0,0 +1,422 @@
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
font-size: 11pt;
|
||||
line-height: 18pt;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.3em;
|
||||
margin: 2mm 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.4em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pl-1{
|
||||
padding-left: 1mm;
|
||||
}
|
||||
|
||||
.grau {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.bg-gray {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.orange {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.normal {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.halfpage {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.size1 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.size09 {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.size08 {
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.size07 {
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.border-bt {
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
.br {
|
||||
border-right: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
.bt {
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
.bb {
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.allheader{
|
||||
font-weight: bold;
|
||||
background-color: #ecf2f9;
|
||||
}
|
||||
|
||||
.rotate {
|
||||
transform: rotate(-90.0deg);
|
||||
-moz-transform: rotate(-90.0deg);
|
||||
/* FF3.5+ */
|
||||
-o-transform: rotate(-90.0deg);
|
||||
/* Opera 10.5 */
|
||||
-webkit-transform: rotate(-90.0deg);
|
||||
/* Saf3.1+, Chrome */
|
||||
}
|
||||
|
||||
.deckblatt {
|
||||
padding: 1rem;
|
||||
background-color: #efefef;
|
||||
height: 290mm;
|
||||
}
|
||||
|
||||
.gutachter {
|
||||
height: 100mm;
|
||||
text-align: right;
|
||||
margin-top: 3mm;
|
||||
margin-right: 3mm;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.gutachten {
|
||||
height: 50mm;
|
||||
text-align: left;
|
||||
margin-left: 15mm;
|
||||
}
|
||||
|
||||
.zweckbox {
|
||||
height: 80mm;
|
||||
text-align: right;
|
||||
margin-right: 5mm;
|
||||
}
|
||||
|
||||
.auftraggeber {
|
||||
text-align: right;
|
||||
margin-right: 5mm;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 1mm 3mm;
|
||||
font-size: 1.3em;
|
||||
background-color: #ecf2f9;
|
||||
border: 0.1mm solid #ccc;
|
||||
width: 196mm;
|
||||
margin-top: 7mm;
|
||||
margin-bottom: 4mm;
|
||||
}
|
||||
|
||||
.textblock {
|
||||
padding: 0;
|
||||
margin-top: 10mm;
|
||||
margin-bottom: 7mm;
|
||||
}
|
||||
|
||||
/* GUTACHTEN TABLES START */
|
||||
|
||||
table.footer {
|
||||
font-size: .7em;
|
||||
border-top: 0.1mm solid #ccc;
|
||||
width: 100%;
|
||||
margin: 5mm 7mm;
|
||||
}
|
||||
|
||||
table.inhalt {
|
||||
width: 196mm;
|
||||
margin-left: 7mm;
|
||||
margin-right: 7mm;
|
||||
}
|
||||
|
||||
.inhalt td {
|
||||
padding: 1.5mm;
|
||||
}
|
||||
|
||||
table.ganzebreite {
|
||||
width: 196mm;
|
||||
margin-bottom: 5mm;
|
||||
}
|
||||
|
||||
.ganzebreite td .cell1 {
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
table.center td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ganzebreite th {
|
||||
background-color: #cbcbcb;
|
||||
}
|
||||
|
||||
table.nutzwert-neu {
|
||||
font-size: .75em;
|
||||
width: 100%;
|
||||
margin-bottom: 7mm;
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
border-right: 0.1mm solid #cbcbcb;
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
table.ganzebreite tr.header-row td,
|
||||
table.nutzwert-neu tr.header-row td,
|
||||
table.nutzwert-neu tr.header-row th {
|
||||
padding: 5px 10px;
|
||||
background-color: #ecf2f9;
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.nutzwert-neu td.first {
|
||||
background-color: #ecf2f9;
|
||||
}
|
||||
|
||||
table.nutzwert-neu td.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.nutzwert-neu td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.nutzwert {
|
||||
font-size: .75em;
|
||||
width: 100%;
|
||||
margin-left: 5mm;
|
||||
margin-right: 5mm;
|
||||
margin-bottom: 7mm;
|
||||
}
|
||||
|
||||
.nutzwert tr.header-row td {
|
||||
padding: 5px 10px;
|
||||
background-color: #efefef;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nutzwert th {
|
||||
padding: 5px 4px;
|
||||
text-align: center;
|
||||
background-color: #efefef;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.nutzwert td {
|
||||
padding: 3px 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nutzwert td.abschluss-first {
|
||||
padding: 5px 10px;
|
||||
background-color: #efefef;
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.nutzwert td.abschluss {
|
||||
padding: 5px 4px;
|
||||
background-color: #efefef;
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th.abschluss {
|
||||
background-color: #cbcbcb;
|
||||
}
|
||||
|
||||
.nutzwert td.abschluss .cell0 {
|
||||
background-color: #efefef;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.nutzwert td.cell0 {
|
||||
width: 10mm;
|
||||
font-weight: bold;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.nutzwert td.cell4 {
|
||||
padding-left: 1mm;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.nutzwert td.cell0 {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.nutzwert th.cell0 {
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
table.zusammenstellung {
|
||||
font-size: .8em;
|
||||
width: 100%;
|
||||
margin-left: 5mm;
|
||||
margin-right: 5mm;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.zusammenstellung th {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.lt {
|
||||
border-top: 0.1mm solid #cbcbcb;
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.anmerkung {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: .75em;
|
||||
width: 100%;
|
||||
margin-left: 5mm;
|
||||
margin-right: 5mm;
|
||||
margin-bottom: 7mm;
|
||||
}
|
||||
|
||||
.top {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* PURE TABLES START */
|
||||
|
||||
.pure-table {
|
||||
/* Remove spacing between table cells (from Normalize.css) */
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
/* border: 0.1mm solid #cbcbcb; */
|
||||
}
|
||||
|
||||
.pure-table-noborder {
|
||||
/* Remove spacing between table cells (from Normalize.css) */
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
}
|
||||
|
||||
.pure-table caption {
|
||||
color: #000;
|
||||
font: italic 85%/1 arial, sans-serif;
|
||||
padding: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pure-table td,
|
||||
.pure-table th,
|
||||
.pure-table-noborder td,
|
||||
.pure-table-noborder th {
|
||||
border-left: 0.1mm solid #cbcbcb;
|
||||
/* inner column border */
|
||||
border-width: 0 0 0 0.1mm;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
/*to make ths where the title is really long work*/
|
||||
padding: .5em 1em;
|
||||
/* cell padding */
|
||||
}
|
||||
|
||||
.pure-table thead {
|
||||
background-color: #e0e0e0;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
/*
|
||||
striping:
|
||||
even - #fff (white)
|
||||
odd - #f2f2f2 (light gray)
|
||||
*/
|
||||
.pure-table td {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.pure-table-odd td {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
/* nth-child selector for modern browsers */
|
||||
.pure-table-striped tr:nth-child(2n-1) td {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
/* BORDERED TABLES */
|
||||
.pure-table-bordered td {
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
}
|
||||
|
||||
.pure-table-bordered tbody>tr:last-child>td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
/* HORIZONTAL BORDERED TABLES */
|
||||
|
||||
/* .pure-table-horizontal td,
|
||||
.pure-table-horizontal th {
|
||||
border-width: 0 0 0.1mm 0;
|
||||
border-bottom: 0.1mm solid #cbcbcb;
|
||||
} */
|
||||
|
||||
.pure-table-horizontal tbody>tr:last-child>td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
Reference in new issue
Block a user