@extends('layouts.master') @section('title') {{translate('product')}} @endsection @section('content')
{{translate('product')}}
@if(Sentinel::hasAccess('stock.create')) {{translate('add product')}} @endif

{{ \App\Models\Product::sum('qty') }}

{{ translate('total item') }}

{{ currency_converter(\App\Helpers\GeneralHelper::stock_total_cost_amount()) }}

{{ translate('total cost value') }}

{{ currency_converter(\App\Helpers\GeneralHelper::stock_total_selling_amount()) }}

{{ translate('total selling value') }}

{{ currency_converter(\App\Helpers\GeneralHelper::stock_total_selling_amount()-\App\Helpers\GeneralHelper::stock_total_cost_amount()) }}

{{ translate('expected profit') }}
@foreach($data as $key) @endforeach
{{translate('id')}} {{translate('name')}} {{translate('code')}} {{translate('qty')}} {{translate('alert on')}} {{translate('cost_price')}} {{translate('selling_price')}} {{translate('category')}} {{ translate('action') }}
{{ $key->id }} @if(!empty($key->picture)) @endif {{ $key->name }} {{ $key->code }} {{ $key->qty }} {{ $key->alert_qty }} {{currency_converter($key->cost_price)}} {{currency_converter($key->selling_price)}} @foreach($key->categories as $category) @if(!empty($category->category)) {{$category->category->name}} @if(count($key->categories)!=$c) , @endif @endif @endforeach
@endsection @section('footer-scripts') @endsection