@extends('layouts.app') @section('title') {{trans('general.withdrawals')}} -@endsection @section('content')

{{trans('general.withdrawals')}}

{{trans('general.history_withdrawals')}}

@include('includes.cards-settings')
@if(Auth::user()->payment_gateway == '') @endif
{{trans('general.balance')}}: {{Helper::amountFormatDecimal(Auth::user()->balance)}} {{$settings->currency_code}} @if(Auth::user()->balance >= $settings->amount_min_withdrawal && Auth::user()->payment_gateway != '' && Auth::user()->withdrawals() ->where('status','pending') ->count() == 0) {!! Form::open([ 'method' => 'POST', 'url' => "settings/withdrawals", 'class' => 'd-inline' ]) !!} {!! Form::submit(trans('general.make_withdrawal'), ['class' => 'btn btn-1 btn-success mb-2 saveChanges']) !!} {!! Form::close() !!} @else @endif
@php $datePaid = Withdrawals::select('date') ->where('user_id', Auth::user()->id) ->where('status','pending') ->orderBy('id','desc') ->first(); @endphp
@if($withdrawals->count() != 0)
@foreach ($withdrawals as $withdrawal) @endforeach
{{trans('admin.amount')}} {{trans('admin.method')}} {{trans('admin.date')}} {{trans('admin.status')}} {{trans('admin.actions')}}
{{Helper::amountFormatDecimal($withdrawal->amount)}} {{$withdrawal->gateway == 'Bank' ? trans('general.bank') : $withdrawal->gateway}} {{Helper::formatDate($withdrawal->date)}} @if( $withdrawal->status == 'paid' ) {{trans('general.paid')}} @else {{trans('general.pending_to_pay')}} @endif @if( $withdrawal->status != 'paid' ) {!! Form::open([ 'method' => 'POST', 'url' => "delete/withdrawal/$withdrawal->id", 'class' => 'd-inline' ]) !!} {!! Form::button(trans('general.delete'), ['class' => 'btn btn-danger btn-sm deleteW p-1 px-2']) !!} {!! Form::close() !!} @else {{trans('general.paid')}} - {{Helper::formatDate($withdrawal->date_paid)}} @endif
@if ($withdrawals->hasPages()) {{ $withdrawals->links() }} @endif @endif
@endsection