@extends('layouts/inventory_layout') @section('title', '| '.$moduleTitle) @section('content') @include('successMsg')
{{$moduleTitle}}
Bill No : {{'BR'.$data->branch_requisition_no}} Bill Date : {{date('d-m-Y', strtotime($data->branch_requisition_date))}} From Branch : {{$data->inv_branch->name}}
Total Quantity : {{$data->total_quantity}} To Branch : {{$data->inv_to_branch->name}}


@php $no= $t_d_qty = $t_qty = $t_amount = $iRow = $current_stock = 0;@endphp @foreach($data->inv_branch_requisition_details as $details) @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->to_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->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