@extends('layouts.admin') @section('content') @php $giftCardJson = json_decode($result->gift_card_json) ?? null; $balance = $balance['remaining_amount'] > 0 ? $balance['remaining_amount'] : $balance['purchase_amount']; $showReceiptBtn = in_array($result->order_from,['pos','pos_ios','employee-pos']) && in_array($result->payment_status, [1,2]); $canRefund = in_array($result->payment_status, [1]) && $result->order_from != 'admin' && !empty($result->payment_method); @endphp
@include('layouts.partials.messages')

{!! __('orders.order_date') !!} : {!! date(DISPLAY_DATETIME3, strtotime($result->created_at)) !!}

@if($result->start_date)

{!! __('gift_card.start_date') !!} : {!! date(SHOW_DATE2, strtotime($result->start_date)) !!}

@endif

{!! __('gift_card.end_date') !!} : {!! date(SHOW_DATE2, strtotime($result->expiry_date)) !!}

{!! __('orders.payment_method') !!} : {!! $result->payment_method == 'free' ? 'Free' : paymentMethodService($result->payment_method) !!}

{!! __('orders.order_from') !!} : {!! $result->order_from == 'admin' ? 'Admin' : orderFrom($result->order_from) !!}

{!! __('orders.payment_status') !!} : {!! paymentStatus($result->payment_status) !!}

{!! __('gift_card.order_redeem_code') !!} : {!! $result->gift_card_code ?? '' !!}

{!! __('gift_card.remaining_balance') !!} : {!! currency().' '.$balance !!}

{!! __('orders.to') !!}

@if ($result->user_id > 0)

{!! __('orders.email') !!}: {!! $result->email ?? '' !!}

{!! __('orders.phone') !!}: {!! $result->phone ?? '' !!}

@else

{!! __('orders.email') !!}: {!! $giftCardJson->to ?? '' !!}

@endif
{{----}}
{{ __('orders.items') }} {{ __('orders.qty') }} {{ __('orders.total_price') }}
{!! __('gift_card.gift_card') !!} {!! $result->quantity.' x '.$result->purchase_amount !!} {!! numberFormat($result->quantity*$result->purchase_amount) !!}
 
 
{!! __('orders.subtotal') !!}: {!! numberFormat($result->sub_total) !!}
{!! __('orders.tax_vat') !!}: {!! numberFormat($result->total_tax) !!}
{!! __('orders.total') !!}: {{ numberFormat($result->quantity*$result->purchase_amount)}}
@if(is_object($giftCardHistory) && count($giftCardHistory) > 0) @foreach($giftCardHistory as $k => $detail) @php $balance = ( ($detail->order_id > 0) ? ($detail->actual_amount - $detail->remaining_amount) : $detail->remaining_amount); $order = $detail->order_id ? orderNumber($detail->order_from, $detail->order_number, $detail->order_prefix) : false; @endphp @endforeach @else @endif
{!! __('gift_card.card_history') !!}
{{ __('gift_card.date') }} {{ __('gift_card.order_id') }} {{ __('gift_card.card_amount') }}
{!! dateFormat($detail->created_at,DISPLAY_DATETIME2) !!} {!!$detail->order_id ? "order_id])."'>#$order" : 'N/A' !!} {!! ($detail->order_id > 0) ? " ".numberFormat($balance)."" : "".numberFormat($balance)."" !!}
{!! __('common.no_records') !!}
@endsection @section('script') @endsection