@extends('layouts/inventory_layout') @section('title', '| ' . $pageTitle) @section('content')
New Product
{!! Form::open([ 'url' => '', 'enctype' => 'multipart/form-data', 'role' => 'form', 'class' => 'form-horizontal form-groups', ]) !!} {!! Form::text('id', $product->id, ['class' => 'form-control hidden', 'id' => 'id', 'type' => 'text']) !!}
{!! Form::label('name', 'Product Name: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('name', $product->name, [ 'class' => 'form-control', 'id' => 'name', 'type' => 'text', 'placeholder' => 'Enter product name', ]) !!}

{!! Form::label('description', 'Decscription:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::textarea('description', $product->description, [ 'class' => 'form-control', 'id' => 'description', 'rows' => 2, 'placeholder' => 'Enter description', ]) !!}

{!! Form::label('supplierId', 'Supplier Name: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('supplierId', $suppliers, $product->supplierId, [ 'class' => 'form-control custom-select2', 'id' => 'supplierId', 'placeholder' => 'Please Select Supplier Name', ]) !!}

{!! Form::label('productGroupId', 'Group: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productGroupId', $productGroups, $product->group_id, [ 'class' => 'form-control custom-select2', 'id' => 'productGroupId', 'placeholder' => 'Please Select Product Group', ]) !!}

{!! Form::label('productCategoryId', 'Category: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productCategoryId', $productCategories, $product->category_id, [ 'class' => 'form-control custom-select2', 'id' => 'productCategoryId', 'placeholder' => 'Please Select Prduct Category', ]) !!}

{!! Form::label('productSubCategoryId', 'Sub Category: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productSubCategoryId', $productSubCategories, $product->sub_category_id, [ 'class' => 'form-control custom-select2', 'id' => 'productSubCategoryId', 'placeholder' => 'Please Select Prduct SubCategory', ]) !!}

{!! Form::label('productBrandId', 'Brand: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productBrandId', $productBrands, $product->brand_id, [ 'class' => 'form-control custom-select2', 'id' => 'productBrandId', 'placeholder' => 'Please Select Prduct Brand', ]) !!}

{!! Form::label('productModelId', 'Model: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productModelId', $productModels, $product->model_id, [ 'class' => 'form-control custom-select2', 'id' => 'productModelId', 'placeholder' => 'Please Select Prduct Model', ]) !!}

{!! Form::label('productSizeId', 'Size: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productSizeId', $productSizes, $product->size_id, [ 'class' => 'form-control custom-select2', 'id' => 'productSizeId', 'placeholder' => 'Please Select Prduct Size', ]) !!}

{!! Form::label('productColorId', 'Color: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productColorId', $productColors, $product->color_id, [ 'class' => 'form-control custom-select2', 'id' => 'productColorId', 'placeholder' => 'Please Select Prduct Color', ]) !!}

{!! Form::label('productUomId', 'UOM: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('productUomId', $productUoms, $product->uom_id, [ 'class' => 'form-control custom-select2', 'id' => 'productUomId', 'placeholder' => 'Please Select UOM', ]) !!}

{!! Form::label('costPrice', 'Cost Price: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('costPrice', $value = $product->cost_price, [ 'class' => 'form-control', 'id' => 'costPrice', 'type' => 'text', 'placeholder' => 'Enter cost price', ]) !!}

{!! Form::label('openingStock', 'Opening Stock: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('openingStock', $value = $product->opening_stock, [ 'class' => 'form-control', 'id' => 'openingStock', 'type' => 'text', 'placeholder' => 'Enter opening stock', ]) !!}

{!! Form::label('openingStockAmount', 'O. Stock Amount: *', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('openingStockAmount', $value = $product->opening_stock_amount, [ 'class' => 'form-control', 'id' => 'openingStockAmount', 'type' => 'text', 'placeholder' => 'Enter opening stock amount', ]) !!}

{!! Form::label('minimumStock', 'Minimum Stock:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('minimumStock', $value = $product->minimum_stock, [ 'class' => 'form-control', 'id' => 'minimumStock', 'type' => 'text', 'placeholder' => 'Enter minimum stock', ]) !!}
{!! Form::label('barcode', 'Barcode:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('barcode', $value = $product->barcode, [ 'class' => 'form-control', 'readonly', 'id' => 'barcode', 'type' => 'text', 'placeholder' => 'Enter Barcode', 'required' => 'required', ]) !!}

{!! Form::label('barcodeImage', 'Barcode Image:', ['class' => 'col-sm-4 control-label']) !!}
@if ($product->barcode) {!! DNS1D::getBarcodeHTML($product->barcode, 'C128', 1.4, 22) !!} @endif
{!! Form::label('systemBarcode', 'System Barcode:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('systemBarcode', $product->system_barcode, [ 'class' => 'form-control', 'id' => 'systemBarcode', 'type' => 'text', 'placeholder' => 'Enter system barcode', ]) !!}
{!! Form::label('warranty', 'Warranty:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('warranty', $product->warranty, [ 'class' => 'form-control', 'id' => 'warranty', 'type' => 'text', 'placeholder' => 'Enter warranty', ]) !!}
{!! Form::label('serviceWarranty', 'Service Warranty:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('serviceWarranty', $product->service_warranty, [ 'class' => 'form-control', 'id' => 'serviceWarranty', 'type' => 'text', 'placeholder' => 'Enter service warranty', ]) !!}
{!! Form::label('compresserWarranty', 'Compresser Warranty:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('compresserWarranty', $product->compresser_warranty, [ 'class' => 'form-control', 'id' => 'compresserWarranty', 'type' => 'text', 'placeholder' => 'Enter compresser warranty', ]) !!}
{!! Form::label('image_path', 'Upload Image:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::file('image_path', $value = null, ['class' => 'form-control', 'id' => 'image_path', 'type' => 'file']) !!}
{!! Form::label('update', ' ', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::submit('Update', ['id' => 'add', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}
@endsection