Compare commits

...

1 Commits

Author SHA1 Message Date
solocla 83c6157b10 validation excldugin id 189 tested component 2026-06-16 08:33:32 +02:00
+3 -2
View File
@@ -1,4 +1,5 @@
<?php <?php
/** /**
* Validate rows before export to LIMS. * Validate rows before export to LIMS.
* *
@@ -210,13 +211,14 @@ try {
$requiredFixedByTemplate[(int)$r['template_id']][$key] = $key; $requiredFixedByTemplate[(int)$r['template_id']][$key] = $key;
} }
// Required custom fields that are visible in the import grid // Required custom fields that are visible in the import grid (excluding filed_id = 189 Tested component)
$stmt = $pdo->prepare(" $stmt = $pdo->prepare("
SELECT id AS mapping_id, template_id, field_label SELECT id AS mapping_id, template_id, field_label
FROM template_mapping FROM template_mapping
WHERE template_id IN ($tplPlaceholders) WHERE template_id IN ($tplPlaceholders)
AND is_required = 1 AND is_required = 1
AND is_visible_import = 1 AND is_visible_import = 1
AND id <> 189
"); ");
$stmt->execute($templateIds); $stmt->execute($templateIds);
foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $r) { foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $r) {
@@ -272,7 +274,6 @@ try {
} }
echo json_encode(['success' => true, 'results' => $results]); echo json_encode(['success' => true, 'results' => $results]);
} catch (Exception $e) { } catch (Exception $e) {
error_log("Validation error: " . $e->getMessage()); error_log("Validation error: " . $e->getMessage());
echo json_encode(['success' => false, 'message' => $e->getMessage()]); echo json_encode(['success' => false, 'message' => $e->getMessage()]);