Refresh mPDF debug snapshot on build

This commit is contained in:
DevSoftTech Server 2026-08-18 17:32:24 +05:30
parent afd0ba8a8c
commit 306f8ef1c4

View File

@ -5562,7 +5562,9 @@ class Ipd_discharge extends BaseController
}
$file = WRITEPATH . 'debug' . DIRECTORY_SEPARATOR . 'discharge_mpdf_input_' . $ipdId . '_' . $templateId . '.html';
if (! is_file($file) && (int) ($this->request->getGet('build') ?? 0) === 1) {
if ((int) ($this->request->getGet('build') ?? 0) === 1) {
@unlink($file);
@unlink(WRITEPATH . 'debug' . DIRECTORY_SEPARATOR . 'discharge_mpdf_runtime_' . $ipdId . '_' . $templateId . '.json');
$previousGet = $_GET;
$_GET['tpl'] = $templateId;
$_GET['refresh'] = 1;