@lang('Invoice')

@if(!empty(config('settings.site_logo')))   @endif

@lang('Order') # {{$order->getOrderId()}}


@lang('Billed To:')
{{$order->address->first_name}} {{$order->address->last_name}}
@lang('Phone:') {{$order->address->phone}}
@lang('Email:') {{$order->address->email}}
@lang('Shipping Address:')
{{$order->address->first_name}} {{$order->address->last_name}}
{{$order->address->address}}
{{$order->address->city}}, {{$order->address->state}} - {{$order->address->zip}}
{{$order->address->country}}.
@lang('Payment Method:')
{{$order->payment_method}}
{{$order->address->email}}
@lang('Order Date:')
{{$order->created_at->toFormattedDateString()}}

@if(!($order->is_processed)) @lang('Order Status:')
@if($order->stock_regained) @lang('Cancelled') @elseif($order->payment_method != 'Cash on Delivery' && $order->paid == 0) @lang('Failed') @else @lang('Pending') @endif @endif

@lang('Order summary')

@foreach($order->products as $product) @endforeach @if($order->coupon_amount && $order->coupon_amount > 0) @endif @if($order->wallet_amount && $order->wallet_amount > 0) @endif
@lang('Item') @lang('Price') @lang('Quantity') @lang('Total')
{{$product->name}} @if($product->pivot->spec && ($specs = unserialize($product->pivot->spec)))
@foreach($specs as $key => $spec) {{$spec['name']}}: {{$spec['value']}}@if(!$loop->last), @endif @endforeach @endif
{{currency_format($product->pivot->unit_price, $order->currency)}} {{$product->pivot->quantity}} {{currency_format($product->pivot->total, $order->currency)}}
@lang('Subtotal') {{currency_format($order->total, $order->currency)}}
@lang('Tax') + {{$order->tax}} %
@lang('Shipping Cost') {{isset($order->shipping_cost) ? currency_format($order->shipping_cost, $order->currency) : currency_format(0, $order->currency)}}
@lang('Coupon Discount') {{ currency_format($order->coupon_amount, $order->currency) }}
@lang('Wallet Used') {{ currency_format($order->wallet_amount, $order->currency) }}
@lang('Total') {{currency_format($order->shipping_cost + $order->total - $order->wallet_amount - $order->coupon_amount + ($order->total * $order->tax) / 100, $order->currency)}}