@extends('layouts.master') @section('css') @endsection @section('title') Stock Transfer Request @endsection @section('content')

STOCK TRANSFER REQUEST DETAILS

Go Back
Company

{{ $company->name }}

Mobile No : {{ $company->phone }}

Address : {{ $company->address }}

GST No : {{ $company->gst }}

VOUCHER NUMBER

{{ $transferRequest->inventoryVoucher?->voucher_number ?? '--' }}

REQUEST DATE

{{ \Carbon\Carbon::parse($transferRequest->request_date)->format('d M Y') }}

BRANCH

{{ $transferRequest->branch?->name ?? '--' }}

SOURCE LOCATION

{{ $transferRequest->sourceLocation->name }}

DESTINATION LOCATION

{{ $transferRequest->destinationLocation->name }}

REMARKS

{{ $transferRequest->remarks ?? '--' }}

Items

@foreach ($transferRequestItems as $item) @endforeach
Item Internal
Barcode
Qty Unit Price Total
{{ $item->stockItem->name }}
@if (Auth::user()->hasPermissionTo('approve stock transfer request')) @php $stockledger = \App\Models\StockLedger::select( 'stock_item_id', DB::raw( 'SUM(inwards) as total_inwards', ), DB::raw( 'SUM(outwards) as total_outwards', ), )->where( 'stock_item_id', $item->stock_item_id, ); $stockledger = $stockledger->where( 'stock_location_id', $transferRequest->source_stock_location_id, ); $stockledger = $stockledger ->groupBy('stock_item_id') ->first(); $inwards = 0; $outwards = 0; if ($stockledger) { $inwards = $stockledger->total_inwards; $outwards = $stockledger->total_outwards; } $stock_availability = $inwards - $outwards; @endphp @if ($stock_availability < 0) Stock:{{ $stock_availability }} @else Stock:{{ $stock_availability }} @endif @endif
{{ $item->stockItem->internal_barcode ?? '--' }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ $item->price }} {{ $item->total }}
Total {{ $transferRequest->total }}
@endsection @section('script') @endsection