Compare commits
1 Commits
d623ee797c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 83c6157b10 |
@@ -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()]);
|
||||||
|
|||||||
Reference in New Issue
Block a user