@extends('layouts.master') @section('css') @endsection @section('title') Stock Transfer Request @endsection @section('content')
{{ $company->name }}
Mobile No : {{ $company->phone }}
Address : {{ $company->address }}
GST No : {{ $company->gst }}
{{ $transferRequest->inventoryVoucher?->voucher_number ?? '--' }}
{{ \Carbon\Carbon::parse($transferRequest->request_date)->format('d M Y') }}
{{ $transferRequest->branch?->name ?? '--' }}
{{ $transferRequest->sourceLocation->name }}
{{ $transferRequest->destinationLocation->name }}
{{ $transferRequest->remarks ?? '--' }}
| 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 }} |