FHM08062601IBL - rapikan separator detail hasil

This commit is contained in:
sas.fajri
2026-06-09 13:52:36 +07:00
parent 48c61fcfd7
commit 04591d6c32

View File

@@ -297,9 +297,9 @@ class Rpt_lab_result extends MY_Controller
// ── Table rows ────────────────────────────────────────────────────────
// Strategy:
// - Group/SubSubGroup rows : full-width cell, border 'B' (bottom only)
// - Test rows : each cell border 'B' (no internal vertical lines)
// - Outer L/R/T/B : drawn via Rect() after all rows
// - Group/SubSubGroup rows : full-width text only, tanpa border bawah
// - Test rows : text per kolom + separator full-width manual
// - Outer L/R/T/B : drawn via Rect() after all rows
$prev_subgroup = null;
$prev_subsubgroup = null;
@@ -320,23 +320,23 @@ class Rpt_lab_result extends MY_Controller
$qr_url = $d['qrreport'];
}
// Level 1: SubGroup — bold, full-width, bottom separator only
// Level 1: SubGroup — bold, full-width, tanpa separator
if ($subgroup !== '' && $subgroup !== $prev_subgroup) {
$pdf->SetX($ml);
$pdf->SetFont($fnt, 'B', 8.8);
$pdf->Cell($cw, $row_h, $subgroup, 'B', 1, 'L');
$pdf->Cell($cw, $row_h, $subgroup, 0, 1, 'L');
$prev_subgroup = $subgroup; $prev_subsubgroup = null;
}
// Level 2: SubSubGroup — italic, full-width, bottom separator only
// Level 2: SubSubGroup — italic, full-width, tanpa separator
if ($subsubgroup !== '' && $subsubgroup !== $prev_subsubgroup) {
$pdf->SetX($ml);
$pdf->SetFont($fnt, 'I', 8.6);
$pdf->Cell($cw, $row_h, ' ' . $this->_s($subsubgroup), 'B', 1, 'L');
$pdf->Cell($cw, $row_h, ' ' . $this->_s($subsubgroup), 0, 1, 'L');
$prev_subsubgroup = $subsubgroup;
}
// Level 3: Test row — indent via spaces, bottom separator per cell
// Level 3: Test row — indent via spaces, separator full-width
$sp = 0; $prefix = '';
if ($sascode_len >= 10 && $sascode_len < 12) { $sp = 2; }
elseif ($sascode_len >= 12 && $sascode_len < 14) { $sp = 4; $prefix = chr(183) . ' '; }
@@ -354,15 +354,16 @@ class Rpt_lab_result extends MY_Controller
$row_height = max($row_height, $lines * $row_h);
}
// Render cells — bottom border only, outer L/R via Rect()
// Render cells tanpa border, lalu gambar separator full-width manual
$x_cur = $ml;
foreach ($texts as $i => $txt) {
$w = $col_w_arr[$i];
$align = ($i === 1) ? 'C' : 'L';
$pdf->SetXY($x_cur, $y_start);
$pdf->Cell($w, $row_height, $txt, 'B', 0, $align);
$pdf->Cell($w, $row_height, $txt, 0, 0, $align);
$x_cur += $w;
}
$pdf->Line($ml, $y_start + $row_height, $ml + $cw, $y_start + $row_height);
$pdf->SetXY($ml, $y_start + $row_height);
}