This commit is contained in:
Lizandro Guarnizo
2026-06-13 13:19:02 -05:00
parent 0e51165108
commit f34d19b3df
4 changed files with 43 additions and 4 deletions
+14
View File
@@ -105,6 +105,20 @@ try {
// ── Enviar notificación WhatsApp con la plantilla configurada ──
if ($pacienteTel) {
try {
$stmtCfg = $pdo->prepare(
"SELECT clave, valor FROM lab_config WHERE clave IN ('turnero_wa_template','turnero_wa_lang','turnero_wa_kiosko_enabled')"
);
$stmtCfg->execute();
$cfgWA = $stmtCfg->fetchAll(PDO::FETCH_KEY_PAIR);
$waKioskoEnabled = ($cfgWA['turnero_wa_kiosko_enabled'] ?? '0') === '1';
} catch (\Throwable $e) {
$waKioskoEnabled = true;
}
}
if ($pacienteTel && $waKioskoEnabled) {
try {
$cfgWA = [];
$stmtCfg = $pdo->prepare(
"SELECT clave, valor FROM lab_config WHERE clave IN ('turnero_wa_template','turnero_wa_lang')"
);