@if(isset($type))

{{isset($business_details) && isset($business_details->name) ? $business_details->name :'PEARL ISLAND INN- HOTEL BAR & RESTAURANT'}}

{{isset($business_details) && isset($business_details->address) ? $business_details->address :'NO-603, HOSPITAL ROAD,'}} {{isset($business_details) && isset($business_details->city) ? $business_details->city :'JAFFNA'}}

{{isset($business_details) && isset($business_details->mobile) ? $business_details->mobile :' '}}, {{isset($business_details) && isset($business_details->phone) ? $business_details->phone :' '}}

{{isset($business_details) && isset($business_details->email) ? $business_details->email :'admin@gmail.com'}}


@php $order_type = ''; if($transaction->room_id && $transaction->order_type == 'Room Order') { $room_get = App\Models\RoomAssign::find($transaction->room_id); $order_type = $transaction->order_type .'(' .$room_get->room_id. ')'; } if($transaction->table_id && $transaction->order_type == 'Dine in') { $table = App\Models\Table::find($transaction->table_id); $order_type = $transaction->order_type .'(' .$table->table_name. ')'; } if($transaction->order_type == 'Take away') { $order_type = $transaction->order_type; } if($transaction->order_type == 'Online') { $order_type = $transaction->order_type; } @endphp
IN No.: {{$transaction->invoice_no ?? ''}} {{ date('Y-m-d H:i:s A')}}
OD No.: {{$transaction->lines_of_sell->first() ? $transaction->lines_of_sell->first()->order_no : ''}} OT: {{ $order_type }}
Customer: {{ $transaction->customer->first_name ?? ''}}
Waiter: {{ $transaction->staff->first_name ?? ''}}

@foreach($transaction->lines_of_sell as $line) @endforeach
{{$line->product->name ?? ''}} {{$line->quantity ?? 0}} x {{$line->unit_price ?? '0.00'}} @if($line->discount_amount > 0)
Discount: {{number_format($line->discount_amount, 2)}} @endif
{{$line->sub_total ?? '0.00'}}
@php $payments = App\Models\TransactionPayment::where('transaction_id', $transaction->id); $payment = $payments->first(); $paid = $payments->sum('amount'); $due = $transaction->final_total - $paid; $tax = $transaction->tax_amount > 0 ? ($transaction->tax_amount /100) * $transaction->lines_of_sell->sum('sub_total') : 0; @endphp @if(isset($payment)) @endif
Sub Total: {{number_format($transaction->lines_of_sell->sum('sub_total'), 2)}}
Sevice Charge : {{$transaction->service_charge}}
Tax : {{$tax > 0 ? number_format($tax, 2) : '0.00'}}
Discount : {{$transaction->discount_amount > 0 ? number_format($transaction->discount_amount, 2) : '0.00'}}
Total: {{$transaction->final_total > 0 ? number_format($transaction->final_total, 2) : '0.00'}}
Total Items: {{$transaction->lines_of_sell->sum('quantity')}}
{{$payment->method}}: {{$payment->amount > 0 ? number_format($payment->amount, 2) : '0.00'}}
Balance: {{ $due < 0 ? number_format(str_replace('-', '', $due), 2) : '0.00'}}

Thank you come again

Software by Loopdigi - +94768271573
@else @if($business_details->printer_display == 'DirectPrint')
@php $order_type = ''; if($transaction->room_id && $transaction->order_type == 'Room Order') { $room_get = App\Models\RoomAssign::find($transaction->room_id); $order_type = $transaction->order_type .'(' .$room_get->room_id. ')'; } if($transaction->table_id && $transaction->order_type == 'Dine in') { $table = App\Models\Table::find($transaction->table_id); $order_type = $transaction->order_type .'(' .$table->table_name. ')'; } if($transaction->order_type == 'Take away') { $order_type = $transaction->order_type; } if($transaction->order_type == 'Online') { $order_type = $transaction->order_type; } @endphp

KOT

{{ $order_type }}

IN No.: {{$transaction->invoice_no ?? ''}} {{ date('Y-m-d H:i:s A')}}
OD No.: {{$transaction->lines_of_sell->first() ? $transaction->lines_of_sell->first()->order_no : ''}} Customer: {{ $transaction->customer->first_name ?? ''}}
Waiter: {{ $transaction->staff->first_name ?? ''}}
@php $total_qty = 0 @endphp @foreach($products ?? [] as $kyy => $product) @php $line = App\Models\TransactionSellLine::where('transaction_id', $transaction->id) ->where('product_id',$product['product_id'])->first(); $total_qty += $product['quantity']; @endphp @if($line->product->is_kot == 1) @endif @endforeach
Item Qty
{{$line->product->name ?? ''}} {{$product['quantity']}}

Total Items:

{{$transaction->lines_of_sell->where('order_no', $orderNo)->sum('quantity')}}

Created by Loopdigi - +94768271573
@endif @endif