@if(isset($type))

{{isset($business_details) && isset($business_details->name) ? $business_details->name :'GDS - 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 :'Colombo'}}

{{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: {{$transaction->created_at ?? ''}}
OT: {{ $order_type }} User: {{ $transaction->staff->first_name ?? ''}}
Customer: {{ $transaction->customer->first_name ?? ''}}

@php $no = 1; @endphp @foreach($transaction->lines_of_sell as $line) @endforeach
No Item Amt
{{ $no++ }} {{$line->product->name ?? ''}} {{$line->product->sku_code ?? ''}} {{$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('customer_paid'); $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)}}
Tax : {{$tax > 0 ? number_format($tax, 2) : '0.00'}}
Discount : {{$transaction->discount_amount > 0 ? number_format($transaction->discount_amount, 2) : '0.00'}}
Total: {{$transaction->lines_of_sell->sum('sub_total') > 0 ? number_format($transaction->lines_of_sell->sum('sub_total'), 2) : '0.00'}}
Total Items: {{$transaction->lines_of_sell->sum('quantity')}}
{{$payment->method}}: {{$payment->amount > 0 ? number_format($payment->customer_paid, 2) : '0.00'}}
Balance: {{ $due < 0 ? number_format(str_replace('-', '', $due), 2) : '0.00'}}

No Service Charges


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 BILL =================== --}} @if(collect($products ?? [])->contains(function ($product) use ($transaction) { $line = App\Models\TransactionSellLine::where('transaction_id', $transaction->id) ->where('product_id', $product['product_id'])->first(); return $line && $line->product->is_kot == 1; }))

KOT

{{ $order_type }}

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

Total Items:

{{$total_qty}}

Created by Loopdigi - +94768271573
@endif {{-- =================== BOT BILL =================== --}} @if(collect($products ?? [])->contains(function ($product) use ($transaction) { $line = App\Models\TransactionSellLine::where('transaction_id', $transaction->id) ->where('product_id', $product['product_id'])->first(); return $line && $line->product->is_bot == 1; }))

BOT

{{ $order_type }}

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

Total Items:

{{$total_qty}}

Created by Loopdigi - +94768271573
@endif @endif @endif