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

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

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


TOOLS REPORT


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

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

--}}

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

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

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

Request No

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

Request Date

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

Delivery Date

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

Installation Date

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

@php // Group items by their product category and include sort order $groupedItems = $materialReport->items->groupBy(function($item) { return $item->products->product_categories->product_category_name ?? 'Uncategorized'; }); // Prepare a sortable array with category names and sort orders $categoriesWithSortOrder = $itemTotals->groupBy('category_name') ->map(function ($items, $categoryName) { $sortOrder = $items->first()['sort_order']; 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
# Item Name Brand Model No Size Description Request Qty Issue Qty Return Qty Used Qty UOM
{{ $index + 1 }} {{ $item['product_name'] ?? '' }} {{ $item['product_brand'] ?? '' }} {{ $item['model_no'] ?? '' }} {{ $item['size'] ?? '' }} {{ $item['description'] ?? '' }} {{ $item['requested_qty'] ?? '' }} {{ $item['issued_qty'] ?? '' }} {{ $item['returned_qty'] ?? '' }} {{ $item['used_qty'] ?? '' }} {{ $item['uom'] ?? '' }}
@endforeach
Request Notes:

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

Request Terms:

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

Delivery Address:

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

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