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:
parent
a5ccd71714
commit
5e929c858e
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user