From f358bbd66c98ba7fff61e63255a4efa6de1ee474 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Fri, 5 Jun 2026 04:13:21 +0530 Subject: [PATCH] More spacing between OPD print blocks; add margin around medicine table --- app/Controllers/Opd.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index 57859eb..9d4ec37 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -3593,8 +3593,8 @@ class Opd extends BaseController if ($lineBreakAfterLabel) { // List-style sections (Complaint, Diagnosis …): // heading on its own line, content block below with a small left indent. - // margin-bottom:12px gives clear visual separation between consecutive sections. - return '
' + // margin-bottom:18px gives clear visual separation between consecutive sections. + return '
' . $headingHtml . '
' . $value @@ -3602,8 +3602,8 @@ class Opd extends BaseController } // Inline sections (Vitals, Investigation, Next Visit): - // heading + value on the same line; same 12px gap after block. - return '
' + // heading + value on the same line; same 18px gap after block. + return '
' . $headingHtml . ' ' . $value @@ -3840,9 +3840,13 @@ class Opd extends BaseController $medicalHtml = trim((string) ($tokens['medical'] ?? '')); $tokens['Rx'] = $medicalHtml !== '' - ? '
Rx :
' . $medicalHtml . '
' + ? '
Rx :
' . $medicalHtml . '
' : ''; $tokens['rx'] = $tokens['Rx']; + // {{medical}} used directly in templates: wrap with the same top/bottom margin. + $tokens['medical'] = $medicalHtml !== '' + ? '
' . $medicalHtml . '
' + : ''; $tokens['VitalsBlock'] = (string) ($tokens['vital_content'] ?? ''); $tokens['ComplaintBlock'] = (string) ($tokens['Complaint'] ?? '');