@php use App\Models\BusinessSetting; $company_phone =BusinessSetting::where('type', 'company_phone')->first()->value; $company_email =BusinessSetting::where('type', 'company_email')->first()->value; $company_name =BusinessSetting::where('type', 'company_name')->first()->value; $company_web_logo =BusinessSetting::where('type', 'company_web_logo')->first()->value; $company_mobile_logo =BusinessSetting::where('type', 'company_mobile_logo')->first()->value; @endphp
sjfkldfj

Ph:{{$company_phone}}

Email:{{$company_email}}

INVOICE

Invoice id

{{ $order->id }}

{{-- --}}

Invoice To,

{{$order->customer['f_name'].' '.$order->customer['l_name']}}

{{$order->customer['email']}}

{{$order->customer['phone']}}

{{$order->shipping ? $order->shipping['city'] : ""}} {{$order->shipping ? $order->shipping['zip'] : ""}}

{{$order->shipping ? $order->shipping['country'] : ""}}

Seller

{{ $order->sellerName->seller ? $order->sellerName->seller ? $order->sellerName->seller->f_name. ' '.$order->sellerName->seller->l_name : "Not Set" : "Not Set" }}

Payments Details

{{ $order->payment_method }}

{{$order->payment_status}}, {{date('y-m-d',strtotime($order['created_at']))}}


@php $subtotal=0; $total=0; $sub_total=0; $total_tax=0; $total_shipping_cost=0; $total_discount_on_product=0; $main_total=0; @endphp @foreach($order->details as $key=>$details) @php $subtotal=($details['price'])*$details->qty @endphp @php $sub_total+=$details['price']*$details['qty']; $total_tax+=$details['tax']; $total_shipping_cost+=$details->shipping ? $details->shipping->cost :0; $total_discount_on_product+=$details['discount']; $total+=$subtotal; $main_total = $sub_total+$total_tax+$total_shipping_cost -$total_discount_on_product; @endphp @endforeach
No. Item Description Variation Unit Price Qty Total
{{$key+1}} {{$details['product']?$details['product']->name:''}} {{$details['variant'] }} {{\App\CPU\BackEndHelper::usd_to_currency($details['price'])}} {{\App\CPU\BackEndHelper::currency_code()}} {{$details->qty}} {{\App\CPU\BackEndHelper::usd_to_currency($subtotal)}} {{\App\CPU\BackEndHelper::currency_code()}}
Sub Total {{\App\CPU\BackEndHelper::usd_to_currency($sub_total)}} {{\App\CPU\BackEndHelper::currency_code()}}
TAX {{\App\CPU\BackEndHelper::usd_to_currency($total_tax)}} {{\App\CPU\BackEndHelper::currency_code()}}
Shipping {{\App\CPU\BackEndHelper::usd_to_currency($total_shipping_cost)}} {{\App\CPU\BackEndHelper::currency_code()}}
Coupon Discount - {{\App\CPU\BackEndHelper::usd_to_currency($order->discount)}} {{\App\CPU\BackEndHelper::currency_code()}}
Discount on Product - {{\App\CPU\BackEndHelper::usd_to_currency($total_discount_on_product)}} {{\App\CPU\BackEndHelper::currency_code()}}
Total {{\App\CPU\BackEndHelper::usd_to_currency($main_total)}} {{\App\CPU\BackEndHelper::currency_code()}}

















Phone : {{\App\Models\BusinessSetting::where('type','company_phone')->first()->value}}

Website : {{url('/')}}

Email : {{$company_email}}