From a6d3add1ac5ce699023ab33d8510620aa2e9ab1a Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 7 May 2026 10:19:02 +0530 Subject: [PATCH] Added production order in plant and item model --- app/Models/Item.php | 5 +++++ app/Models/Plant.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/Models/Item.php b/app/Models/Item.php index 962f527..360fee9 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -54,6 +54,11 @@ class Item extends Model return $this->hasMany(ProcessOrder::class); } + public function productionOrders() + { + return $this->hasMany(ProductionOrder::class); + } + public function productCharacteristicsMasters() { return $this->hasMany(ProductCharacteristicsMaster::class); diff --git a/app/Models/Plant.php b/app/Models/Plant.php index bff380a..8904a05 100644 --- a/app/Models/Plant.php +++ b/app/Models/Plant.php @@ -108,6 +108,11 @@ class Plant extends Model return $this->hasMany(ProcessOrder::class, 'plant_id', 'id'); } + public function productionOrder() + { + return $this->hasMany(ProductionOrder::class, 'plant_id', 'id'); + } + public function productCharacteristicsMasters() { return $this->hasMany(ProductCharacteristicsMaster::class, 'plant_id', 'id');