{{-- Included on component show page to list all invoices for this component --}}
| Invoice # | Supplier | Date | Supplier Part # | Qty | Unit Price | Tariff | Extended | COO | HTS |
|---|---|---|---|---|---|---|---|---|---|
| {{ $line->invoice->invoice_number }} | {{ $line->invoice->supplier->name ?? '—' }} | {{ $line->invoice->invoice_date->format('M j, Y') }} | {{ $line->supplier_part_number ?: '—' }} |
{{ $line->qty_shipped ?: $line->qty_ordered }} | ${{ number_format($line->unit_price, 4) }} | {{ $line->tariff_amount > 0 ? '$'.number_format($line->tariff_amount,2) : '—' }} | ${{ number_format($line->extended_price, 2) }} | {{ $line->country_of_origin ?: '—' }} | {{ $line->hs_code ?: '—' }} |
| Total Purchased: | {{ $invoiceLines->sum('qty_shipped') }} | Avg: ${{ $invoiceLines->count() ? number_format($invoiceLines->avg('unit_price'),4) : '0' }} | ${{ number_format($invoiceLines->sum('tariff_amount'),2) }} | ${{ number_format($invoiceLines->sum('extended_price'),2) }} | |||||