Added supplier id to controllers

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-13 11:12:01 -07:00
parent ab7c75232b
commit 07c0a1927b
2 changed files with 4 additions and 0 deletions

View file

@ -71,6 +71,7 @@ class ComponentsController extends Controller
$component = new Component(); $component = new Component();
$component->name = $request->input('name'); $component->name = $request->input('name');
$component->category_id = $request->input('category_id'); $component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id'); $component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id')); $component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number', null); $component->order_number = $request->input('order_number', null);
@ -145,6 +146,7 @@ class ComponentsController extends Controller
// Update the component data // Update the component data
$component->name = $request->input('name'); $component->name = $request->input('name');
$component->category_id = $request->input('category_id'); $component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id'); $component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id')); $component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number'); $component->order_number = $request->input('order_number');

View file

@ -68,6 +68,7 @@ class ConsumablesController extends Controller
$consumable = new Consumable(); $consumable = new Consumable();
$consumable->name = $request->input('name'); $consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id'); $consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id'); $consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id')); $consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number'); $consumable->order_number = $request->input('order_number');
@ -144,6 +145,7 @@ class ConsumablesController extends Controller
$consumable->name = $request->input('name'); $consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id'); $consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id'); $consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id')); $consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number'); $consumable->order_number = $request->input('order_number');