Fix H_logo placeholder not being replaced in OPD print

- Add fallback to 'logo.png' when H_logo is not set in database or constants
- Prevents {{H_logo}} placeholder from appearing as literal text in print/PDF
- Resolves 400 Bad Request error when browser tries to load unreplaced placeholder
- Ensures prescription templates always have a valid logo path
This commit is contained in:
DevSoftTech Server 2026-06-06 03:43:31 +05:30
parent a5ccd71714
commit 5e929c858e

View File

@ -4074,6 +4074,11 @@ class Opd extends BaseController
if ($hLogo === '') {
$hLogo = defined('H_logo') ? (string) constant('H_logo') : '';
}
// Fallback to default logo if still empty
if ($hLogo === '') {
$hLogo = 'logo.png';
}
$tokens['H_Name'] = $hName;
$tokens['H_address_1'] = $hAddress1;