@extends('index') @section('content')

Product Info

{{-- General Info --}}
Article No: {{$product['article_no']}} Product Name: {{$product['name']}} Unit: {{$product['hname']}}
Category: {{$product['cname']}} Sizes: @foreach($size as $item) {{$item->name}}, @endforeach Current Status: @if($product['product_status']) Active @else Inactive @endif
Details:
@php echo $product['description'] @endphp
@if($stage->count())
Product Stages
@if($stage->count()) @foreach($stage as $item) @endforeach @endif
Sr. Stage
{{$loop->index + 1}} {{$item->name}}
@else
No Stages
@endif @if($openingStock->count())
Opening Stock
@foreach($openingStock as $item) @endforeach
Sr. Size Stage Quantity
{{$loop->index + 1}} {{$item->size_name}} {{$item->stage_name}} {{$item->quantity}}
@else
No Opening Stock
@endif @if($material->count())
Product Materials
@if($material->count()) @foreach($material as $item) @endforeach @endif
Sr. Material No Material Name Unit
{{$loop->index + 1}} {{$item->material_no}} {{$item->name}} {{$item->uname}}
@else
No Materials
@endif @if(isset($productComponents) && $productComponents->count())
Product Components (Other Products Used in Manufacturing)
@foreach($productComponents as $component) @endforeach
Sr. Article No Product Name Size Quantity
{{$loop->index + 1}} {{$component->article_no}} {{$component->product_name}} {{$component->size_name}} {{$component->quantity}}
@else
No Product Components
@endif @if($image->count())
Images
@foreach($image as $item)
@csrf
@endforeach
@else
No Images
@endif @if($file->count())
Files / Attachments
@foreach($file as $item)

{{($item->file_title)? $item->file_title:'Untitled File'}}

@csrf
@endforeach
@else
No Files / Attachments
@endif
{{-- Product Packing / Material --}}
@if(!$countMaterial > 0)
Product Material Add
@endif
@if($countMaterial > 0) @for($i=1; $i<=$countMaterial; $i++) @php $loopIndex = 1; @endphp
@foreach($totalMaterial as $item) @if(($totalMaterial[$i-1]['product_type_id'] ?? null) === $item->product_type_id)
Product Packing Edit
@php $item2 = $getMaterial->where('material_type_id', '61')->where('product_type_id', $totalMaterial[$i-1]['product_type_id'])->first(); @endphp @if($item2) @endif
Article No: {{$item->article_no}} Product Name: {{$item->pname}} Size: {{$item->name}}
Box No: {{$item2->material_no}} Box Name: {{$item2->name}} Quantity in Box: {{1/$item2->quantity}} {{$product['hname']}}
Details:
@php echo $item->description @endphp
@endif @endforeach
Product Material / Costing
@php $mprice = 0; @endphp @foreach($getMaterial as $item) @if(($totalMaterial[$i-1]['product_type_id'] ?? null) === $item->product_type_id) @unless($item->material_type_id == '61') @php $mprice += $item->cprice * $item->quantity; @endphp @endunless @endif @endforeach {{-- --}}
Sr. Material No Material Name Quantity Price Units
{{$loopIndex++}} {{$item->material_no}} {{$item->name}} {{$item->quantity}} {{$item->cprice * $item->quantity}} {{$item->hname}}
# Material Cost : {{$mprice}}
# Wages Cost: {{$pWages}}
# Total Cost: {{$mprice + $pWages}}
Sr. Material No Material Name Quantity Price Units
@endfor @endif
{{-- Product Costing --}}
Product Costing Edit
@if($pcost->count()) @foreach($pcost as $item) @endforeach @endif
Sr. Employee / Vendor Cost Head Price
{{$loop->index + 1}} {{$item->employee_no ?? $item->vendor_no}}{{$item->name ? ' - '.$item->name : 'General Cost'}} {{$item->hname}} {{$item->amount}}
Sr. Employee / Vendor Cost Head Price
@endsection