@extends('layouts.master') @section('title', 'Product Damage Invoice') @push('style') @endpush @section('content')

{{ optional($damage->company)->name }}

{{ optional($damage->company)->head_office }}
Email: {{ optional($damage->company)->email }}
Phone: {{ optional($damage->company)->phone_number }}
Invoice No: {{ $damage->invoice_no }}
Date : {{ $damage->date }}
@foreach($damage->details ?? [] as $detail) @endforeach
Sl Product Name Unit Quantity Price Amount
{{ $loop->iteration }} {{ optional($detail->product)->name }} {{ optional(optional($detail->product)->unit)->name }} {{ $detail->quantity }} {{ $detail->price }} {{ $detail->subtotal }}
Total {{ $damage->details->sum('quantity') }} {{ $damage->details->sum('subtotal') }}
@endsection