fix: make Excel hyperlinks point to verification URL instead of root to avoid accidental login redirects

This commit is contained in:
Hamza-Ayed
2026-05-15 21:54:17 +03:00
parent 68f6e76da8
commit fa73062023

View File

@@ -358,8 +358,9 @@ foreach ($invoices as $invIdx => $inv) {
// --- Add Clickable Website Link --- // --- Add Clickable Website Link ---
// We'll move the link slightly down or put it in I1 with the QR // We'll move the link slightly down or put it in I1 with the QR
$sheet->setCellValue("I" . $invRow, 'musadaq.intaleqapp.com'); $sheet->setCellValue("I" . $invRow, 'musadaq.intaleqapp.com/verify');
$sheet->getCell("I" . $invRow)->getHyperlink()->setUrl('https://musadaq.intaleqapp.com/'); $verifyUrl = "https://musadaq.intaleqapp.com/index.php?route=verify&id=" . $inv['id'];
$sheet->getCell("I" . $invRow)->getHyperlink()->setUrl($verifyUrl);
$sheet->getStyle("I" . $invRow)->applyFromArray([ $sheet->getStyle("I" . $invRow)->applyFromArray([
'font' => ['color' => ['argb' => 'FFFFFFFF'], 'underline' => true, 'size' => 8], 'font' => ['color' => ['argb' => 'FFFFFFFF'], 'underline' => true, 'size' => 8],
'alignment' => ['horizontal' => Alignment::HORIZONTAL_LEFT, 'vertical' => Alignment::VERTICAL_TOP], 'alignment' => ['horizontal' => Alignment::HORIZONTAL_LEFT, 'vertical' => Alignment::VERTICAL_TOP],