From 07c0a1927bac78aa9d05ee1ebc5ba9d038cff1a9 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 13 Apr 2023 11:12:01 -0700 Subject: [PATCH] Added supplier id to controllers Signed-off-by: snipe --- app/Http/Controllers/Components/ComponentsController.php | 2 ++ app/Http/Controllers/Consumables/ConsumablesController.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/Http/Controllers/Components/ComponentsController.php b/app/Http/Controllers/Components/ComponentsController.php index f943a71a2e..2ada973612 100644 --- a/app/Http/Controllers/Components/ComponentsController.php +++ b/app/Http/Controllers/Components/ComponentsController.php @@ -71,6 +71,7 @@ class ComponentsController extends Controller $component = new Component(); $component->name = $request->input('name'); $component->category_id = $request->input('category_id'); + $component->supplier_id = $request->input('supplier_id'); $component->location_id = $request->input('location_id'); $component->company_id = Company::getIdForCurrentUser($request->input('company_id')); $component->order_number = $request->input('order_number', null); @@ -145,6 +146,7 @@ class ComponentsController extends Controller // Update the component data $component->name = $request->input('name'); $component->category_id = $request->input('category_id'); + $component->supplier_id = $request->input('supplier_id'); $component->location_id = $request->input('location_id'); $component->company_id = Company::getIdForCurrentUser($request->input('company_id')); $component->order_number = $request->input('order_number'); diff --git a/app/Http/Controllers/Consumables/ConsumablesController.php b/app/Http/Controllers/Consumables/ConsumablesController.php index f068e9868d..0a40c0bb3b 100644 --- a/app/Http/Controllers/Consumables/ConsumablesController.php +++ b/app/Http/Controllers/Consumables/ConsumablesController.php @@ -68,6 +68,7 @@ class ConsumablesController extends Controller $consumable = new Consumable(); $consumable->name = $request->input('name'); $consumable->category_id = $request->input('category_id'); + $consumable->supplier_id = $request->input('supplier_id'); $consumable->location_id = $request->input('location_id'); $consumable->company_id = Company::getIdForCurrentUser($request->input('company_id')); $consumable->order_number = $request->input('order_number'); @@ -144,6 +145,7 @@ class ConsumablesController extends Controller $consumable->name = $request->input('name'); $consumable->category_id = $request->input('category_id'); + $consumable->supplier_id = $request->input('supplier_id'); $consumable->location_id = $request->input('location_id'); $consumable->company_id = Company::getIdForCurrentUser($request->input('company_id')); $consumable->order_number = $request->input('order_number');