| Path : /proc/self/root/var/www/html/mini-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/mini-moneyexchange/resources/views/moneyExchange/report.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">
<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="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="bank_account_id" id="pet-select" class="form-control">
<option value="">{{__('message.bank account')}}</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-2 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('money-exchange-report')}}" 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')
</div>
</form>
</div>
<div class="table-responsive">
<table
id="zero_config"
class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('message.currency')}}</th>
<th>{{__('message.start balance')}}</th>
<th>{{__('message.cash in')}}</th>
<th>{{__('message.cash out')}}</th>
<th>{{__('message.fee')}}</th>
<th>{{__('message.remain balance')}}</th>
</tr>
</thead>
<tbody>
<?php
?>
@foreach($currencies as $index => $currency)
<tr>
<td>{{$index+1}}</td>
<td style="font-weight: bold">
{{$currency->name}} ({{$currency->currency_code}})
</td>
<td class="credit">
<?php
$startBalance = $currency->startBalance($start_date." 00:00:00", $is_bank, $user_id,$bank_account_id);
?>
{{number_format($startBalance,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
<?php
$totalCashIn = $currency->totalCashIn($start_date." 00:00:00",$end_date." 23:59:59", $is_bank, $user_id,$bank_account_id);
?>
{{number_format($totalCashIn,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
<?php
$totalCashOut = $currency->totalCashOut($start_date." 00:00:00",$end_date." 23:59:59", $is_bank, $user_id,$bank_account_id);
?>
{{number_format($totalCashOut,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
<?php
$fee = $currency->totalFee($start_date." 00:00:00",$end_date." 23:59:59", $is_bank, $user_id,$bank_account_id);
?>
{{number_format($fee,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
{{number_format(($startBalance+$totalCashIn-$totalCashOut),$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
</tr>
@endforeach
</tbody>
</table>
</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 });
</script>
@endsection
@section('meta')
<title>{{__('message.report')}}</title>
@endsection