@extends('layouts.master') @section('title') Material Request Detail @endsection @section('page-title') Material Request Detail @endsection @section('body') @endsection @section('content')
material_request_id) }}" class="btn btn-info me-1"> Add Material Issue material_request_id) }}" target="_blank" class="btn btn-success me-1"> Print
logo
{{ $materialRequest->company->company_name ?? '' }}

{{ $materialRequest->company->company_address ?? '' }}, {{ $materialRequest->company->area->area_name ?? '' }}, {{ $materialRequest->company->city->city_name ?? '' }}, {{ $materialRequest->company->state->state_name ?? '' }}, {{ $materialRequest->company->country->country_name ?? '' }}, {{ $materialRequest->company->company_pincode ?? '' }}

GST No: {{ $materialRequest->company->company_gstin ?? '' }}, Email: {{ $materialRequest->company->company_email ?? '' }}, Phone No: {{ $materialRequest->company->company_phone_no_1 ?? '' }}


To,
{{ $materialRequest->customer->customer_name ?? 'Customer Name' }}

{{ $materialRequest->customerAddress->customer_address ?? 'Customer Address' }}, {{ $materialRequest->customerAddress->cusomer_pincode ?? 'Customer Pincode' }}, {{ $materialRequest->customerAddress->area->area_name ?? 'Customer Area' }}, {{ $materialRequest->customerAddress->city->city_name ?? 'Customer City' }}, {{ $materialRequest->customerAddress->state->state_name ?? 'Customer State' }}, {{ $materialRequest->customerAddress->country->country_name ?? 'Customer Country' }},

Phone No: {{ $materialRequest->customerAddress->customer_address_phone_no ?? $materialRequest->customer->customer_phone_no_1 }}

GST No: {{ $materialRequest->customer->customer_gstin ?? 'No GST' }}

Request No

{{ $materialRequest->material_request_prefix }}/{{ $materialRequest->material_request_financial_year }}/{{ $materialRequest->material_request_number }}

Request Date

{{ \Carbon\Carbon::parse($materialRequest->material_request_date)->format('d/m/Y') ?? '' }}

Delivery Date

{{ \Carbon\Carbon::parse($materialRequest->delivery_date)->format('d/m/Y') ?? '' }}


MATERIAL REQUEST


@php // Group items by their product category and include sort order $groupedItems = $materialRequest->items->groupBy(function($item) { return $item->products->product_categories->product_category_name ?? 'Uncategorized'; }); // Prepare a sortable array with category names and sort orders $categoriesWithSortOrder = $groupedItems->map(function ($items, $categoryName) { $sortOrder = $items->first()->products->product_categories->product_category_sort_order ?? 0; return [ 'category_name' => $categoryName, 'sort_order' => $sortOrder, 'items' => $items ]; })->sortBy('sort_order'); @endphp @foreach ($categoriesWithSortOrder as $category) @foreach ($category['items'] as $index => $item) @endforeach @endforeach
# Item Brand Model No Size Description Request Qty UOM
{{ $category['category_name'] }}
{{ $loop->parent->index + 1 }}.{{ $index + 1 }} {{ $item->products->product_name ?? '' }} {{ $item->products->product_brands->product_brand_name ?? '' }} {{ $item->products->product_model_no ?? '' }} {{ $item->products->product_size ?? '' }} {{ $item->item_description ?? '' }} {{ $item->item_qty }} {{ $item->products->product_unit_measurement ?? '' }}
@if ($materialRequest->material_request_note)
Request Notes:

{!! nl2br(e($materialRequest->material_request_note ?? '')) !!}

@endif @if ($materialRequest->material_request_terms)
Request Terms:

{!! nl2br(e($materialRequest->material_request_terms ?? '')) !!}

@endif
@if ($materialRequest->material_request_warehouse_id) @if ($materialRequest->material_request_warehouse_id == -1)
Delivery Address:

{{$materialRequest->delivery_address}}

@else

@if ($materialRequest->warehouse->warehouse_name) Warehouse Name: {!! $materialRequest->warehouse->warehouse_name ?? '' !!}

@else @endif

{!! $materialRequest->warehouse->warehouse_address ?? '' !!}, {!! $materialRequest->warehouse->area->area_name ?? '' !!}, {!! $materialRequest->warehouse->city->city_name ?? '' !!}, {!! $materialRequest->warehouse->warehouse_pincode ?? '' !!}, {!! $materialRequest->warehouse->state->state_name ?? '' !!}, {!! $materialRequest->warehouse->country->country_name ?? '' !!}

@endif @endif
From,




{{ $materialRequest->company->company_name ?? '' }}
@endsection @section('scripts') @endsection