@extends('shared.front') @section('content')

{{ __('messages.tracking.title') }}

@if (isset($order) && $order) @if (count($codes))
  • MÃ QUAY THƯỞNG
    TRẠNG THÁI MÃ
    GIẢI THƯỞNG
  • @foreach($codes as $code)
  • @if(in_array($code->status, [\App\Enums\StarSpinCodeStatus::INFORMATION, \App\Enums\StarSpinCodeStatus::COMPLETED, \App\Enums\StarSpinCodeStatus::CANCELLED])) {{$code->code}} @else {{$code->code}} @endif
    {{ \App\Enums\StarSpinCodeStatus::getDescription($code->status) }}
    {{ $code->gift ? $code->gift->name : '' }}
  • @endforeach
@endif

{{ __('messages.tracking.order_id') }}: {{ $order->id }}

{{ __('messages.tracking.status.' . \App\Enums\OrderStatus::getStatus($order->status)) }}

{{ __('messages.tracking.order_date') }}: {{ $order->created_at }}


{{ __('messages.tracking.receive_information') }}

{{ $order->fullname }}
{{ $order->phone }}
{{ $order->address }}

{{ __('messages.tracking.payment_method.title') }}

{{ __('messages.tracking.payment_method.' . ($order->paymentmethod ?? 'cod')) }}


{{ __('messages.tracking.order_information') }}

  • {{ __('messages.tracking.product') }}

    {{ __('messages.tracking.price') }}

    {{ __('messages.tracking.quantity') }}

    {{ __('messages.tracking.sub_total') }}

  • @foreach($order->products as $product)
  • {{ $product->title }}

    {{ $product->title }}

    {{ Common::numberFormat($product->sale_price) . ' VND' }}

    {{ $product->pivot->quanlity }}

    {{ Common::numberFormat($product->pivot->quanlity * $product->sale_price) . ' VND' }}

  • @endforeach

{{ __('messages.tracking.discount') }}

{{ $order->discount ? '-'. Common::numberFormat($order->discount) : '0' }} VND

{{ __('messages.tracking.delivery') }}

{{ $order->shipping_fee ? Common::numberFormat($order->shipping_fee) : '0' }} VND

{{ __('messages.tracking.delivery_discount') }}

{{ $order->shipping_discount ? '-'. Common::numberFormat($order->shipping_discount) : '0' }} VND

{{ __('messages.tracking.total') }}

{{ Common::numberFormat($order->totalprice) }} VND

@if($order->delivery && $order->delivery->status !== \App\Enums\DeliveryStatus::EXPIRED && $order->delivery->status !== \App\Enums\DeliveryStatus::CANCELED && $order->delivery->status !== \App\Enums\DeliveryStatus::REJECTED && $order->delivery->status !== \App\Enums\DeliveryStatus::COMPLETED)
@endif
@elseif($orderId && $phone)
{{ __('messages.tracking.not_found') }}
@endif
@endsection