@php $settings = new App\Models\MasterSetting(); $site = $settings->siteData(); $invoice = \App\Models\Invoice::find($id); $branch = \App\Models\User::find($invoice->created_by); @endphp

{{ isset($site['company_name']) && !empty($site['company_name']) ? $site['company_name'] : '' }}

@if(Auth::user()->user_type != 2)

{{ $branch->address ?? '' }}

@if ($branch->phone)

{{ getCountryCode() }} {{ $branch->phone ?? '' }}


@endif @else @if (isset($site['company_mobile']) && !empty($site['company_mobile']))

{{ getCountryCode() }} {{ isset($site['company_mobile']) ? $site['company_mobile'] : ''}}


@endif @endif
SIMPLIFIED TAX INVOICE
{{isset($site['default_tax_name']) ? $site['default_tax_name'] : 'GST'}} No : {{ $site['company_tax_registration'] ?? 'No Tax' }}
Invoice No. : {{ $invoice->invoice_number }}
Date: {{ \Carbon\Carbon::parse($invoice->date)->format('d/m/Y g:i A') }}
File No : {{ $invoice->customer_file_number }}

@php $qty = 0; @endphp @foreach ($invoice->invoiceProductDetails as $row) @endphp @php $qty = $qty + $row->product_quantity; @endphp @endforeach
item rate qty total
{{ $row->item_name }} {{ getFormattedCurrency($row->rate) }} {{ $row->quantity }} @if ($row->type == 2) {{ getUnitType($row->unit_type ?? '') }} @endif {{ getFormattedCurrency($row->total, 2) }}

@php $paid = \App\Models\InvoicePayment::where('invoice_id', $invoice->id)->sum('paid_amount'); @endphp
Sub Total {{ getFormattedCurrency($invoice->sub_total) }}
Discount {{ getFormattedCurrency($invoice->discount) }}
Taxable Amount {{ getFormattedCurrency($invoice->taxable_amount) }}
Total {{isset($site['default_tax_name']) ? $site['default_tax_name'] : 'GST'}} ({{ $invoice->tax_percentage }}%) {{ getFormattedCurrency($invoice->tax_amount) }}
Total {{ getFormattedCurrency($invoice->total) }}
Advance {{ getFormattedCurrency($paid) }}
Balance {{ getFormattedCurrency($invoice->total - $paid) }}

{{ isset($site['default_thanks_message']) && !empty($site['default_thanks_message']) ? $site['default_thanks_message'] : '' }}

{{__('main.powered_by')}} {{ getApplicationName() }}