- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
107 lines
4.7 KiB
PHP
107 lines
4.7 KiB
PHP
|
|
|
|
<!-- 하단마감재 -->
|
|
<?php
|
|
// 하단 마감재 및 구성품 테이블 출력
|
|
if (True) {
|
|
// 하단 마감재, 하단 보강엘바, 하단 보강평철, 하단 무게평철의 데이터를 저장할 배열
|
|
$item_data = [
|
|
'하단마감재' => [
|
|
'size' => '(60*40)',
|
|
'length_3000' => 0,
|
|
'length_4000' => 0
|
|
],
|
|
'하단 보강엘바' => [
|
|
'size' => '(60*17)',
|
|
'length_3000' => 0,
|
|
'length_4000' => 0
|
|
],
|
|
'하단 보강평철' => [
|
|
'size' => '',
|
|
'length_3000' => 0,
|
|
'length_4000' => 0
|
|
],
|
|
'하단 무게평철' => [
|
|
'size' => '[50*12T]',
|
|
'length_2000' => 0
|
|
]
|
|
];
|
|
|
|
// 데이터를 누적하여 합산
|
|
foreach ($eList as $item) {
|
|
$item_data['하단마감재']['length_3000'] += intval($item['col49']);
|
|
$item_data['하단마감재']['length_4000'] += intval($item['col50']);
|
|
$item_data['하단 보강엘바']['length_3000'] += intval($item['col52']);
|
|
$item_data['하단 보강엘바']['length_4000'] += intval($item['col53']);
|
|
$item_data['하단 보강평철']['length_3000'] += intval($item['col55']);
|
|
$item_data['하단 보강평철']['length_4000'] += intval($item['col56']);
|
|
$item_data['하단 무게평철']['length_2000'] += intval($item['col57']);
|
|
}
|
|
|
|
// 테이블 출력 시작
|
|
echo '<div class="row">';
|
|
echo '<div class="d-flex align-items-center justify-content-start">';
|
|
echo '<table class="table avoid-break" style="border-collapse: collapse;">';
|
|
|
|
// 첫 번째 행: 자재 구성품명, 길이, 수량 표시
|
|
echo '<tr>';
|
|
echo '<td class="text-center lightgray fw-bold">구성품</td>';
|
|
echo '<td class="text-center lightgray fw-bold">길이 (mm)</td>';
|
|
echo '<td class="text-center lightgray fw-bold">수량</td>';
|
|
echo '<td class="text-center lightgray fw-bold">구성품</td>';
|
|
echo '<td class="text-center lightgray fw-bold">길이 (mm)</td>';
|
|
echo '<td class="text-center lightgray fw-bold">수량</td>';
|
|
echo '<td class="text-center lightgray fw-bold">구성품</td>';
|
|
echo '<td class="text-center lightgray fw-bold">길이 (mm)</td>';
|
|
echo '<td class="text-center lightgray fw-bold">수량</td>';
|
|
echo '<td class="text-center lightgray fw-bold">구성품</td>';
|
|
echo '<td class="text-center lightgray fw-bold">길이 (mm)</td>';
|
|
echo '<td class="text-center lightgray fw-bold">수량</td>';
|
|
echo '</tr>';
|
|
|
|
// 두 번째 행: 3000mm 길이에 대한 수량 표시
|
|
echo '<tr>';
|
|
// 하단 마감재
|
|
echo '<td class="text-center lightgray fw-bold" rowspan="2">하단마감재<br>' . $item_data['하단마감재']['size'] . '</td>';
|
|
echo '<td class="text-center">L : 3,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단마감재']['length_3000'] ?: '-') . '</td>';
|
|
|
|
// 하단 보강엘바
|
|
echo '<td class="text-center lightgray fw-bold" rowspan="2">하단<br>보강엘바<br>' . $item_data['하단 보강엘바']['size'] . '</td>';
|
|
echo '<td class="text-center">L : 3,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단 보강엘바']['length_3000'] ?: '-') . '</td>';
|
|
|
|
// 하단 보강평철
|
|
echo '<td class="text-center lightgray fw-bold" rowspan="2">하단<br>보강평철</td>';
|
|
echo '<td class="text-center">L : 3,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단 보강평철']['length_3000'] ?: '-') . '</td>';
|
|
|
|
// 하단 무게평철
|
|
echo '<td class="text-center lightgray fw-bold" rowspan="2">하단<br>무게평철<br>' . $item_data['하단 무게평철']['size'] . '</td>';
|
|
echo '<td class="text-center">L : 2,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단 무게평철']['length_2000'] ?: '-') . '</td>';
|
|
echo '</tr>';
|
|
|
|
// 세 번째 행: 4000mm 길이에 대한 수량 표시
|
|
echo '<tr>';
|
|
// 하단 마감재 (길이 4000)
|
|
echo '<td class="text-center">L : 4,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단마감재']['length_4000'] ?: '-') . '</td>';
|
|
|
|
// 하단 보강엘바 (길이 4000)
|
|
echo '<td class="text-center">L : 4,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단 보강엘바']['length_4000'] ?: '-') . '</td>';
|
|
|
|
// 하단 보강평철 (길이 4000)
|
|
echo '<td class="text-center">L : 4,000</td>';
|
|
echo '<td class="text-center text-danger">' . ($item_data['하단 보강평철']['length_4000'] ?: '-') . '</td>';
|
|
|
|
// 하단 무게평철은 2000mm만 존재하므로 공백 처리
|
|
echo '</tr>';
|
|
|
|
echo '</tbody>';
|
|
echo '</table>';
|
|
echo '</div>';
|
|
}
|
|
|
|
?>
|