Added logic in both edit and view production order page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-05-20 12:53:09 +05:30
parent e09a362c96
commit b8fe29644e
2 changed files with 5 additions and 5 deletions

View File

@@ -95,6 +95,8 @@ class ViewProductionOrder extends ViewRecord
$plantId = trim($this->form->getState()['plant_id'] ?? '') ?? null;
$plantCode = Plant::where('id', $plantId)->value('code');
if (empty($plantId)) {
Notification::make()
->title('Plant name cannot be empty!')
@@ -118,12 +120,10 @@ class ViewProductionOrder extends ViewRecord
->send();
return;
} else {
return redirect()->route('production-orders.printItemSerial', ['production_order' => $pOrder]);
return redirect()->route('production-orders.printItemSerial', ['production_order' => $pOrder, 'plant_code' => $plantCode]);
}
}
protected function getHeaderActions(): array
{
return [