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

{{ $pic->name }}

{{ $pic->address }}
{{ $pic->phno1 }}, {{ $pic->phno2 }}

@endif @endforeach

Sale ID: {{ $invoice->invoice_no }}
Customer : {{ $invoice->customer_name }}
Employee : {{ auth()->user()->name }}

@foreach ($invoices as $invoice) @foreach ($invoice->sells as $key => $sell) @endforeach @endforeach
Item Name. Sale Price Purchase Price Qty Total Purchase Sale
{{ $sell->part_number }} @if ($invoice->sale_price_category == 'Default') @if ($invoice->type == 'Whole Sale') {{ $sell->product_price }} @else {{ $sell->retail_price }} @endif @elseif ($invoice->sale_price_category == 'Whole Sale') {{ $sell->product_price }} @elseif ($invoice->sale_price_category == 'Retail') {{ $sell->retail_price }} @else {{ $sell->retail_price }} @endif {{ $sell->buy_price }} {{ $sell->product_qty }} {{ $sell->buy_price * $sell->product_qty }} @if ($invoice->sale_price_category == 'Default') @if ($invoice->type == 'Whole Sale') {{ $sell->product_price * $sell->product_qty }} @else {{ $sell->retail_price * $sell->product_qty }} @endif @elseif ($invoice->sale_price_category == 'Whole Sale') {{ $sell->product_price * $sell->product_qty }} @elseif ($invoice->sale_price_category == 'Retail') {{ $sell->retail_price * $sell->product_qty }} @else {{ $sell->retail_price * $sell->product_qty }} @endif
Total Purchase {{ $invoice->total_buy_price ?? 0 }}
Total Sale {{ $invoice->total ?? 0 }}
Discount {{ $invoice->discount_total ?? 0 }}
Cash {{ $invoice->deposit ?? 0 }}
Change Due {{ $invoice->remain_balance ?? 0 }}