@extends('print.layout') @section('title', 'Product_Info_' . ($product['article_no'] ?? 'N/A') . '_' . date('d-m-Y')) @section('content')
Product Information
{{-- Product Header Information --}}
Article No: {{ $product['article_no'] ?? 'N/A' }}
Product Name: {{ $product['name'] ?? 'N/A' }}
Unit: {{ $product['hname'] ?? 'N/A' }}
Category: {{ $product['cname'] ?? 'N/A' }}
Current Status: @if($product['product_status']) Active @else Inactive @endif
Sizes Available: @if($size->count()) @foreach($size as $item) {{ $item->name }}@if(!$loop->last), @endif @endforeach @else N/A @endif
{{-- Product Description --}} @if(isset($product['description']) && !empty($product['description']))

Product Description

{!! nl2br(e(strip_tags($product['description']))) !!}
@endif {{-- Product Types/Variations --}} @if(isset($totalMaterial) && count($totalMaterial) > 0)

Product Variations

@foreach($totalMaterial as $index => $variation)

{{ $variation['article_no'] ?? 'N/A' }} - {{ $variation['pname'] ?? 'N/A' }} (Size: {{ $variation['name'] ?? 'N/A' }})

{{-- Box Information --}} @php $boxInfo = $getMaterial->where('material_type_id', '61')->where('product_type_id', $variation['product_type_id'])->first(); @endphp @if($boxInfo)
Box Information:
Box No: {{ $boxInfo->material_no }}
Box Name: {{ $boxInfo->name }}
Quantity in Box: {{ 1/$boxInfo->quantity }} {{ $product['hname'] }}
@endif {{-- Material Costing Table --}} @php $mprice = 0; $loopIndex = 1; @endphp @foreach($getMaterial as $item) @if(($variation['product_type_id'] ?? null) === $item->product_type_id) @unless($item->material_type_id == '61') @php $mprice += $item->cprice * $item->quantity; @endphp @endunless @endif @endforeach
@endforeach
@endif {{-- Product Stages --}} @if(isset($stage) && $stage->count() > 0)

Production Stages

@foreach($stage as $item) @endforeach
@else

Production Stages

No Stages

@endif {{-- Opening Stock --}} @if(isset($openingStock) && $openingStock->count() > 0)

Opening Stock

@foreach($openingStock as $item) @endforeach
@endif {{-- Product Costing --}} @if(isset($pcost) && $pcost->count() > 0)

Product Costing / Wages

@foreach($pcost as $item) @endforeach
@endif @endsection