<?php
@extends('layouts.app')
@section('breadcrumb')
@section('breadcrumb')
<ul class="breadcrumb">
<li>
<span class="lnr lnr-home"></span> {{trans('breadcrumb.dashboard')}}
</li>
</ul>
@stop
@section('content')
<div class="col-sm-3">
<article class="statistic-box bg-primary">
<div>
<div class="number">{{$Settings->Currency->Symbol}} {{$MonthlyExpected}}</div>
<div class="caption"><div>{{trans('stats.monthly_amount')}}</div></div>
</div>
</article>
</div>
<div class="col-sm-3">
<article class="statistic-box bg-red">
<div>
<div class="number">{{$Settings->Currency->Symbol}} {{$MonthlyPaid}}</div>
<div class="caption"><div>{{trans('stats.monthly_paids')}}</div></div>
</div>
</article>
</div>
<div class="col-sm-3">
<article class="statistic-box bg-blue">
<div>
<div class="number">{{$DueAmount}}</div>
<div class="caption"><div>{{trans('stats.due_amount')}}</div></div>
</div>
</article>
</div>
<div class="col-sm-3">
<article class="statistic-box bg-green">
<div>
<div class="number">{{$TotalClient}}</div>
<div class="caption"><div>{{trans('stats.total_client')}}</div></div>
</div>
</article>
</div>
<div class="col-sm-8">
<div class="panel">
<div class="panel-heading">
<h5>{{trans('stats.last_year_paids')}}</h5>
</div>
<div id="fake_users1" style="height:300px"></div>
</div>
</div>
<div class="col-sm-4">
<div class="panel">
<div class="panel-heading">
<h5>{{trans('stats.top_companies')}}</h5>
</div>
<div class="panel-body">
<table class="table">
<tbody>
@if($Companies->count()==0)
<tr>
<td colspan="5">There is no invoice that pending payment.</td>
</tr>
@endif
@foreach($Companies as $Company)
<tr>
<td><a href="{{route('invoices::view',$Company->CompanyID)}}" title="{{$Company->Title}}">{{$Company->Title}}</a></td>
<td>{{$Company->TotalInvoice}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel">
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>{{trans('invoices.label_billing_to')}}</th>
<th>{{trans('invoices.label_total')}}</th>
<th>{{trans('invoices.label_due_date')}}</th>
</tr>
</thead>
<tbody>
@if($SoonInvoices->count()==0)
<tr>
<td colspan="5">There is no invoice that pending payment.</td>
</tr>
@endif
@foreach($SoonInvoices as $Invoice)
<tr>
<td><a href="{{route('invoices::view',$Invoice->InvoiceID)}}" title="{{$Invoice->Company->Title}}">{{$Invoice->Company->Title}}</a></td>
<td>{{$Invoice->currency->Symbol}} {{number_format($Invoice->Total,2)}}</td>
<td>{{$Invoice->DueDate->diffForHumans()}}</td>
</tr>
@endforeach
</tbody>
</table>
<nav>
{{$SoonInvoices->render()}}
</nav>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel">
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>{{trans('invoices.label_billing_to')}}</th>
<th>{{trans('invoices.label_total')}}</th>
<th>{{trans('invoices.label_due_date')}}</th>
</tr>
</thead>
<tbody>
@if($DelayedInvoices->count()==0)
<tr>
<td colspan="5">There is no invoice that pending payment.</td>
</tr>
@endif
@foreach($DelayedInvoices as $Invoice)
<tr>
<td><a href="{{route('invoices::view',$Invoice->InvoiceID)}}" title="{{$Invoice->Company->Title}}">{{$Invoice->Company->Title}}</a></td>
<td>{{$Invoice->currency->Symbol}} {{number_format($Invoice->Total,2)}}</td>
<td>{{$Invoice->DueDate->diffForHumans()}}</td>
</tr>
@endforeach
</tbody>
</table>
<nav>
{{$DelayedInvoices->render()}}
</nav>
</div>
</div>
</div>
@stop
?>