revised generate report
This commit is contained in:
@@ -16,11 +16,11 @@ use App\Models\Cabang;
|
||||
|
||||
class ReportController extends Controller
|
||||
{
|
||||
public function index()
|
||||
public function upcountry()
|
||||
{
|
||||
$role = auth()->user()->getRoleNames()[0];
|
||||
$cabangs = [];
|
||||
$forms = [];
|
||||
$forms = null;
|
||||
|
||||
if ($role == 'Admin Region' || $role == 'Marketing Operational Manager Region') {
|
||||
$region_id = auth()->user()->getMyCabangAndRegionId()['region'];
|
||||
@@ -33,13 +33,7 @@ class ReportController extends Controller
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('region_id', $region_id)->get();
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::whereIn('user_id', $userIds)->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::whereIn('user_id', $userIds)->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::whereIn('user_id', $userIds)->get(),
|
||||
'form_others' => FormOthers::whereIn('user_id', $userIds)->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::whereIn('user_id', $userIds)->get(),
|
||||
];
|
||||
$forms = FormUpCountry::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Area Manager Cabang') {
|
||||
$cabang_id = auth()->user()->getMyCabangAndRegionId()['cabang'];
|
||||
@@ -49,34 +43,16 @@ class ReportController extends Controller
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('id', $cabang_id)->get();
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::whereIn('user_id', $userIds)->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::whereIn('user_id', $userIds)->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::whereIn('user_id', $userIds)->get(),
|
||||
'form_others' => FormOthers::whereIn('user_id', $userIds)->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::whereIn('user_id', $userIds)->get(),
|
||||
];
|
||||
$forms = FormUpCountry::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Medical Representatif') {
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
$cabangs = null;
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::where('user_id', $userId)->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::where('user_id', $userId)->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::where('user_id', $userId)->get(),
|
||||
'form_others' => FormOthers::where('user_id', $userId)->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::where('user_id', $userId)->get(),
|
||||
];
|
||||
$forms = FormUpCountry::where('user_id', $userId)->get();
|
||||
} else {
|
||||
$cabangs = Cabang::all();
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::all(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::all(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::all(),
|
||||
'form_others' => FormOthers::all(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::all(),
|
||||
];
|
||||
$forms = FormUpCountry::all();
|
||||
}
|
||||
|
||||
// get all params in url
|
||||
@@ -88,59 +64,337 @@ class ReportController extends Controller
|
||||
$users = UserHasCabang::where('cabang_id', $cabang->id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::whereIn('user_id', $userIds)->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::whereIn('user_id', $userIds)->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::whereIn('user_id', $userIds)->get(),
|
||||
'form_others' => FormOthers::whereIn('user_id', $userIds)->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::whereIn('user_id', $userIds)->get(),
|
||||
];
|
||||
$forms = $forms->whereIn('user_id', $userIds);
|
||||
}
|
||||
|
||||
if($params['start_date'] && $params['end_date']) {
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::whereBetween('tanggal', [$params['start_date'], $params['end_date']])->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::whereBetween('tanggal', [$params['start_date'], $params['end_date']])->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::whereBetween('tanggal', [$params['start_date'], $params['end_date']])->get(),
|
||||
'form_others' => FormOthers::whereBetween('tanggal', [$params['start_date'], $params['end_date']])->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::whereBetween('created_at', [$params['start_date'], $params['end_date']])->get(),
|
||||
];
|
||||
$forms = $forms->whereBetween('tanggal', [$params['start_date'], $params['end_date']]);
|
||||
}
|
||||
|
||||
if($params['start_date'] && !$params['end_date']) {
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::where('tanggal', $params['start_date'])->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::where('tanggal', $params['start_date'])->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::where('tanggal', $params['start_date'])->get(),
|
||||
'form_others' => FormOthers::where('tanggal', $params['start_date'])->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::where('created_at', $params['start_date'])->get(),
|
||||
];
|
||||
$forms = $forms->where('tanggal', $params['start_date']);
|
||||
}
|
||||
|
||||
if(!$params['start_date'] && $params['end_date']) {
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::where('tanggal', $params['end_date'])->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::where('tanggal', $params['end_date'])->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::where('tanggal', $params['end_date'])->get(),
|
||||
'form_others' => FormOthers::where('tanggal', $params['end_date'])->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::where('created_at', $params['end_date'])->get(),
|
||||
];
|
||||
$forms = $forms->where('tanggal', $params['end_date']);
|
||||
}
|
||||
|
||||
if($params['status']) {
|
||||
$forms = [
|
||||
'form_up_country' => FormUpCountry::where('status', $params['status'])->get(),
|
||||
'form_entertainment_presentation' => FormEntertaimentPresentation::where('status', $params['status'])->get(),
|
||||
'form_vehicle_running_cost' => FormVehicleRunningCost::where('status', $params['status'])->get(),
|
||||
'form_others' => FormOthers::where('status', $params['status'])->get(),
|
||||
'form_meeting_seminar' => FormMeetingSeminar::where('status', $params['status'])->get(),
|
||||
];
|
||||
$forms = $forms->where('status', $params['status']);
|
||||
}
|
||||
}
|
||||
|
||||
return view('backend.pages.report.index', [
|
||||
return view('backend.pages.report.upcountry', [
|
||||
'pageInfo' => [
|
||||
'title' => 'Generate Reports',
|
||||
'title' => 'Generate Reports For Form Up Country',
|
||||
],
|
||||
'forms' => $forms,
|
||||
'cabang' => $cabangs
|
||||
]);
|
||||
}
|
||||
|
||||
public function vehicle()
|
||||
{
|
||||
$role = auth()->user()->getRoleNames()[0];
|
||||
$cabangs = [];
|
||||
$forms = null;
|
||||
|
||||
if ($role == 'Admin Region' || $role == 'Marketing Operational Manager Region') {
|
||||
$region_id = auth()->user()->getMyCabangAndRegionId()['region'];
|
||||
|
||||
if ($region_id) {
|
||||
$users = UserHasCabang::whereHas('cabang', function ($query) use ($region_id) {
|
||||
$query->where('region_id', $region_id);
|
||||
})->get();
|
||||
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('region_id', $region_id)->get();
|
||||
$forms = FormVehicleRunningCost::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Area Manager Cabang') {
|
||||
$cabang_id = auth()->user()->getMyCabangAndRegionId()['cabang'];
|
||||
|
||||
if ($cabang_id) {
|
||||
$users = UserHasCabang::where('cabang_id', $cabang_id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('id', $cabang_id)->get();
|
||||
$forms = FormVehicleRunningCost::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Medical Representatif') {
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
$cabangs = null;
|
||||
$forms = FormVehicleRunningCost::where('user_id', $userId)->get();
|
||||
} else {
|
||||
$cabangs = Cabang::all();
|
||||
$forms = FormVehicleRunningCost::all();
|
||||
}
|
||||
|
||||
// get all params in url
|
||||
$params = request()->all();
|
||||
|
||||
if($params) {
|
||||
if ($params['cabang']) {
|
||||
$cabang = Cabang::where('code', $params['cabang'])->first();
|
||||
$users = UserHasCabang::where('cabang_id', $cabang->id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$forms = $forms->whereIn('user_id', $userIds);
|
||||
}
|
||||
|
||||
if($params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->whereBetween('tanggal', [$params['start_date'], $params['end_date']]);
|
||||
}
|
||||
|
||||
if($params['start_date'] && !$params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['start_date']);
|
||||
}
|
||||
|
||||
if(!$params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['end_date']);
|
||||
}
|
||||
|
||||
if($params['status']) {
|
||||
$forms = $forms->where('status', $params['status']);
|
||||
}
|
||||
}
|
||||
|
||||
return view('backend.pages.report.vehicle', [
|
||||
'pageInfo' => [
|
||||
'title' => 'Generate Reports For Form Vehicle Running Cost',
|
||||
],
|
||||
'forms' => $forms,
|
||||
'cabang' => $cabangs
|
||||
]);
|
||||
}
|
||||
|
||||
public function entertainment()
|
||||
{
|
||||
$role = auth()->user()->getRoleNames()[0];
|
||||
$cabangs = [];
|
||||
$forms = null;
|
||||
|
||||
if ($role == 'Admin Region' || $role == 'Marketing Operational Manager Region') {
|
||||
$region_id = auth()->user()->getMyCabangAndRegionId()['region'];
|
||||
|
||||
if ($region_id) {
|
||||
$users = UserHasCabang::whereHas('cabang', function ($query) use ($region_id) {
|
||||
$query->where('region_id', $region_id);
|
||||
})->get();
|
||||
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('region_id', $region_id)->get();
|
||||
$forms = FormEntertaimentPresentation::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Area Manager Cabang') {
|
||||
$cabang_id = auth()->user()->getMyCabangAndRegionId()['cabang'];
|
||||
|
||||
if ($cabang_id) {
|
||||
$users = UserHasCabang::where('cabang_id', $cabang_id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('id', $cabang_id)->get();
|
||||
$forms = FormEntertaimentPresentation::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Medical Representatif') {
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
$cabangs = null;
|
||||
$forms = FormEntertaimentPresentation::where('user_id', $userId)->get();
|
||||
} else {
|
||||
$cabangs = Cabang::all();
|
||||
$forms = FormEntertaimentPresentation::all();
|
||||
}
|
||||
|
||||
// get all params in url
|
||||
$params = request()->all();
|
||||
|
||||
if($params) {
|
||||
if ($params['cabang']) {
|
||||
$cabang = Cabang::where('code', $params['cabang'])->first();
|
||||
$users = UserHasCabang::where('cabang_id', $cabang->id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$forms = $forms->whereIn('user_id', $userIds);
|
||||
}
|
||||
|
||||
if($params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->whereBetween('tanggal', [$params['start_date'], $params['end_date']]);
|
||||
}
|
||||
|
||||
if($params['start_date'] && !$params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['start_date']);
|
||||
}
|
||||
|
||||
if(!$params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['end_date']);
|
||||
}
|
||||
|
||||
if($params['status']) {
|
||||
$forms = $forms->where('status', $params['status']);
|
||||
}
|
||||
}
|
||||
|
||||
return view('backend.pages.report.entertainment', [
|
||||
'pageInfo' => [
|
||||
'title' => 'Generate Reports For Form Entertainment & Presentation',
|
||||
],
|
||||
'forms' => $forms,
|
||||
'cabang' => $cabangs
|
||||
]);
|
||||
}
|
||||
|
||||
public function meeting()
|
||||
{
|
||||
$role = auth()->user()->getRoleNames()[0];
|
||||
$cabangs = [];
|
||||
$forms = null;
|
||||
|
||||
if ($role == 'Admin Region' || $role == 'Marketing Operational Manager Region') {
|
||||
$region_id = auth()->user()->getMyCabangAndRegionId()['region'];
|
||||
|
||||
if ($region_id) {
|
||||
$users = UserHasCabang::whereHas('cabang', function ($query) use ($region_id) {
|
||||
$query->where('region_id', $region_id);
|
||||
})->get();
|
||||
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('region_id', $region_id)->get();
|
||||
$forms = FormMeetingSeminar::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Area Manager Cabang') {
|
||||
$cabang_id = auth()->user()->getMyCabangAndRegionId()['cabang'];
|
||||
|
||||
if ($cabang_id) {
|
||||
$users = UserHasCabang::where('cabang_id', $cabang_id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('id', $cabang_id)->get();
|
||||
$forms = FormMeetingSeminar::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Medical Representatif') {
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
$cabangs = null;
|
||||
$forms = FormMeetingSeminar::where('user_id', $userId)->get();
|
||||
} else {
|
||||
$cabangs = Cabang::all();
|
||||
$forms = FormMeetingSeminar::all();
|
||||
}
|
||||
|
||||
// get all params in url
|
||||
$params = request()->all();
|
||||
|
||||
if($params) {
|
||||
if ($params['cabang']) {
|
||||
$cabang = Cabang::where('code', $params['cabang'])->first();
|
||||
$users = UserHasCabang::where('cabang_id', $cabang->id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$forms = $forms->whereIn('user_id', $userIds);
|
||||
}
|
||||
|
||||
if($params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->whereBetween('tanggal', [$params['start_date'], $params['end_date']]);
|
||||
}
|
||||
|
||||
if($params['start_date'] && !$params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['start_date']);
|
||||
}
|
||||
|
||||
if(!$params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['end_date']);
|
||||
}
|
||||
|
||||
if($params['status']) {
|
||||
$forms = $forms->where('status', $params['status']);
|
||||
}
|
||||
}
|
||||
|
||||
return view('backend.pages.report.meeting', [
|
||||
'pageInfo' => [
|
||||
'title' => 'Generate Reports For Form Meeting & Seminar',
|
||||
],
|
||||
'forms' => $forms,
|
||||
'cabang' => $cabangs
|
||||
]);
|
||||
}
|
||||
|
||||
public function others()
|
||||
{
|
||||
$role = auth()->user()->getRoleNames()[0];
|
||||
$cabangs = [];
|
||||
$forms = null;
|
||||
|
||||
if ($role == 'Admin Region' || $role == 'Marketing Operational Manager Region') {
|
||||
$region_id = auth()->user()->getMyCabangAndRegionId()['region'];
|
||||
|
||||
if ($region_id) {
|
||||
$users = UserHasCabang::whereHas('cabang', function ($query) use ($region_id) {
|
||||
$query->where('region_id', $region_id);
|
||||
})->get();
|
||||
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('region_id', $region_id)->get();
|
||||
$forms = FormOthers::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Area Manager Cabang') {
|
||||
$cabang_id = auth()->user()->getMyCabangAndRegionId()['cabang'];
|
||||
|
||||
if ($cabang_id) {
|
||||
$users = UserHasCabang::where('cabang_id', $cabang_id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$cabangs = Cabang::where('id', $cabang_id)->get();
|
||||
$forms = FormOthers::whereIn('user_id', $userIds)->get();
|
||||
}
|
||||
} else if ($role == 'Medical Representatif') {
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
$cabangs = null;
|
||||
$forms = FormOthers::where('user_id', $userId)->get();
|
||||
} else {
|
||||
$cabangs = Cabang::all();
|
||||
$forms = FormOthers::all();
|
||||
}
|
||||
|
||||
// get all params in url
|
||||
$params = request()->all();
|
||||
|
||||
if($params) {
|
||||
if ($params['cabang']) {
|
||||
$cabang = Cabang::where('code', $params['cabang'])->first();
|
||||
$users = UserHasCabang::where('cabang_id', $cabang->id)->get();
|
||||
$userIds = $users->pluck('user_id')->toArray();
|
||||
|
||||
$forms = $forms->whereIn('user_id', $userIds);
|
||||
}
|
||||
|
||||
if($params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->whereBetween('tanggal', [$params['start_date'], $params['end_date']]);
|
||||
}
|
||||
|
||||
if($params['start_date'] && !$params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['start_date']);
|
||||
}
|
||||
|
||||
if(!$params['start_date'] && $params['end_date']) {
|
||||
$forms = $forms->where('tanggal', $params['end_date']);
|
||||
}
|
||||
|
||||
if($params['status']) {
|
||||
$forms = $forms->where('status', $params['status']);
|
||||
}
|
||||
}
|
||||
|
||||
return view('backend.pages.report.others', [
|
||||
'pageInfo' => [
|
||||
'title' => 'Generate Reports For Form Others',
|
||||
],
|
||||
'forms' => $forms,
|
||||
'cabang' => $cabangs
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>User</th>
|
||||
<th>Cabang</th>
|
||||
<th>Nama Penerima</th>
|
||||
@@ -112,6 +113,7 @@
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<thead class="bg-light text-capitalize" style="width: 100%">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
@@ -110,6 +111,7 @@
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
@@ -113,6 +114,7 @@
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.entertainment') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Entertainment Presentation Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Entertainment & Presentation</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>User</th>
|
||||
<th>Cabang</th>
|
||||
<th>Nama Penerima</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Jenis</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Bukti</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->jenis }}</td>
|
||||
<td>{{ $item->keterangan }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,452 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Up Country Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Up Country</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-form_up_country">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Rayon</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Tujuan</th>
|
||||
<th>Jarak</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms['form_up_country'] as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ $item->rayon->code }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->tujuan }}</td>
|
||||
<td>{{ $item->jarak }} km</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->approved_total)
|
||||
{{ number_format($item->approved_total, 0, ',', '.') }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Vehicle Running Cost Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Vehicle Running Cost</h4>
|
||||
<div class="data-tables">
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-form_vehicle_running_cost">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Liter</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Jarak</th>
|
||||
<th>Tipe Bensin</th>
|
||||
<th>Nomor Polisi</th>
|
||||
<th>Bukti</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms['form_vehicle_running_cost'] as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
|
||||
<td>{{ $item->liter }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>{{ $item->jarak }} km</td>
|
||||
<td>{{ $item->tipe_bensin }}</td>
|
||||
<td>{{ $item->nopol }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Entertainment Presentation Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Entertainment Presentation</h4>
|
||||
<div class="data-tables">
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-form_entertainment_presentation">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>User</th>
|
||||
<th>Cabang</th>
|
||||
<th>Nama Penerima</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Jenis</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Bukti</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms['form_entertainment_presentation'] as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->jenis }}</td>
|
||||
<td>{{ $item->keterangan }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Meeting Seminar Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Meeting Seminar</h4>
|
||||
<div class="data-tables">
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-form_meeting_seminar">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Allowance</th>
|
||||
<th>Transport Ankot</th>
|
||||
<th>Hotel</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms['form_meeting_seminar'] as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->created_at)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ number_format($item->allowance, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->transport_ankot, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->hotel, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Others Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Others</h4>
|
||||
<div class="data-tables">
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-form_others">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Jenis</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Total</th>
|
||||
<th>Bukti Total</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms['form_others'] as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->kategori->name }}</td>
|
||||
<td>{{ $item->keterangan }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
// Initialize DataTables for each table
|
||||
if ($('#dataTable-form_up_country').length) {
|
||||
$('#dataTable-form_up_country').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
if ($('#dataTable-form_vehicle_running_cost').length) {
|
||||
$('#dataTable-form_vehicle_running_cost').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
if ($('#dataTable-form_entertainment_presentation').length) {
|
||||
$('#dataTable-form_entertainment_presentation').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
if ($('#dataTable-form_meeting_seminar').length) {
|
||||
$('#dataTable-form_meeting_seminar').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
if ($('#dataTable-form_others').length) {
|
||||
$('#dataTable-form_others').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,159 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.meeting') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Meeting & Seminar Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Meeting & Seminar</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Allowance</th>
|
||||
<th>Transport Ankot</th>
|
||||
<th>Hotel</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->created_at)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ number_format($item->allowance, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->transport_ankot, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->hotel, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,165 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.others') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Others Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Others</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Jenis</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Total</th>
|
||||
<th>Bukti Total</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->kategori->name }}</td>
|
||||
<td>{{ $item->keterangan }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,165 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.upcountry') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Up Country Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Up Country</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Rayon</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Tujuan</th>
|
||||
<th>Jarak</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ $item->rayon->code }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
|
||||
<td>{{ $item->tujuan }}</td>
|
||||
<td>{{ $item->jarak }} km</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>
|
||||
@if ($item->approved_total)
|
||||
{{ number_format($item->approved_total, 0, ',', '.') }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,171 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.vehicle') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control">
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Start Date</label>
|
||||
<input type="date" name="start_date" class="form-control" value="{{ request()->start_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">End Date</label>
|
||||
<input type="date" name="end_date" class="form-control" value="{{ request()->end_date }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="status">Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Semua Status</option>
|
||||
<option value="On Progress" {{ request()->status == 'On Progress' ? 'selected' : '' }}>On Progress</option>
|
||||
<option value="Approved" {{ request()->status == 'Approved' ? 'selected' : '' }}>Approved</option>
|
||||
<option value="Closed" {{ request()->status == 'Closed' ? 'selected' : '' }}>Closed</option>
|
||||
<option value="Rejected" {{ request()->status == 'Rejected' ? 'selected' : '' }}>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- submit button --}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\NextCloudHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- Form Up Vehicle Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Form Vehicle Running Cost</h4>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Expense</th>
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Liter</th>
|
||||
<th>Total</th>
|
||||
<th>Total Approved</th>
|
||||
<th>Jarak</th>
|
||||
<th>Tipe Bensin</th>
|
||||
<th>Nomor Polisi</th>
|
||||
<th>Bukti</th>
|
||||
<th>Account Number</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($forms as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->expense_number }}</td>
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
|
||||
<td>{{ $item->liter }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($item->approved_total, 0, ',', '.') }}</td>
|
||||
<td>{{ $item->jarak }} km</td>
|
||||
<td>{{ $item->tipe_bensin }}</td>
|
||||
<td>{{ $item->nopol }}</td>
|
||||
<td>
|
||||
@if ($item->bukti_total)
|
||||
<a href="{{ NextCloudHelper::getFileUrl($item->bukti_total) }}" target="_blank">
|
||||
Download
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>
|
||||
@if ($item->status == 'On Progress')
|
||||
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
||||
@elseif ($item->status == 'Approved' || $item->status == 'Final Approved')
|
||||
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
||||
@else
|
||||
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
+5
-1
@@ -103,7 +103,11 @@ Route::middleware(['auth:admin', 'menu'])->group(function () {
|
||||
});
|
||||
|
||||
Route::prefix('reports')->group(function () {
|
||||
Route::get('/', [ReportController::class, 'index'])->name('reports');
|
||||
Route::get('/upcountry', [ReportController::class, 'upcountry'])->name('reports.upcountry');
|
||||
Route::get('/vehicle', [ReportController::class, 'vehicle'])->name('reports.vehicle');
|
||||
Route::get('/entertainment', [ReportController::class, 'entertainment'])->name('reports.entertainment');
|
||||
Route::get('/meeting', [ReportController::class, 'meeting'])->name('reports.meeting');
|
||||
Route::get('/others', [ReportController::class, 'others'])->name('reports.others');
|
||||
});
|
||||
|
||||
// Forms
|
||||
|
||||
Reference in New Issue
Block a user