@extends('layouts.admin') @section('page-title') {{__('Manage Product & Services')}} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @section('action-btn')
{{-- --}}
@endsection @section('content')
{{ Form::open(['route' => ['productservice.index'], 'method' => 'GET', 'id' => 'product_service']) }}
{{ Form::label('category', __('Category'),['class'=>'form-label']) }} {{ Form::select('category', $category, null, ['class' => 'form-control select','id'=>'choices-multiple', 'required' => 'required']) }}
{{ Form::close() }}
@foreach ($productServices as $productService) @if(Gate::check('edit product & service') || Gate::check('delete product & service')) @endif @endforeach
{{__('Name')}} {{__('Sku')}} {{__('Sale Price')}} {{__('Purchase Price')}} {{__('Tax')}} {{__('Category')}} {{__('Unit')}} {{__('Quantity')}} {{__('Type')}} {{__('Action')}}
{{ $productService->name}} {{ $productService->sku }} {{ \Auth::user()->priceFormat($productService->sale_price) }} {{ \Auth::user()->priceFormat($productService->purchase_price )}} @if(!empty($productService->tax_id)) @php $taxes=\Utility::tax($productService->tax_id); @endphp @foreach($taxes as $tax) {{ !empty($tax)?$tax->name:'' }}
@endforeach @else - @endif
{{ !empty($productService->category)?$productService->category->name:'' }} {{ !empty($productService->unit())?$productService->unit()->name:'' }} {{$productService->quantity}} {{ $productService->type }} @can('edit product & service') @endcan @can('delete product & service')
{!! Form::open(['method' => 'DELETE', 'route' => ['productservice.destroy', $productService->id],'id'=>'delete-form-'.$productService->id]) !!} {!! Form::close() !!}
@endcan
@endsection