@extends('backend.layouts.master') @section('content')

ĐƠN HÀNG BÁN
Tên khách hàng:  {{$order->user->full_name}} Người xử lý: {{auth()->user()->full_name}}
Địa chỉ email:  {{$order->user->email}} Ngày xử lý: {{@$order->history_orders[0]->payment_date}}
Điện thoại: {{$order->user->phone}} Phương thức thanh toán: {{@$order->history_orders[0]->payment_type == \App\Constants\OrderConstant::ORDER_TYPE_CHUYEN_KHOAN ? 'Chuyển khoản' :'VNPAY'}}
Ngày thanh toán:  
@foreach($order->order_details as $key=> $item) @endforeach
STT Mã khóa học Tên khóa học Đơn giá VAT (%) CK (%) CK (đ) Thành tiền
{{$key+1}} {{$item->lecture_id}} {{$item->lecture->title}} {{number_format($item->lecture->price)}} 0 0 0 {{number_format($item->lecture->price)}}
Tổng
Chiết khấu trước thuế % 0
Thuế VAT %
Tổng cộng {{number_format(\App\Helpers\Functions::totalPrice($order->order_details))}}
Điều khoản đi kèm
1.:
2.:

Thanh toán ({{$order->status==\App\Constants\OrderConstant::DA_THANH_TOAN ? 'Đã thanh toán' : ($order->status==\App\Constants\OrderConstant::HUY_BO ? 'Hủy bỏ': 'Đang chờ xử lý')}})

Đã thanh toán: {{number_format(\App\Helpers\Functions::totalPrice($order->history_orders))}}
Còn lại: {{number_format(\App\Helpers\Functions::totalPrice($order->order_details) - \App\Helpers\Functions::totalPrice($order->history_orders))}}

Lịch sử thanh toán

@foreach($order->history_orders as $item) @endforeach
Ngày Số tiền Ghi chú
{{$item->payment_date}} {{$item->price}} {{$item->description}}
@include('backend.pages.orders.modal') @endsection