@extends('layouts/inventory_layout') @section('title', '| ' . $pageTitle) @section('content')
{{ $pageTitle }}
{!! Form::open(array('url' => '' , 'enctype' => 'multipart/form-data', 'role' => 'form', 'class'=>'form-horizontal form-groups')) !!}
{!! Form::hidden('opening_stock_id', $opening_stock->id, ['class' => 'form-control input-sm', 'id' => 'opening_stock_id']) !!}
{!! Form::label('branch_id', 'Branch:*', ['class' => 'col-sm-4 control-label'],false) !!}
{!! Form::select('branch_id', $branches,$opening_stock->branch_id, ['class' => 'form-control custom-select2', 'id' => 'branch_id','placeholder' => 'Select Branch','required'=>'required','autocomplete'=>'off','disable'=>'disable']) !!}

{!! Form::label('Opening Date', 'Opening Date:*', ['class' => 'col-sm-5 control-label'],false) !!}
{!! Form::text('opening_date', date('d-m-Y',strtotime($opening_stock->opening_date)), ['class'=>'form-control', 'id' => 'opening_date_id','readonly']) !!}

@if (!empty($hasCategories)) @php $serial = 0; @endphp @foreach ($hasCategories as $key => $hasCategory) @php $invProducts = App\Models\inventory\productConfig\InvProduct::where('category_id', '=' , $key)->get(); // dd($invProducts); @endphp @if (!empty($invProducts)) @foreach ($invProducts as $invProduct) @php $productInfoForDetails = App\Models\inventory\tools\InvOpeningStockDetails::select(DB::raw("sum(quantity) as t_quantity"),DB::raw("sum(cost_price) as t_cost_price"),DB::raw("sum(total_price) as t_total_price")) ->where('product_id',$invProduct->id)->where('branch_id',$opening_stock->branch_id)->groupBy('branch_id')->first(); $t_quantity = ($productInfoForDetails) ? $productInfoForDetails->t_quantity : '0'; $t_cost_price = ($productInfoForDetails) ? $productInfoForDetails->t_cost_price : $invProduct->cost_price; $t_total_price = ($productInfoForDetails) ? $productInfoForDetails->t_total_price : '0'; @endphp @endforeach @endif @endforeach @endif
Sl. Barcode Brand Product Name Model Sale Price Total Quantity* Cost Price* Total Price*
{{$hasCategories[$key]}}
{{ ++$serial }} {{ $invProduct->barcode }} {{ $invProduct->inv_brand->name }} {{ $invProduct->name }} {{ $invProduct->inv_model->name }} {{ round($invProduct->sales_price,2) }} /home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 102
" name="quantity[]" placeholder="Total Quantity" value="{{ $t_quantity}}" class="custom-quantity" data-qid='
Warning: Undefined variable $invProduct in /home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 102

Warning: Attempt to read property "id" on null in /home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 102
' />
/home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 103
" name="opening_amount[]" value="{{ round($t_cost_price,2)}}" class="custom-costprice" data-qid='
Warning: Undefined variable $invProduct in /home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 103

Warning: Attempt to read property "id" on null in /home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 103
' />
/home/shikkhaplus/public_html/demo_bk/resources/views/inventory_me/tools/openingStock/edit.blade.php on line 104
" name="total_amount[]" value="{{ round($t_total_price,2)}}" class="custom-total" readonly />
Total
{!! Form::label('submit', ' ', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::submit('Update', ['id' => 'add', 'class' => 'btn btn-info']); !!} Close
{!! Form::close() !!}