@php $branch = App\Models\Branch::where('id', $invoice->branch_id)->first(); // dd($branch); @endphp
@if (get_setting('inv_logo') == 'logo') logo @elseif (get_setting('inv_logo') == 'name')

{{ empty(get_setting('com_name')) ? 'Fast IT' : get_setting('com_name') }}

@else logo

{{ empty(get_setting('com_name')) ? 'Fast IT' : get_setting('com_name') }}

@endif {{--

{{ $branch->shop_name }}

--}}
{{ empty(get_setting('com_address')) ? 'Suite: 807,Shah Ali Plaza, Mirpur-10, Dhaka-1216.' : get_setting('com_address') }}
Mobile: +88 {{ empty(get_setting('com_phone')) ? '01784-159071' : get_setting('com_phone') }}
Email : {{ empty(get_setting('com_email')) ? 'fastitbd00@gmail.com' : get_setting('com_email') }} {{-- Address : {{ $branch->address }}
Mobile: +88 {{ $branch->phone }}
Email : {{ $branch->email }}
--}}

Sales Invoice

: {{ $invoice->user->name }}
: {{ date('d-M-Y h:i:s A', strtotime($invoice->created_at)) }}
: {{ $invoice->invoice_no }}
: {{ $invoice->customer->phone }}
@foreach ($invoice->invoiceItems as $key => $item) @php $product = App\Models\Product::where('id', $item->product_id) ->with('unit.related_unit') ->first(); if ($product->is_service == 0) { if ($product->unit->related_unit == null) { // Sub unit নাই → normal show $qty = $item->main_qty . ' ' . $product->unit->name; } else { // Sub unit আছে → সব convert হবে main unit এ $sub_qty = $item->sub_qty ?? 0; $related_value = $product->unit->related_value; // ১ main unit = কত sub unit // main_qty + sub_qty convert to main unit $total_main = $item->main_qty + $sub_qty / $related_value; // চূড়ান্ত show → শুধু main unit এ $qty = $total_main . ' ' . $product->unit->name; } } else { $qty = $item->main_qty . ' pcs'; } $cash = App\Models\BankTransaction::where('invoice_id', $invoice->id)->get(); $cash_amount = App\Models\BankTransaction::where('invoice_id', $invoice->id) ->where('bank_id', 1) ->sum('amount'); $return_amount_cash = (float) $cash_amount - $invoice->return_amount; @endphp @endforeach @if ($invoice->return_amount != 0) @endif @if($invoice->customer_id != 1) @endif @if ($invoice->pay_point != 0) @endif @if ($invoice->total_due > 0) @endif
SL Item Discount Rate Qty Amount
{{ ++$key }} {{ $item->product_discount }} {{ $item->rate }} {{ $qty }} {{ $item->subtotal }}

{{ $item->product->name }}

Sub Total : {{ $invoice->estimated_amount }}
Discount : @if (gettype($invoice->discount) === 'string') {{ $invoice->discount }} @else {{ $invoice->discount }} {{ empty(get_setting('com_currency')) ?: get_setting('com_currency') }} @endif
Total Amount : {{ $invoice->total_amount }}
Paid : {{ $invoice->total_paid }}
Return Amount : {{ $invoice->return_amount }}
Previous Due : {{ $invoice->previous_due }}
Current Due : {{ $invoice->total_due }}
{{--
  • --}} @foreach ($cash as $bank) {{ $bank->bank_account->bank_name }} Amount :
    @endforeach {{--
--}}
{{--
  • --}} @if ($invoice->return_amount != 0) {{ number_format($return_amount_cash, 2) }} @else @foreach ($cash as $bank) {{ number_format($bank->amount, 2) }}
    @endforeach @endif {{--
--}}
Pay Point : {{ number_format($invoice->pay_point, 2) }}
Change Amount: @if ($invoice->change_amount != null) {{ $invoice->change_amount }} @else 0.00 @endif
Total Due : {{ $invoice->total_due }} {{ empty(get_setting('com_currency')) ?: get_setting('com_currency') }}
Mode of Payment ( @foreach ($cash as $bank) {{ $bank->bank_account->bank_name }} , @endforeach)
@php $creadit = $invoice->total_paid - $invoice->return_amount; @endphp {{ number_format($creadit, 2) }}

***** The Product should be change within 7 days.Don't remove the tag can not be change *****

Thank you for Shopping at {{ empty(get_setting('com_name')) ? 'Fast IT' : get_setting('com_name') }}
{{--
Thank you for Shopping at {{ empty(get_setting('com_name')) ? 'Fast IT' : get_setting('com_name') }}
--}}