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

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

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


TOOLS REQUEST


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

{{ $po->vendor->vendor_name ?? 'vendor Name' }}

--}}

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

Phone No: {{ $toolsRequest->customer->customer_phone_no_1 ?? '001-234-5678' }}

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

Request No

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

Request Date

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

Delivery Date

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

@php // Group items by their product category and include sort order $groupedItems = $toolsRequest->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)
{{ $category['category_name'] }}
{{-- --}} {{-- --}} @foreach ($category['items'] as $index => $item) {{-- --}} {{-- --}} @endforeach
Sr No Item Model No SizeHSN CodeDescription Request QtyStock QtyUOM
{{ $index + 1 }} {{ $item->products->product_name ?? '' }} {{ $item->products->product_model_no ?? '' }} {{ $item->products->product_size ?? '' }}{{ $item->products->product_hsn_code ?? '' }}{{ $item->item_description ?? '' }} {{ $item->item_qty }}{{ $item->productStock->qty ?? 0 }}{{ $item->products->product_unit_measurement ?? '' }}
@endforeach
Request Notes:

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

Request Terms:

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

Delivery Address:

{!! $toolsRequest->customerAddress->customer_address !!} {!! $toolsRequest->customerAddress->customer_pincode !!} {!! $toolsRequest->customerAddress->area->area_name !!} {!! $toolsRequest->customerAddress->city->city_name !!} {!! $toolsRequest->customerAddress->state->state_name !!} {!! $toolsRequest->customerAddress->country->country_name !!}

From,
{{ $toolsRequest->company->company_name ?? '' }}
@endsection @section('scripts') @endsection