remove validation simulate

This commit is contained in:
r.mubarakzyanov 2026-03-14 19:09:17 +03:00
parent 1b97bf4362
commit cdd6551e9c

View File

@ -70,8 +70,6 @@ try {
exit; exit;
} }
$simulate = ($_ENV['SIMULATE_EXPORT_LIMS'] ?? env('SIMULATE_EXPORT_LIMS') ?? '') === 'true';
// ── Prefetch all data in bulk ─────────────────────────────────────────── // ── Prefetch all data in bulk ───────────────────────────────────────────
$iddatadbList = array_column($rows, 'iddatadb'); $iddatadbList = array_column($rows, 'iddatadb');
@ -97,21 +95,6 @@ try {
$iddatadb = (int)$rowInfo['iddatadb']; $iddatadb = (int)$rowInfo['iddatadb'];
$index = $rowInfo['index']; $index = $rowInfo['index'];
// Simulation: every even iddatadb gets a fake matrice error
if ($simulate && $iddatadb % 2 === 0) {
$results[$index] = [
'valid' => false,
'iddatadb' => $iddatadb,
'errors' => [[
'field' => 'parts',
'message' => 'Matrice mancante — il LIMS rifiuterà l\'esportazione. '
. 'Part senza matrice: PART-001, PART-003. '
. 'Aprire la sezione Parts e assegnare la matrice.',
]],
];
continue;
}
// Build context for validators // Build context for validators
$ctx = [ $ctx = [
'parts' => $partsInfo[$iddatadb] ?? [], 'parts' => $partsInfo[$iddatadb] ?? [],