@extends('layouts/inventory_layout') @section('title', '| '.$moduleTitle) @section('content') @include('successMsg')
{{$moduleTitle}}
Bill No : {{'ER'.$data->employee_requisition_no}} Bill Date : {{date('d-m-Y', strtotime($data->employee_requisition_date))}} Branch : {{$data->inv_branch->name}}
Total Quantity : {{$data->total_quantity}} To Employee : {{$data->inv_employee->emp_name_english}}


@php $no= $t_d_qty = $t_qty = $t_amount = $iRow = $current_stock = 0;@endphp @foreach($data->inv_employee_requisition_details as $details) {{-- @php $purchaseBarcodeQuantity = 0; $purchaseBarcodeQuantity = $details->quantity; @endphp --}} @php $iRow++; $purchaseBarcodeQuantity = 0; $purchaseBarcodePrice = 0; $current_stock = 0; if ($details->branch_id != null && $details->product_id != null) { $requestMe = new \Illuminate\Http\Request([ 'product_id' => $details->product_id, 'fromBranchId' => $details->branch_id, 'toBranchId' => $details->branch_id, ]); $current_stock = \App\Http\Controllers\inventory\service\InvServiceController::checkInventoryProductStock($requestMe); // $current_stock = ($current_stocks + $purchaseBarcodeQuantity); // dd($details->branch_id, $details->product_id, $requestMe); } $purchaseBarcodeQuantity = ($details->quantity <= $current_stock) ? $details->quantity : $current_stock; $purchaseBarcodePrice = $details->cost_price; @endphp @php $t_d_qty += $details->requested_qty; $t_qty += $purchaseBarcodeQuantity; $t_amount += ($purchaseBarcodeQuantity * $details->inv_product->cost_price); @endphp @endforeach
SL No. Product Name Uom Name Current Stock Demand Quantity
{{++$no}} {{$details->inv_product->name}} {{$details->inv_product->inv_uom->name}} {{ $current_stock }} {{ $details->requested_qty }} @if($isEditAccess == true) @else {{$purchaseBarcodeQuantity}} @endif
Total {{$t_d_qty}} {{$t_qty}}
@if($t_qty > 0) @include('gnr.tools.approvalConfig.approvalLogs') @if($data->authStatus != 'approved' && $data->authStatus != 'rejected') @include('inventory.tools.approvalSystem.invApprove') @endif @endif
@endsection