@extends('print.layout')
@section('title', 'Product_Material_' . ($productType['article_no'] ?? 'N/A') . '_' . date('d-m-Y'))
@section('content')
Product Material Information
{{-- Product Information --}}
Article No:
{{ $productType['article_no'] ?? 'N/A' }}
Product Name:
{{ $productType['name'] ?? 'N/A' }}
Size:
{{ $productType['hname'] ?? 'N/A' }}
Unit:
{{ $productType['uname'] ?? 'N/A' }}
{{-- Product Packing Information --}}
@php $packingItem = $productMaterial->firstWhere('material_type_id', '61'); @endphp
@if($packingItem)
Product Packing
Box No:
{{ $packingItem->material_no ?? 'N/A' }}
Box Name:
{{ $packingItem->name ?? 'N/A' }}
Quantity in Box:
{{ $packingItem->quantity ? number_format(1/$packingItem->quantity, 2) : 'N/A' }} {{ $productType['uname'] ?? '' }}
@if(isset($packingItem->description) && !empty($packingItem->description))
Details:
{!! nl2br(e(strip_tags($packingItem->description))) !!}
@endif
@endif
{{-- Product Materials --}}
@if($productMaterial->count() > 0)
Product Materials
| Sr. |
Material No |
Material Name |
Quantity |
Unit |
@php $count = 1; @endphp
@foreach($productMaterial as $item)
@unless($item->material_type_id == '61')
| {{ $count++ }} |
{{ $item->material_no ?? 'N/A' }} |
{{ $item->name ?? 'N/A' }} |
{{ isset($item->quantity) ? number_format($item->quantity, 2) : 'N/A' }} |
{{ $item->hname ?? 'N/A' }} |
@endunless
@endforeach
@else
No materials defined for this product.
@endif
{{-- Summary --}}
Total Materials:
{{ $productMaterial->where('material_type_id', '!=', '61')->count() }}
@if($packingItem)
Packing Type:
{{ $packingItem->name ?? 'N/A' }}
@endif
@endsection