Updated scrap_quantity as '0' when rework_status is 'No' #367

Merged
jothi merged 1 commits from ranjith-dev into master 2026-02-21 13:21:20 +00:00

View File

@@ -458,9 +458,9 @@ class ProcessOrderResource extends Resource
->options([0 => 'No', 1 => 'Yes']) ->options([0 => 'No', 1 => 'Yes'])
->reactive() ->reactive()
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
// if ($get('id') && $get('rework_status') == 1) { if ($state == 0) {
// $set('rework_status', 1); $set('scrap_quantity', '0');
// } }
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}) })
->rule(function (callable $get, callable $set) { ->rule(function (callable $get, callable $set) {