| 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/profitReport.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.profit report')}}</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="">{{__('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>
@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.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('profit-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 rowspan="2">#</th>
<th rowspan="2">{{__('message.currency')}}</th>
<th rowspan="2">{{__('message.start balance')}}</th>
<th colspan="2" style="text-align: center">{{__('message.cash in')}}</th>
<th colspan="2" style="text-align: center">{{__('message.cash out')}}</th>
<th rowspan="2">{{__('message.fee')}}</th>
<th rowspan="2">{{__('message.remain balance')}}</th>
</tr>
<tr>
<th>{{__('message.cash in')}}</th>
<th>{{__('message.internal cash in')}}</th>
<th>{{__('message.cash out')}}</th>
<th>{{__('message.internal cash out')}}</th>
</tr>
</thead>
<tbody>
<?php
$totalMainStartBalance=0;
$totalMainBalance=0;
$totalMainCashIn =0;
$totalMainCashOut =0;
$totalMainCashInInternal =0;
$totalMainCashOutInternal =0;
$totalMainFee=0;
?>
@foreach($currencies as $index => $currency)
<tr>
<td>{{$index+1}}</td>
<td style="font-weight: bold">
{{$currency->currency_code}}
</td>
<td class="credit">
<?php
$startBalance = $currency->startBalance($start_date." 00:00:00", $is_bank, $user_id,null);
$totalMainStartBalance =$totalMainStartBalance+ $currency->toMainCurrency($startBalance);
?>
{{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,null, false);
$totalMainCashIn= $totalMainCashIn+$currency->toMainCurrency($totalCashIn);
?>
{{number_format($totalCashIn,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
<?php
$totalCashInInternal = $currency->totalCashIn($start_date." 00:00:00",$end_date." 23:59:59", $is_bank, $user_id,null, true);
$totalMainCashInInternal= $totalMainCashInInternal+$currency->toMainCurrency($totalCashInInternal);
?>
{{number_format($totalCashInInternal,$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,null);
$totalMainCashOut= $totalMainCashOut+$currency->toMainCurrency($totalCashOut);
?>
{{number_format($totalCashOut,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
<?php
$totalCashOutInternal = $currency->totalCashOut($start_date." 00:00:00",$end_date." 23:59:59", $is_bank, $user_id,null,true);
$totalMainCashOutInternal= $totalMainCashOutInternal+$currency->toMainCurrency($totalCashOutInternal);
?>
{{number_format($totalCashOutInternal,$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,null);
$totalMainFee= $totalMainFee+$currency->toMainCurrency($fee);
?>
{{number_format($fee,$currency->decimal_precision) }} {{$currency->currency_code}}
</td>
<td class="credit">
{{number_format(($startBalance+$totalCashIn+$totalCashInInternal-$totalCashOut-$totalCashOutInternal),$currency->decimal_precision) }} {{$currency->currency_code}}
<?php
$totalMainBalance = $totalMainBalance + $currency->toMainCurrency(($startBalance+$totalCashIn+$totalCashInInternal-$totalCashOut-$totalCashOutInternal));
?>
</td>
</tr>
@endforeach
<thead>
<tr>
<th colspan="2" rowspan="2" style="text-align: center;">
{{__('message.total')}}
</th>
<th colspan="1">
{{number_format($totalMainStartBalance,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainCashIn,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainCashInInternal,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainCashOut,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainCashOutInternal,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainFee,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th>
{{number_format($totalMainBalance,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
</tr>
<tr>
<th colspan="1">
</th>
<th colspan="2" style="text-align: center;">
{{number_format($totalMainCashInInternal+$totalMainCashIn,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th colspan="2" style="text-align: center;">
{{number_format($totalMainCashOutInternal+$totalMainCashOut,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
<th colspan="2">
</th>
</tr>
</thead>
<tr style="background-color: #B8860B;color:white">
<th colspan="8" style="text-align: center;">
{{__('message.total profit')}}
</th>
<th style="font-weight: bold;">
{{number_format($totalMainBalance-$totalMainStartBalance-$totalMainCashInInternal+$totalMainCashOutInternal,$mainCurrency->decimal_precision)}} {{$mainCurrency->currency_code}}
</th>
</tr>
</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.profit report')}}</title>
@endsection