Merge pull request 'Solved issue in panel box validation' (#770) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 28s

Reviewed-on: #770
This commit was merged in pull request #770.
This commit is contained in:
2026-06-18 10:59:39 +00:00

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([