@foreach ($profile as $pic) @if ($invoice->branch == $pic->branch)

{{ $pic->name }}

{{ $pic->address }}
{{ $pic->phno1 ? $pic->phno1 : $pic->phno2 }}

@endif @endforeach {{--
26-08-2025
--}}
Sale ID: {{ $invoice->invoice_no }} 26-08-2025

Employee: {{ auth()->user()->name }}
Customer: {{ $invoice->customer_name }}
Phone: {{ $invoice->phno }}
Address: {{ $invoice->address }}

@foreach ($invoices as $invoice) @php $groupedSells = $invoice->sells->groupBy('exp_date'); $totalAmount = 0; $totalDiscount = 0; @endphp @foreach ($invoice->sells as $sell) @endforeach @endforeach {{-- --}} @foreach ($payment_methods as $index => $payment_method) @endforeach
Item Name. Qty Price Discounts Total
{{ $sell->part_number }} {{ $sell->product_qty }} @if ($invoice->sale_price_category == 'Default') @if ($invoice->type == 'Whole Sale') {{ number_format($sell->product_price ?? 0, 2) }} @else {{ number_format($sell->retail_price ?? 0, 2) }} @endif @elseif ($invoice->sale_price_category == 'Whole Sale') {{ number_format($sell->product_price ?? 0, 2) }} @elseif ($invoice->sale_price_category == 'Retail') {{ number_format($sell->retail_price ?? 0, 2) }} @else {{ number_format($sell->retail_price ?? 0, 2) }} @endif {{ number_format($sell->discount ?? 0, 2) }} @php $totalDiscount += $sell->discount; @endphp @if ($invoice->sale_price_category == 'Default') @if ($invoice->type == 'Whole Sale') {{ number_format($sell->product_price * $sell->product_qty - $sell->discount ?? 0, 2) }} @else {{ number_format($sell->retail_price * $sell->product_qty - $sell->discount ?? 0, 2) }} @endif @elseif ($invoice->sale_price_category == 'Whole Sale') {{ number_format($sell->product_price * $sell->product_qty - $sell->discount ?? 0, 2) }} @elseif ($invoice->sale_price_category == 'Retail') {{ number_format($sell->retail_price * $sell->product_qty - $sell->discount ?? 0, 2) }} @else {{ number_format($sell->retail_price * $sell->product_qty - $sell->discount ?? 0, 2) }} @endif
Total {{ number_format($invoice->total ?? 0, 2) }}
Overall Discount {{ number_format($invoice->discount_total ?? 0, 2) }}
Item Discount {{ number_format($totalDiscount ?? 0, 2) }}
@if ($index == 0) Payment - @endif {{ $payment_method->payment_method }} {{ number_format($payment_method->payment_amount ?? 0, 2) }}
Remaining Balance {{ number_format($invoice->remain_balance ?? 0, 2) }}