@if(getDefaultPrinter()==1) @php $settings = new App\Models\MasterSetting(); $site = $settings->siteData(); $invoice = \App\Models\OnlineOrder::find($id); $branch = \App\Models\User::find($invoice->branch_id); @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->order_number }}
Date: {{ \Carbon\Carbon::parse($invoice->date)->format('d/m/Y g:i A') }}
Preferred Delivery : {{ \Carbon\Carbon::parse($invoice->preferred_delivery_time)->format('d/m/Y g:i A') }}

@php $qty = 0; @endphp @foreach ($invoice->details 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) }}
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) }}

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

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

@else {{__('main.print')}} @php $settings = new App\Models\MasterSetting(); $site = $settings->siteData(); $invoice = App\Models\OnlineOrder::where('id',$id)->first(); $branch = \App\Models\User::find($invoice->branch_id); if(Auth::user()->user_type==2) { $invoice = \App\Models\OnlineOrder::where('id',$id)->first(); } /* if the user is branch */ if(Auth::user()->user_type==3) { $nvoice = \App\Models\OnlineOrder::where('id',$id)->where('branch_id',Auth::user()->id)->first(); } if(!$invoice){ abort(404); } @endphp

Tax Invoice

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

{{getCompanyTaxRegistration()}}

@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
# {{ $invoice->order_number }}

Date : {{ \Carbon\Carbon::parse($invoice->date)->format('d/m/Y g:i A') }}

Preferred Date : {{ \Carbon\Carbon::parse($invoice->preferred_delivery_date)->format('d/m/Y g:i A') }}

Invoice To

{{$invoice->customer_name}}

{{$invoice->address}} {{ getCountryCode() }} {{$invoice->customer->phone}}


@php $qty = 0; @endphp @foreach ($invoice->details as $row) @php $qty = $qty + $row->product_quantity; @endphp @endforeach
# {{__('print.item')}} {{__('main.rate')}} {{__('main.qty')}} {{__('main.tax')}} {{__('main.tax_amount')}} {{__('main.total')}}
{{$loop->index+1}}
{{ $row->item_name }}
{{ getFormattedCurrency($row->rate) }}
{{ $row->quantity }} @if ($row->type == 2) {{ getUnitType($row->unit_type ?? '') }} @endif
{{$invoice->tax_percentage }} %
{{ getFormattedCurrency($row->tax_amount) }}
{{ getFormattedCurrency($row->total, 2) }}
Total
{{ getFormattedCurrency($invoice->tax_amount) }}
{{ getFormattedCurrency($invoice->taxable_amount) }}

{{ isset($site['default_thanks_message']) && !empty($site['default_thanks_message']) ? $site['default_thanks_message'] : 'Thank You for Doing business with us' }} !

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) }}

Powered by {{ getApplicationName() }}

@endif