| Path : /var/www/html/mini-moneyexchange/resources/views/bankAccount/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //var/www/html/mini-moneyexchange/resources/views/bankAccount/bankAccountList.blade.php |
@extends('layouts.main')
@section('content')
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">{{__('message.bank account')}}</h4>
<div class="ms-auto text-end">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="{{route('bank-accounts.create')}}" class="btn btn-primary btn-sm">
<i class="fa fa-plus"></i>
{{{__('message.add new')}}}
</a>
</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid" style="padding-top: 0px;">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<form method="get" id="search-form">
<input type="text" value="25" name="perpage" style="display: none;">
<div class="col-sm-12 col-xs-12 row">
<div class="col-md-2 col-xs-6">
<select name="is_bank" id="pet-select" class="form-control">
<option value='' @if($is_bank==null) selected @endif>{{__('message.select type')}}</option>
<option value="1" @if($is_bank==1) selected @endif>
{{__('message.bank')}}
</option>
<option value="0" @if($is_bank==0) selected @endif>
{{__('message.cash')}}
</option>
</select>
</div>
<div class="col-md-2 col-xs-6">
<select name="currency_id" id="pet-select" class="form-control">
<option value="">{{__('message.currency')}}</option>
@foreach($currencies as $index=>$currency)
<option value="{{$currency->id}}" @if($currency->id==$currency_id) selected @endif>
{{$currency->name}}
</option>
@endforeach
</select>
</div>
@if(Auth::user()->role_id==2)
<div class="col-md-2 col-xs-6">
<select name="responsible_by_user_id" id="pet-select" class="form-control">
<option value="">{{__('message.all staff')}}</option>
@foreach($users as $index=>$user)
<option value="{{$user->id}}" @if($user->id==$responsible_by_user_id) selected @endif>
{{$user->name}}
</option>
@endforeach
</select>
</div>
@endif
<div class="col-md-3 col-xs-6" style="padding-bottom:10px;">
<button type="submit" class="btn btn-primary btn-sm">
<i class="fa fa-search"></i>
{{__('message.search')}}
</button>
<a href="{{route('bank-accounts.index')}}" type="reset" class="btn btn-sm">
<i class="fa fa-refresh"></i>
<span class="hidden-xs">{{__('message.refresh')}}</span>
</a>
</div>
</div>
</form>
</div>
<div class="table-responsive">
<table
id="zero_config"
class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('message.bank name')}}</th>
<th>{{__('message.account')}}</th>
<th>{{__('message.credit')}}</th>
<th>{{__('message.responsible user')}}</th>
<th>{{__('message.status')}}</th>
<th>{{__('message.created by')}}</th>
<th>{{__('message.action')}}</th>
</tr>
</thead>
<tbody>
<?php
$total=0;
?>
@foreach($bankAccounts as $index => $bankAccount)
<?php
$total = $total+ $bankAccount->credit;
?>
<tr class="@if(!$bankAccount->is_active) disabled-row @endif">
<td>{{$index+1}}</td>
<td>{{$bankAccount->bank->name??''}}</td>
<td>
{{$bankAccount->bank_username}}
@if($bankAccount->bank_number)
/{{$bankAccount->bank_number}}
@endif
</td>
<td class="credit">
{{$bankAccount->currency->name??''}}
{{number_format($bankAccount->credit,$bankAccount->currency->decimal_precision) }}
</td>
<td>{{$bankAccount->responsibleByUser->name??''}}</td>
<td title="{{$bankAccount->is_active?'Yes':'No'}}">
<input class="form-check-input" type="checkbox" @if($bankAccount->is_active) checked @endif>
@if($bankAccount->is_active)
<span style="color:#0a6778;font-weight: bold">{{__('message.active')}}</span>
@else
<span style="color:#da542e;font-weight: bold">{{__('message.inactive')}}</span>
@endif
</td>
<td>{{$bankAccount->user->name??''}}</td>
<td>
<a href="{{route('bank-accounts.edit',$bankAccount)}}" class="btn btn-primary btn-sm"><i class="fa fa-eye"></i></a>
<form method="POST" action="{{route('bank-accounts.destroy', $bankAccount)}}" style="display:inline">
<input name="_method" type="hidden" value="DELETE">
{{ csrf_field() }}
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('{{ __('message.do you want to delete') }}?')">
<i class="fas fa-trash" style="color: #FFF;"></i>
</button>
</form>
<a href="{{route('bank-account-transactions.index')}}?bank_account_id={{$bankAccount->id}}" class="btn btn-primary btn-sm">
<i class="fas fa-book"></i>
{{__('message.transaction')}}
</a>
@if($bankAccount->is_active)
<a href="{{route('bank-accounts.deposit-withdraw.create',$bankAccount)}}?type=deposit" class="btn btn-primary btn-sm">
<i class="fa fa-plus"></i>
{{__('message.deposit')}}
</a>
<a href="{{route('bank-accounts.deposit-withdraw.create',$bankAccount)}}?type=withdraw" class="btn btn-primary btn-sm">
<i class="fa fa-arrow-circle-down"></i>
{{__('message.withdraw')}}
</a>
@endif
</td>
</tr>
@endforeach
@if($currency_id)
<thead>
<tr>
<th colspan="3" style="text-align: center;">
{{__('message.total')}}
</th>
<th colspan="5">
{{$bankAccount->currency->name??''}}
{{number_format($total,2) }}
</th>
</tr>
</thead>
@endif
</tbody>
</table>
<div class="rows">
{{ $bankAccounts->appends($_GET)->links() }}
@if($bankAccounts->hasPages())
<select name="perpage" style="display: inline;border:1px solid #CCC;" onchange="loadPerPage();">
<option value="25" @if(isset($perpage) & $perpage==25) selected @endif>25</option>
<option value="50" @if(isset($perpage) & $perpage==50) selected @endif>50</option>
<option value="100" @if(isset($perpage) & $perpage==100) selected @endif>100</option>
<option value="150" @if(isset($perpage) & $perpage==150) selected @endif>150</option>
<option value="200" @if(isset($perpage) & $perpage==200) selected @endif>200</option>
<option value="250" @if(isset($perpage) & $perpage==250) selected @endif>250</option>
<option value="300" @if(isset($perpage) & $perpage==300) selected @endif>300</option>
<option value="350" @if(isset($perpage) & $perpage==350) selected @endif>350</option>
<option value="400" @if(isset($perpage) & $perpage==400) selected @endif>400</option>
<option value="1000" @if(isset($perpage) & $perpage==1000) selected @endif>1000</option>
<option value="1500" @if(isset($perpage) & $perpage==1500) selected @endif>1500</option>
</select>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('meta')
<title>{{__('message.bank account')}}</title>
@endsection