ultimatepos/Modules/AssetExchange/Resources/views/reports/index.blade.php

63 lines
3.4 KiB
PHP

@extends('layouts.app')
@section('title', __('assetexchange::lang.reports'))
@section('content')
@include('assetexchange::layouts.nav')
<section class="content no-print mt-page">
<div class="mt-page-header">
<h1><i class="fas fa-chart-bar" style="color:#3b82f6;margin-left:8px;"></i> @lang('assetexchange::lang.reports')</h1>
<a href="{{ action([\Modules\AssetExchange\Http\Controllers\ReportController::class, 'export'], $filters) }}" class="btn btn-default">
<i class="fa fa-download"></i> @lang('assetexchange::lang.export_market_comps')
</a>
{!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ReportController::class, 'importIeComps']), 'method' => 'POST', 'style' => 'display:inline;margin-right:8px;']) !!}
<button type="submit" class="btn btn-default"><i class="fa fa-upload"></i> @lang('assetexchange::lang.import_ie_comps')</button>
{!! Form::close() !!}
</div>
<div class="mt-card">
<div class="mt-card-header"><h3 class="mt-card-title">@lang('assetexchange::lang.commissions')</h3></div>
<div class="mt-card-body">
{!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ReportController::class, 'index']), 'method' => 'GET', 'class' => 'form-inline', 'style' => 'margin-bottom:12px;']) !!}
{!! Form::select('status', ['' => __('assetexchange::lang.all')] + $statuses, $filters['status'] ?? null, ['class' => 'form-control select2', 'style' => 'width:200px']) !!}
<button type="submit" class="btn btn-primary" style="margin-right:8px;">@lang('assetexchange::lang.apply_filters')</button>
{!! Form::close() !!}
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>@lang('assetexchange::lang.deal_code')</th>
<th>@lang('assetexchange::lang.listing_title')</th>
<th>@lang('assetexchange::lang.commission_user')</th>
<th>@lang('assetexchange::lang.commission_role')</th>
<th>@lang('assetexchange::lang.commission_amount')</th>
<th>@lang('assetexchange::lang.status')</th>
</tr>
</thead>
<tbody>
@forelse($commissions as $commission)
<tr>
<td>{{ $commission->deal?->deal_code ?? '—' }}</td>
<td>{{ $commission->deal?->listing?->title ?? '—' }}</td>
<td>{{ $commission->user?->user_full_name ?? '—' }}</td>
<td>{{ $commission->role }}</td>
<td>{{ $aexUtil->formatMoney($commission->amount) }}</td>
<td>{{ $aexUtil->statusLabel($commission->status) }}</td>
</tr>
@empty
<tr><td colspan="6" class="text-center text-muted">@lang('assetexchange::lang.no_records')</td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</section>
@endsection
@section('javascript')
<script>$(function(){ $('.select2').select2(); });</script>
@endsection