Logo
Hello, {{App\Models\BillingDetails::where('order_id', $order_id)->first()->name}}
Thank you for shopping from our store and for your order.
Invoice
ORDER {{$order_id}}
{{App\Models\BillingDetails::where('order_id', $order_id)->first()->created_at->format('d-M-Y')}}
@php $subtotal = 0 @endphp @foreach (App\Models\Order::where('order_id', $order_id)->get() as $order_product) @php $subtotal += $order_product->rel_to_product->after_discount*$order_product->quantity @endphp @endforeach
Item SKU Quantity Subtotal
{{$order_product->rel_to_product->product_name}} {{$order_product->rel_to_product->after_discount}} Tk {{$order_product->quantity}} {{$order_product->rel_to_product->after_discount*$order_product->quantity}} Tk
@php $grandtotal = App\Models\OrderProduct::where('order_id', $order_id)->first()->charge + $subtotal - App\Models\OrderProduct::where('order_id',$order_id)->first()->coupon_price; @endphp
Subtotal {{$subtotal}} Tk
Charge {{App\Models\OrderProduct::where('order_id', $order_id)->first()->charge}} Tk
Discount {{(App\Models\OrderProduct::where('order_id',$order_id)->first()->coupon_price == null)? '0': (App\Models\OrderProduct::where('order_id',$order_id)->first()->coupon_price)}} Tk
Grand Total (Incl.Charge) {{$grandtotal}} Tk
BILLING INFORMATION
{{App\Models\BillingDetails::where('order_id', $order_id)->first()->name}}
{{App\Models\BillingDetails::where('order_id', $order_id)->first()->address}}
P: {{App\Models\BillingDetails::where('order_id', $order_id)->first()->mobile}}
PAYMENT METHOD
Payment: @php // $tt = App\Models\BillingDetails::where('order_id', $order_id); $pm = App\Models\OrderProduct::where('order_id', $order_id)->first()->payment_method; if ($pm == 1) { echo 'Cash on delivery'; } else if($pm == 2) { echo 'Bkash payment'; } else { echo 'Rocket payment'; } @endphp
Transaction number: {{$pm == 1 ? 'NA': App\Models\BillingDetails::where('order_id', $order_id)->first()->tran_number}}
Transaction ID: {{App\Models\BillingDetails::where('order_id', $order_id)->first()->tran_id}}{{$pm == 1 ? 'NA': ''}}
Have a nice day.