@extends('layouts.customer') @section('content')
{{ $message }}
| # | Gift Card No | Balance | Is Sold | Sold At | Created At | Last Used At | {{ __('Action') }} |
|---|---|---|---|---|---|---|---|
| {{ ++$i }} | {{ $giftCard->custom_id ?? '' }} | @if( isset($giftCard->egift_card->egift_card_transactions) ) @php $giftCardTrans = $giftCard->egift_card->egift_card_transactions->each(function($item, $key) { if ( $item->trans_type != 1 ) { $item->amount = -($item->amount); } }); @endphp {{ $giftCardTrans->sum('amount'); }} @endif | {{ $giftCard->is_sold ? 'Sold' : 'Not Sold' }} | {{ $giftCard->sold_at ? \Carbon\Carbon::parse($giftCard->sold_at)->format('F j, Y g:i A') : '-' }} | {{ \Carbon\Carbon::parse($giftCard->created_at)->format('F j, Y g:i A') }} | @if( isset($giftCard->egift_card->egift_card_transactions) ) @php $giftCardTrans = $giftCard->egift_card->egift_card_transactions->last(); @endphp {{ \Carbon\Carbon::parse($giftCardTrans->datetime)->format('F j, Y g:i A') }} @endif |
|