@php $shop_address = Setting::getShopFullAddress(); $service_shipping = Shipping::getAllShipping(); if(!empty($order->tax)) { $tax = ($order->tax/100) * $order->total; $order->total = $order->total + $tax; } $coupon = $order->coupon?json_decode($order->coupon, true):[]; @endphp @extends('core::layouts.master') @section('breadcrumb') Quản lý đơn hàng / Chi tiết đơn hàng @endsection @section('head-action')
  • In hóa đơn
  • @if($order->status != -1)
  • @endif {{ Form::bsNavBtnRemove('Xóa đơn hàng', route('admin.order.destroy',$order->id), route('admin.order.index'))}} @endsection @section('content')
    total}} data-code="{{$order->code}}">

    Chi tiết đơn hàng {{$order->code}}

    @php($subtotal = 0) @foreach($order->details as $item) @php $weight = 0; $productShipping = \Product::getProductShipping($item->product_id); if(!empty($productShipping)) { if(!empty($productShipping->weight)) { $weight += (floatVal($productShipping->weight) * 1000) * $item->quantity; } } $subtotal += $item->subtotal; @endphp @endforeach
    Sản phẩm SL Giá Thành tiền
    {{$loop->iteration}}
    @if($item->product_option && is_array($item->product_option) && count($item->product_option)) @foreach($item->product_option as $option) {{@$option['parent_name']}} : {{@$option['name']}}{{($loop->last)?'':','}} @endforeach @endif
    @if($item->product_code)
    Mã SP: {{ $item->product_code }}
    @endif
    {{$item->quantity}} {{number_format($item->price)}} {{$order->currency}} {{number_format($item->subtotal)}} {{$order->currency}}
    Thành tiền {{number_format($subtotal)}} {{$order->currency}}
    @if(!empty($order->shipping_fee)) Phí Ship @else Thêm phí ship @endif {{number_format($order->shipping_fee)}} {{$order->currency}}
    @foreach($coupon as $key => $value) @if($key != 'admin_discounts')

    Mã giảm giá {{$value['code']}} @if($value['type'] == 'percent_bill') (giảm % trên tổng hóa đơn) @elseif($value['type'] == 'free_shipping') (giảm phí vận chuyển) @else (giảm tiền trên tổng hóa đơn) @endif

    @else @foreach($value as $index => $val)

    Shop giảm giá

    @endforeach @endif @endforeach

    Thêm giảm giá

    @foreach($coupon as $key => $value) @if($key != 'admin_discounts')

    - @if($value['type'] == 'percent_bill') {{$value['value']}}% @elseif($value['type'] == 'free_shipping') {{number_format($value['value'])}} {{$order->currency}}chuyển @else {{number_format($value['value'])}} {{$order->currency}} @endif

    @else @foreach($value as $val)

    -{{number_format($val['value'])}} {{$order->currency}}

    @endforeach @endif @endforeach
    @if(!empty($order->tax)) Thuế GTGT ({{$order->tax}}%) @else Thêm thuế GTGT @endif @if(!empty($order->tax)) {{number_format($tax)}} {{$order->currency}} @endif
    Tổng cộng {{number_format($order->total+$order->shipping_fee)}} {{$order->currency}}
    @if(!$order['shipping_method']) @endif
    @if(!$order['shipping_method']) @endif @if($order['shipping_method'])

    Thông tin vận chuyển

    @includeIf("ecommerce::order.shipping.".$order['shipping_method'])
    @endif
    @if($order->status == -1)
    @endif
    Thông tin người mua hàng
    Họ tên {{$order->user->fullname}}
    Điện thoại {{$order->user->phone}}
    Email {{$order->user->email}}
    Địa chỉ @if(!empty($order->user->address)) {{$order->user->address . ', ' . $order->user->district . ', ' . $order->user->province}} @endif
    Thông tin người nhận hàng
    @endif
    Họ tên {{$order->fullname}}
    Điện thoại {{$order->phone}}
    Email {{$order->email}}
    Địa chỉ @if(!empty($order->address)) {{$order->address . ', ' . $order->district . ', ' . $order->province}}
    Ghi chú {{$order->note}}
    @if(!empty($order->created_by))
    Đơn hàng được tạo bởi
    @php( $admin = app()->make(\Modules\Core\Models\Repositories\AdminRepository::class)->findAdmin($order->created_by) )

    Tên: {{$admin->name}}

    Email: {{$admin->email}}

    @endif

    {{ Setting::get('website_name') }}
    Địa chỉ: {{ Setting::get('address') }}
    Email: {{ Setting::get('email') }} | Website: {{ $_SERVER['SERVER_NAME'] }}
    Hotline: {{ Setting::get('phone') }}

    Phiếu Bán Hàng

    Mã đơn hàng: {{$order->code}} Ngày mua: {{date("d/m/Y H:i:s", strtotime($order->created_at))}}
    Trạng thái đơn hàng: @php switch ($order->status) { case -1: echo 'Đã hủy'; break; case 0: echo 'Chưa đặt hàng'; break; case 1: echo 'Mới'; break; case 2: echo 'Đã xác nhận'; break; case 3: echo 'Đang vận chuyển'; break; case 4: echo 'Hoàn tất'; break; } @endphp
    Tình trạng thanh toán: {{$order->payment_status ? 'Đã thanh toán' : 'Chưa thanh toán'}}
    Hình thức thanh toán: {{$order->payment_method}}
    Thông tin người mua hàng
    Khách hàng: {{$order->user->fullname}}
    Số điện thoại: {{$order->user->phone}}
    Email: {{$order->user->email}}
    Địa chỉ: @if(!empty($order->user->address)) {{$order->user->address . ', ' . $order->user->district . ', ' . $order->user->province}} @endif
    Thông tin người nhận hàng
    @endif
    Người nhận: {{$order->fullname}}
    Số điện thoại: {{$order->phone}}
    Email: {{$order->email}}
    Địa chỉ: @if(!empty($order->address)) {{$order->address . ', ' . $order->district . ', ' . $order->province}}
    Chi tiết đơn hàng
    @php($subtotal = 0) @foreach($order->details as $item) @php($subtotal+=$item->subtotal) @endforeach @if(!empty($order->tax)) @endif
    STT Tên sản phẩm SL Đơn giá Thành tiền
    {{$loop->iteration}}
    {{$item->product_name}}
    @if($item->product_option && is_array($item->product_option) && count($item->product_option)) @foreach($item->product_option as $option) {{@$option['parent_name']}} : {{@$option['name']}}{{($loop->last)?'':','}}
    @endforeach @endif
    @if($item->product_code)
    Mã SP: {{ $item->product_code }}
    @endif
    {{$item->quantity}} {{number_format($item->price)}} {{$order->currency}} {{number_format($item->subtotal)}} {{$order->currency}}
    Thành tiền {{number_format($subtotal)}} {{$order->currency}}
    Phí Ship {{number_format($order->shipping_fee)}} {{$order->currency}}
    @foreach($coupon as $key => $value) @if($key != 'admin_discounts')

    Mã giảm giá {{$value['code']}} @if($value['type'] == 'percent_bill') (giảm % trên tổng hóa đơn) @elseif($value['type'] == 'free_shipping') (giảm phí vận chuyển) @else (giảm tiền trên tổng hóa đơn) @endif

    @else @foreach($value as $val)

    Shop giảm giá

    @endforeach @endif @endforeach
    @foreach($coupon as $key => $value) @if($key != 'admin_discounts')

    - @if($value['type'] == 'percent_bill') {{$value['value']}}% @elseif($value['type'] == 'free_shipping') {{number_format($value['value'])}} {{$order->currency}}chuyển @else {{number_format($value['value'])}} {{$order->currency}} @endif

    @else @foreach($value as $val)

    -{{number_format($val['value'])}} {{$order->currency}}

    @endforeach @endif @endforeach
    Thuế GTGT ({{$order->tax}}%) {{number_format($tax)}} {{$order->currency}}
    Tổng cộng {{number_format($order->total+$order->shipping_fee)}} {{$order->currency}}
    @endsection @section('scripts') {{ Html::script(Module::asset('ECommerce:Assets').'/js/order/shipping.js?v=1.2') }} @endsection