@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")}}

@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 == 'PENDING') {{__("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--}}
{{-- WIP tikets--}}
{{-- WIP comments--}}
{{-- WIP submit new ticket --}}
{{-- WIP submit new ticket --}}
{{-- WIP submit new ticket --}}