| Path : /proc/self/root/var/www/html/moneyexchange/resources/views/moneyExchange/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //proc/self/root/var/www/html/moneyexchange/resources/views/moneyExchange/transaction.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.transaction')}}</h4>
</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="hidden" value="{{$perpage}}" name="perpage">
<div class="col-sm-12 col-xs-12 row">
<div class="col-md-2 col-xs-6">
<input type="text" id="datepicker_start" class="form-control hasDatepicker" name="start_date" title="{{__('message.start date')}}" value="{{$start_date}}" placeholder="{{__('message.start date')}}" readonly="">
</div>
<div class="col-md-2 col-xs-6">
<input type="text" id="datepicker_end" class="form-control hasDatepicker" name="end_date" title="{{__('message.end date')}}" value="{{$end_date}}" placeholder="{{__('message.end date')}}" readonly="">
</div>
{{-- <div class="col-md-2 col-xs-6">
<select name="bank_account_id" id="pet-select" class="form-control">
<option value="">{{__('message.select')}}</option>
@foreach($bankAccounts as $index=>$bankAccount)
<option value="{{$bankAccount->id}}" @if($bankAccount->id==$bank_account_id) selected @endif>
{{$bankAccount->bank->name}} ({{$bankAccount->bank_username}}/{{$bankAccount->bank_number}})
</option>
@endforeach
</select>
</div> --}}
@if(Auth::user()->role_id==2)
<div class="col-md-2 col-xs-6">
<select name="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==$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-account-transactions.index')}}" type="reset" class="btn btn-sm">
<i class="fa fa-refresh"></i>
<span class="hidden-xs">{{__('message.refresh')}}</span>
</a>
</div>
</div>
<div class="col-sm-12 col-xs-12">
@include('app.search-button')
<a href="{{route('transactions.download')}}" class="btn search-date btn-sm" id="download-button" onclick="return clickdownload()" @if(count($transactions)<=0) disabled="disabled" @endif>
<i class="fa fa-download"></i>
{{ __('message.export excel') }}
</a>
<a href="{{route('transactions.download1')}}" class="btn search-date btn-sm" id="download-button1" onclick="return clickdownload1()" @if(count($transactions)<=0) disabled="disabled" @endif>
<i class="fa fa-download"></i>
{{ __('message.export excel') }}
</a>
</div>
</form>
</div>
<div class="table-responsive">
<table
id="zero_config"
class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<!-- <th>{{__('message.customer')}}</th> -->
<!-- <th>{{__('message.bank account')}}</th> -->
<th>{{__('message.exchange from')}}/{{__('message.exchange to')}}</th>
<th>{{__('message.amount')}}</th>
<th>{{__('message.exchange rate')}}</th>
<th>{{__('message.exchange to')}}</th>
<!-- <th>{{__('message.fee')}}</th> -->
<th>{{__('message.created by')}}</th>
<th>{{__('message.created date')}}</th>
<th>{{__('message.action')}}</th>
</tr>
</thead>
<tbody>
<?php
?>
@foreach($transactions as $index => $transaction)
<?php
$currencyFrom= $transaction->moneyExchangeList->exchangeFromCurrency;
$currencyTo= $transaction->moneyExchangeList->exchangeToCurrency;
?>
<tr>
<td>{{$index+1}}</td>
<!-- <td>
{{$transaction->customer_level==1?__('message.general'):__('message.special')}}
</td> -->
<!-- <td>
@if($transaction->bank_account_id)
{{$transaction->bankAccount->bank_username}} <br/>
{{$transaction->bankAccount->bank_number}}
@endif
</td> -->
<td style="font-weight: bold;">
{{$transaction->moneyExchangeList->exchangeFromCurrency->currency_code??''}}/{{$transaction->moneyExchangeList->exchangeToCurrency->currency_code??''}}
</td>
<td class="credit">
{{number_format($transaction->amount,$currencyFrom->decimal_precision) }}
{{$currencyFrom->currency_code}}
</td>
<td class="credit blur">
{{number_format($transaction->exchange_rate,2) }}
</td>
<td class="credit" style="background-color: #f9e5c8">
{{number_format($transaction->amount_after_exchange,$currencyTo->decimal_precision) }}
{{$currencyTo->currency_code}}
</td>
<!-- <td class="credit">
{{$currencyTo->currency_code}}
{{number_format($transaction->fee,$currencyTo->decimal_precision) }}
</td> -->
<td>{{$transaction->user->name??''}}</td>
<td title="{{$transaction->created_at}}">
{{ $transaction->created_at->format('d/m/Y H:i') }}
</td>
<td>
<button type="button" class="btn btn-primary btn-sm" onclick="printInvoice('{{$transaction->id}}')">
<i class="fa fa-print"></i>
{{__('message.print')}}
</button>
@if(\Auth::user()->role_id==2)
<form method="POST" action="{{route('transactions.destroy', $transaction)}}" 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>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="rows">
{{ $transactions->appends($_GET)->links() }}
@if($transactions->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("scripts")
<script>
jQuery("#datepicker_start").datepicker({ format: 'yyyy-mm-d', autoclose: true, todayHighlight: true });
jQuery("#datepicker_end").datepicker({ format: 'yyyy-mm-d', autoclose: true, todayHighlight: true });
function printInvoice(transaction_id){
window.open("{{route('exchange-invoice')}}/"+transaction_id);
}
</script>
@endsection
@section('meta')
<title>{{__('message.transaction')}}</title>
@endsection