@foreach($invoice?->items as $item)
@php
$subTotal = $subTotal + $item->price;
$discountAmount = $discountAmount + $item?->discount_amount;
@endphp
{{ $item->title }}
@if(!empty($item?->options['discount_code']))
Code: #{{$item?->options['discount_code'] }}
@endif
{{ $item->quantity}}
@if(!empty($item?->discount_amount))
{{ formatAmount($item->price) }}
{{ formatAmount($item->total) }}
@else
{{ formatAmount($item->price) }}
@endif
{{ formatAmount($item->total) }}
@endforeach
{{ __('invoices.invoice_subtotal') }}
{{ formatAmount($subTotal) }}