1
0
forked from poc/pds

Solved issue in panel box validation

This commit is contained in:
dhanabalan
2026-06-18 16:29:26 +05:30
parent be4611d863
commit c1f5d232ac

View File

@@ -147,19 +147,24 @@ public $records = [];
foreach ($this->checklist as $characteristicId => $value) {
$status = 'Ok';
// $status = 'Ok';
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (
$characteristic &&
is_numeric($value) &&
$value >= $characteristic->lower &&
$value <= $characteristic->upper
) {
$status = 'Ok';
} else {
$status = 'NotOk';
if (($characteristic?->inspection_type ?? null) === 'Value') {
if (
$characteristic &&
is_numeric($value) &&
$value >= $characteristic->lower &&
$value <= $characteristic->upper
) {
$status = 'Ok';
} else {
$status = 'NotOk';
}
}
else {
$status = $value;
}
ProductionCharacteristic::create([