@extends('layouts/inventory_layout') @section('title', '| ' . $moduleTitle) @section('content')
{{ $moduleTitle }}
{!! Form::hidden('opening_stock_id', $data->id, ['class' => 'form-control input-sm', 'id' => 'issue_id']) !!}
{!! Form::label('Branch', 'Branch:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('branch_id', $data->inv_branch->name, ['class'=>'form-control', 'id' => 'branch_id_id','readonly']) !!}

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

@if (!empty($hasCategories)) @php $serial = 0; $iRow = 0; $totalQty = 0; $totalCostPrice = 0; $totalTotalPrice = 0; @endphp @foreach ($hasCategories as $key => $hasCategory) @php $invProducts = App\Models\inventory\productConfig\InvProduct::join('inv_opening_stock_details', 'inv_opening_stock_details.product_id', '=', 'inv_product.id') ->selectRaw("inv_product.id,inv_product.id,inv_product.group_id,inv_product.model_id,inv_product.category_id,inv_product.sub_category_id,inv_product.brand_id,inv_product.name,inv_product.barcode,inv_opening_stock_details.id as row_id,inv_opening_stock_details.opening_stock_id,inv_opening_stock_details.quantity,inv_opening_stock_details.cost_price,inv_opening_stock_details.total_price") ->where('inv_product.category_id', '=' , $key)->where('inv_opening_stock_details.branch_id', '=' , $data->branch_id)->get(); //dd($invProducts); @endphp @if (!empty($invProducts)) @foreach ($invProducts as $invProduct) @php $iRow++; $openingBarcodeQuantity = 0; $openingBarcodePrice = 0; $openingTotalPrice = 0; $openingBarcodeQuantity = ($invProduct->quantity) ? $invProduct->quantity : 0; $openingBarcodePrice = $invProduct->cost_price; $openingTotalPrice = $invProduct->total_price; $totalQty += $openingBarcodeQuantity; $totalCostPrice += $openingBarcodePrice; $totalTotalPrice += $invProduct->total_price; @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 }} {{ $invProduct->sales_price }} @if($isEditAccess == true) @else {{$openingBarcodeQuantity}} @endif {{ $openingBarcodePrice}} {{ $openingTotalPrice}}
Total {{ $totalQty}} {{ number_format($totalCostPrice,2)}} {{ number_format($totalTotalPrice,2)}}
@if($totalQty > 0) @include('gnr.tools.approvalConfig.approvalLogs') @if($data->authStatus != 'approved' && $data->authStatus != 'rejected') @include('inventory.tools.approvalSystem.invApprove') @endif @endif
@endsection