@extends('layouts.app', ['stock_report' => true]) @section('title', __('Stock Report ')) @section('content')

{{ __('report.stock_report') }}

@component('components.filters', ['title' => __('report.filters')]) {!! Form::open([ 'url' => action('ReportController@getNewStockReport'), 'method' => 'get', 'id' => '', ]) !!}
{!! Form::label('location_id', __('purchase.business_location') . ':') !!} {!! Form::select('location_id', $business_locations, null, [ 'class' => 'form-control select2', 'style' => 'width:100%', ]) !!}
{!! Form::label('category_id', __('category.category') . ':') !!} {!! Form::select('category', $categories, null, [ 'placeholder' => __('messages.all'), 'class' => 'form-control select2', 'style' => 'width:100%', 'id' => 'category_id', ]) !!}
{!! Form::label('sub_category_id', __('product.sub_category') . ':') !!} {!! Form::select('sub_category', [], null, [ 'placeholder' => __('messages.all'), 'class' => 'form-control select2', 'style' => 'width:100%', 'id' => 'sub_category_id', ]) !!}
{!! Form::label('brand', __('product.brand') . ':') !!} {!! Form::select('brand', $brands, null, [ 'placeholder' => __('messages.all'), 'class' => 'form-control select2', 'style' => 'width:100%', ]) !!}
{!! Form::label('active_state', 'Active Status:') !!}
{!! Form::label('unit', __('product.unit') . ':') !!} {!! Form::select('unit', $units, null, [ 'placeholder' => __('messages.all'), 'class' => 'form-control select2', 'style' => 'width:100%', ]) !!}
@if ($show_manufacturing_data)

@endif
@lang('Reset') {!! Form::close() !!} @endcomponent
@can('view_product_stock_value')
@component('components.widget', ['class' => 'box-solid'])
@lang('report.closing_stock') (@lang('lang_v1.by_purchase_price')) @lang('report.closing_stock') (@lang('lang_v1.by_sale_price')) @lang('lang_v1.potential_profit') @lang('lang_v1.profit_margin')

@endcomponent
@endcan
@component('components.widget', ['class' => 'box-solid'])
@can('view_product_stock_value') @endcan @if ($show_manufacturing_data) @endif @php $current_stock = 0; $total_mfg_stock = 0; $current_stock_value = 0; $stock_price = 0; $current_stock_sell_value = 0; $total_potential_profit = 0; $total_total_sold = 0; $total_total_transfered = 0; $total_total_adjusted = 0; @endphp @foreach ($products as $product) @can('view_product_stock_value') @endcan @if ($show_manufacturing_data) @endif @php $current_stock += $stock; $total_mfg_stock += $total_mfg_stock; $current_stock_value += $stock_price; $current_stock_sell_value += $selling_stock_price; $total_potential_profit += $potential_profit; $total_total_sold += $product->total_sold; $total_total_transfered += $product->total_transfered; $total_total_adjusted += $product->total_adjusted; @endphp @endforeach
SKU @lang('business.product') @lang('product.category') @lang('sale.location') @lang('purchase.unit_selling_price') @lang('report.current_stock')@lang('lang_v1.total_stock_price')
(@lang('lang_v1.by_purchase_price'))
@lang('lang_v1.total_stock_price')
(@lang('lang_v1.by_sale_price'))
@lang('lang_v1.potential_profit')@lang('report.total_unit_sold') @lang('lang_v1.total_unit_transfered') @lang('lang_v1.total_unit_adjusted')@lang('manufacturing::lang.current_stock_mfg') @show_tooltip(__('manufacturing::lang.mfg_stock_tooltip'))
{{ $product->sku }} {{ $product->category_name }} {{ $product->category }} {{ $product->location_name }} {{ $transactionUtil->num_f($product->unit_price) }}
{{ $transactionUtil->num_f($product->stock) }} {{ $product->unit }}{{ $transactionUtil->num_f($product->stock_price) }} @php $stock = $product->stock ? $product->stock : 0; $unit_selling_price = (float) $product->group_price > 0 ? $product->group_price : $product->unit_price; $selling_stock_price = $stock * $unit_selling_price; @endphp {{ $transactionUtil->num_f($selling_stock_price) }} @php $stock = $product->stock ? $product->stock : 0; $unit_selling_price = (float) $product->group_price > 0 ? $product->group_price : $product->unit_price; $stock_price_by_sp = $stock * $unit_selling_price; $potential_profit = (float) $stock_price_by_sp - (float) $product->stock_price; @endphp {{ $transactionUtil->num_f($potential_profit) }}{{ $transactionUtil->num_f($product->total_sold) }} {{ $product->unit }} {{ $transactionUtil->num_f($product->total_transfered) }} {{ $product->unit }} {{ $transactionUtil->num_f($product->total_adjusted) }} {{ $product->unit }} @php $total_mfg_stock = 0; if ($product->total_mfg_stock) { $total_mfg_stock = (float) $product->total_mfg_stock; } @endphp {{ $transactionUtil->num_f($total_mfg_stock) }}
Showing {{ $products->firstItem() }} to {{ $products->lastItem() }} of {{ $products->total() }} entries
{{ $products->appends(request()->input())->links() }}
@endcomponent
@endsection @section('javascript') @endsection