@include('components.err')

{{number_format(auth('customer')->user()->invoices()->count())}}

{{__("Invoices")}}

{{__("Credits")}}

{{number_format(auth('customer')->user()->credit)}} {{config('app.currency.symbol')}}

{{number_format(auth('customer')->user()->tickets()->count())}}

{{__("Tickets")}}

{{number_format(auth('customer')->user()->addresses()->count())}}

{{__("Addresses")}}

{{number_format(auth('customer')->user()->comments()->count())}}

{{__("Comments")}}

{{number_format(auth('customer')->user()->favorites()->count())}}

{{__("Favorites")}}

@if(cardCount() > 0)
{{__("Continue")}}
{{__("System notification")}}
{{__("You have some products in your shopping card.")}}
@endif @if( auth('customer')->user()->name == null || trim(auth('customer')->user()->name) == '')
{{__("System notification")}}
{{__("Your information is insufficient, Please complete your information")}}
@endif @if( auth('customer')->user()->addresses()->count() == 0)
{{__("System notification")}}
{{__("You need at least one address to order, Please add address")}}
@endif
@foreach(auth('customer')->user()->invoices as $inv) @endforeach
# {{__("Datetime")}} {{__("Orders count")}} {{__("Total price")}} {{__("Status")}} -
{{$inv->hash}} {{$inv->created_at->ldate('Y-m-d H:i')}} {{number_format($inv->count)}} {{number_format($inv->total_price)}} {{config('app.currency.symbol')}} {{__($inv->status)}} @if($inv->status != 'COMPLETED' && $inv->created_at->timestamp < (time() - 3600) ) {{__("Pay now")}} @endif
{{__("If you want to change the password, choose both the same. Otherwise, leave the password field blank.")}}
@csrf

{{__("Credits")}}

{{number_format(auth('customer')->user()->credit)}} {{config('app.currency.symbol')}}

{{__("Credit history")}}
@foreach(auth('customer')->user()->credits as $cr)
@if($cr->invoice_id != null) @endif [{{$cr->created_at->ldate('Y-m-d H:i')}}] {{number_format($cr->amount)}} {{config('app.currency.symbol')}} @php($data = json_decode($cr->data)) @if(isset($data->message)) {{$data->message}} @endif
@endforeach {{-- WIP add credit manual--}}
@foreach(auth('customer')->user()->main_tickets()->orderByDesc('id')->get() as $i => $ticket) @endforeach
# {{__("Title")}} {{__("Status")}} -
{{$i+1}} {{$ticket->title}} {{__($ticket->status)}} {{__("View")}}
@if(auth('customer')->user()->comments()->count() == 0)
{{__("You don't have any comments, We are so pleased to hear your look-out")}}
@else @foreach(auth('customer')->user()->comments as $comment)

{{$comment->commentable->title}} {{$comment->commentable->name}}

{{$comment->created_at->ldate('Y-m-d')}}

{{$comment->body}}

@endforeach @endif
@csrf
__('Address editor'), 'state' => __('State'), 'city' => __('City'), 'address' => __('Address'), 'post-code' => __('Post code'), ])}}' >
@foreach(auth('customer')->user()->favorites as $fav)
{{$fav->name}}

{{$fav->name}}

{{$fav->excerpt}}

@endforeach