@extends('layouts.app') @section('content')

All Order

@if (canAccess(['order create'])) Create Order @endif
@if (canAccess(['order grand total', 'order pending amount', 'order unpaid amount', 'order paid amount']))
@if (canAccess(['order grand total']))
Grand Total {{ sprintf("$%0.2f", $allOrder->sum('grand_total')) }}
@endif @if (canAccess(['order pending amount']))
Pending Amount {{ sprintf("$%0.2f", $allOrder->where('status', 'pending')->sum('grand_total')) }}
@endif @if (canAccess(['order unpaid amount']))
Unpaid Amount {{ sprintf("$%0.2f", $allOrder->where('status', 'unpaid')->sum('grand_total')) }}
@endif @if (canAccess(['order paid amount']))
Paid Amount {{ sprintf("$%0.2f", $allOrder->where('status', 'paid')->sum('grand_total')) }}
@endif
@endif
@php($allAmount = 0) @if (!empty($info->results)) @foreach ($info->results as $key => $row) @php($allAmount += $row->grand_total) @endforeach @endif
Order No Billing Type Email Amount Status Created At Updated At Paid Date Order From User Action
#{{ $row->order_no }}
@php($billingInfo = $billingType->where('id', $row->billing_type)->first()) @if (!empty($billingInfo->name)) {{ strFilter($billingInfo->name) }} @endif
{{ $row->email }}
{{ sprintf("$%0.2f", $row->grand_total) }} @if ($row->status == 'pending') {{ strFilter($row->status) }} @elseif($row->status == 'unpaid') {{ strFilter($row->status) }} @elseif($row->status == 'delete') {{ strFilter($row->status) }} @else {{ strFilter($row->status) }} @endif {{ !empty($row->created) ? date('d F, Y', strtotime($row->created)) : '' }} {{ !empty($row->updated) ? date('d F, Y', strtotime($row->updated)) : '' }} {{ !empty($row->payment_date) ? date('d F, Y', strtotime($row->payment_date)) : '' }} {{ !empty($row->emailFrom->name) ? strFilter($row->emailFrom->name) : '' }} {{ $row->admin?->name }}
Total {{ sprintf("$%0.2f", $allAmount) }}  
{{ $info->results->links() }}
@endsection @push('headerPartial') @endpush @push('footerPartial') @endpush