tambah laporan keseluruhan peti besi

This commit is contained in:
BTMS2
2025-05-04 11:23:57 +08:00
parent e250f66797
commit f70c2ef4ef
6 changed files with 274 additions and 0 deletions
@@ -62,6 +62,12 @@
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Outstanding</h2>
</a>
</div>
<div
class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
<a href="{{ route('reports.petibesi.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Peti Besi Cawangan</h2>
</a>
</div>
</div>
</div>
</div>
+11
View File
@@ -317,6 +317,17 @@
</li>
</a>
<a href="{{ route('reports') }}" class="rounded mb-2 mr-2 {{ Route::is('reports') || Route::is('reports.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
<div class="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
<span class="ml-2 text-lg">Laporan Keseluruhan</span>
</div>
</li>
</a>
{{-- <a href="{{ route('permohonan.index') }}" class="rounded mb-2 mr-2
{{ Route::is('permohonan') || Route::is('permohonan.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
@@ -0,0 +1,99 @@
@extends('layouts.app')
@section('content')
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
<main>
<div class="pt-6 px-4">
<breadcrumb
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' }, { 'title': 'PetiBesi', 'icon': 'fas fa-users' }]">
</breadcrumb>
<div class="container">
<div class="flex w-full">
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
<a href="{{ route('reports') }}" class="router-link-active">
<i class="fas fa-backspace text-white"></i>
</a>
<span class="text-center mx-auto text-white font-bold">Peti Besi</span>
</div>
<form method="get" id="formpetibesi" action="{{ route('reports.petibesi.index') }}">
<input type="hidden" id="formAction" name="action" value="search"> <!-- Hidden field to store action -->
<div class="rounded bg-white shadow p-6">
<div class="pb-6">
<label class="font-semibold text-gray-700 block pb-1">Tarikh</label>
<div class="flex space-x-2">
<input name="endDate" type="date"
value="{{ request()->endDate ?? $endDate }}"
class="border border-2 rounded px-4 py-2 w-full" placeholder="Hingga">
<button type="submit" onclick="setAction('search')" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5">
<i class="fas fa-magnifying-glass mr-2"></i> Search
</button>
<button type="submit" onclick="setAction('excel')" class="border border-yellow-600 text-yellow-600 py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-2">
<i class="fas fa-file-excel mr-2"></i> Excel
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div kodcaw="operasi">
<table class="min-w-full leading-normal">
<thead class="text-center">
<tr>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">No</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Kod Cawangan</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Cawangan</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Nilai (RM)</th>
<!-- <th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Action</th> -->
</tr>
</thead>
@php
$totalbakieod = 0; // LAMA
$totalAllbakieod = 0; // SEMUA
@endphp
<tbody>
@forelse ($petibesi as $outs)
@php
$totalbakieod += $outs['bakieod'];
$totalAllbakieod += $outs['bakieod'];
@endphp
<tr>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $loop->iteration }}</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['kodcaw'] }}</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['details_caw'] }}</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['bakieod'],2) }}</td>
</tr>
@empty
<tr>
<td colspan="8" class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center text-gray-500">Data not available</td>
</tr>
@endforelse
<tr class="font-semibold bg-gray-50">
<td colspan="3" class="px-5 py-5 border-b border-gray-200 text-sm">Jumlah Keseluruhan</td>
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalAllbakieod ,2)}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
@include('layouts.footer')
</div>
@endsection
<script>
function setAction(action) {
document.getElementById('formAction').value = action;
document.getElementById('formpetibesi').submit();
}
</script>