Merge pull request 'solved issue in lower value in panel box' (#795) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 31s

Reviewed-on: #795
This commit was merged in pull request #795.
This commit is contained in:
2026-07-02 11:53:21 +00:00

View File

@@ -152,20 +152,16 @@ public $records = [];
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (($characteristic?->inspection_type ?? null) === 'Value') {
if (
$characteristic &&
is_numeric($value) &&
$value >= $characteristic->lower &&
$value <= $characteristic->upper
if ($characteristic && is_numeric($value) && (($value >= $characteristic->lower && $value <= $characteristic->upper) || $value == $characteristic->lower || $value == $characteristic->upper)
) {
$status = 'Ok';
} else {
$status = 'NotOk';
}
}
else {
$status = $value;
}
// else {
// $status = $value;
// }
ProductionCharacteristic::create([
'plant_id' => $this->data['plant_id'] ?? null,
@@ -201,7 +197,7 @@ public $records = [];
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (! $characteristic || ! is_numeric($value) || $value <= $characteristic->lower || $value >= $characteristic->upper){
if (! $characteristic || ! is_numeric($value)){
return false;
}
}
@@ -222,7 +218,7 @@ public $records = [];
return 'Not Ok';
}
return ($value > $characteristic->lower && $value < $characteristic->upper) ? 'Ok' : 'Not Ok';
return ($value >= $characteristic->lower && $value <= $characteristic->upper) ? 'Ok' : 'Not Ok';
}