225 lines
14 KiB
PHP
225 lines
14 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="fixed inset-0 z-10 hidden bg-gray-900 opacity-50" id="sidebarBackdrop"></div>
|
|
<div id="main-content" class="relative w-full h-full overflow-y-auto bg-gray-50">
|
|
<main>
|
|
<div class="px-4 pt-6">
|
|
<breadcrumb
|
|
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' }, { 'title': 'Bayaran Online', 'icon': 'fas fa-users' }]">
|
|
</breadcrumb>
|
|
|
|
<div class="container">
|
|
<div class="flex w-full">
|
|
<div class="p-8 mx-auto xl:w-2/3 2xl:w-1/2">
|
|
<div class="px-6 py-4 text-lg text-gray-200 bg-yellow-600 rounded-t-lg">
|
|
<a href="{{ route('reports') }}" class="router-link-active">
|
|
<i class="text-white fas fa-backspace"></i>
|
|
</a>
|
|
<span class="mx-auto font-bold text-center text-white">Bayaran Online</span>
|
|
</div>
|
|
<form method="get" id="form-bayaran-online" action="{{ route('reports.bayaran-online.index') }}">
|
|
<input type="hidden" id="formAction" name="action" value="search"> <!-- Hidden field to store action -->
|
|
<div class="flex items-center justify-center p-6 bg-white rounded shadow">
|
|
<div class="pb-6">
|
|
<div class="flex gap-4">
|
|
<div>
|
|
<label class="block pb-1 font-semibold text-gray-700">Mula</label>
|
|
<input name="startDate" type="date"
|
|
value="{{ request()->startDate ?? $startDate }}"
|
|
class="w-full px-4 py-2 border border-2 rounded" placeholder="Dari">
|
|
</div>
|
|
<div>
|
|
<label class="block pb-1 font-semibold text-gray-700">Hingga</label>
|
|
<input name="endDate" type="date"
|
|
value="{{ request()->endDate ?? $endDate }}"
|
|
class="w-full px-4 py-2 border border-2 rounded" placeholder="Dari">
|
|
</div>
|
|
|
|
<button type="submit" onclick="setAction('search')" class="px-8 py-2 ml-5 font-medium text-yellow-600 transition-all duration-300 border border-yellow-600 font-montserrat rounded-xl hover:bg-yellow-600 hover:text-white">
|
|
<i class="mr-2 fas fa-magnifying-glass"></i> Search
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-5 border border-gray-400 summary-table">
|
|
<x-table>
|
|
<x-slot name="header">
|
|
<x-table.header content="Dari Tarikh" />
|
|
<x-table.header content="Hingga Tarikh" />
|
|
<x-table.header content="Bilangan SAG" />
|
|
<x-table.header content="Jumlah Bayaran Online" />
|
|
<x-table.header content="Export PAID" />
|
|
<x-table.header content="Export UNSUCCESSFUL" />
|
|
</x-slot>
|
|
<x-slot name="body">
|
|
<tr>
|
|
<x-table.data :content="$startDate->toDateString()" />
|
|
<x-table.data :content="$endDate->toDateString()" />
|
|
<x-table.data :content="$data['sortedByTotalCawanganPayment']['nosPayments']" />
|
|
<x-table.data :content="$data['sortedByTotalReferenceNo']['sumTotalPayments']" />
|
|
<div>
|
|
<td class="py-5 text-sm bg-white border-b border-gray-200">
|
|
<div class="flex items-center">
|
|
<div class="ml-3">
|
|
<p class="text-gray-900 whitespace-no-wrap">
|
|
@if($data['sortedByTotalCawanganPayment']['nosPayments'] != 0)
|
|
<a href="{{ route('reports.bayaran-online-detail.index', ['startDate' => request()->startDate, 'endDate' => request()->endDate, 'status' => 'PAID']) }}" class="px-3 py-2 font-medium text-yellow-600 transition-all duration-300 border border-yellow-600 font-montserrat rounded-xl hover:bg-yellow-600 hover:text-white">
|
|
<i class="fas fa-file-excel"></i> Export
|
|
</a>
|
|
@else
|
|
<span class="pl-3">Tiada</span>
|
|
@endif
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
<div>
|
|
<td class="py-5 text-sm bg-white border-b border-gray-200">
|
|
<div class="flex items-center">
|
|
<div class="ml-3">
|
|
<p class="text-gray-900 whitespace-no-wrap">
|
|
@if($data['sortedByTotalCawanganPayment']['nosPayments'] != 0)
|
|
<a href="{{ route('reports.bayaran-online-detail.index', ['startDate' => request()->startDate, 'endDate' => request()->endDate, 'status' => 'UNSUCCESSFUL']) }}" class="px-3 py-2 font-medium text-yellow-600 transition-all duration-300 border border-yellow-600 font-montserrat rounded-xl hover:bg-yellow-600 hover:text-white">
|
|
<i class="fas fa-file-excel"></i> Export
|
|
</a>
|
|
@else
|
|
<span class="pl-3">Tiada</span>
|
|
@endif
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</tr>
|
|
</x-slot>
|
|
</x-table>
|
|
</div>
|
|
|
|
<div class="flex gap-4">
|
|
|
|
<div class="w-1/2 pt-3 m-4 sorted-by-payment">
|
|
<span>Urutan mengikut jumlah bayaran *</span>
|
|
<div class="border border-gray-400">
|
|
<x-table>
|
|
<x-slot name="header">
|
|
<x-table.header content="No" />
|
|
<x-table.header content="Cawangan" />
|
|
<x-table.header content="Bilangan SAG" />
|
|
<x-table.header content="Jumlah Bayaran Online(RM)" />
|
|
<x-table.header content="Export" />
|
|
</x-slot>
|
|
<x-slot name="body">
|
|
@forelse($data['sortedByTotalCawanganPayment']['transactions'] as $transaction)
|
|
<tr>
|
|
<x-table.data :content="$loop->iteration" />
|
|
<x-table.data :content="$transaction['cawangan']['details_caw']" />
|
|
<x-table.data :content="$transaction['totalReferenceNo']" />
|
|
<x-table.data :content="$transaction['totalCawanganPayment']" />
|
|
<div>
|
|
<td class="text-sm bg-white border-b border-gray-200 ">
|
|
<div class="flex items-center">
|
|
<div class="ml-3">
|
|
<p class="text-gray-900 whitespace-no-wrap">
|
|
<a href="{{ route('reports.bayaran-online-detail.index', ['startDate' => request()->startDate, 'endDate' => request()->endDate, 'kodcaw' => $transaction['cawangan']['kodcaw'], 'details_caw' => $transaction['cawangan']['details_caw']]) }}" class="px-1 py-2 font-medium text-yellow-600 transition-all duration-300 border border-yellow-600 font-montserrat rounded-xl hover:bg-yellow-600 hover:text-white">
|
|
<i class="fas fa-file-excel"></i> Export
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<div>
|
|
<td class="text-sm bg-white border-b border-gray-200" colspan="5">
|
|
<div class="flex items-center">
|
|
<div class="ml-3">
|
|
<p class="py-3 text-gray-900 whitespace-no-wrap">
|
|
Tiada transaksi pada tarikh yang dipilih
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</tr>
|
|
@endforelse
|
|
</x-slot>
|
|
</x-table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="w-1/2 pt-3 m-4 sorted-by-number-sag">
|
|
<span>Urutan mengikut bilangan SAG</span>
|
|
<div class="border border-gray-400 ">
|
|
<x-table>
|
|
<x-slot name="header">
|
|
<x-table.header content="No" />
|
|
<x-table.header content="Cawangan" />
|
|
<x-table.header content="Bilangan SAG" />
|
|
<x-table.header content="Jumlah Bayaran Online(RM)" />
|
|
<x-table.header content="Export" />
|
|
</x-slot>
|
|
<x-slot name="body">
|
|
@forelse($data['sortedByTotalReferenceNo']['transactions'] as $transaction)
|
|
<tr>
|
|
<x-table.data :content="$loop->iteration" />
|
|
<x-table.data :content="$transaction['cawangan']['details_caw']" />
|
|
<x-table.data :content="$transaction['totalReferenceNo']" />
|
|
<x-table.data :content="$transaction['totalCawanganPayment']" />
|
|
<div>
|
|
<td class="text-sm bg-white border-b border-gray-200 ">
|
|
<div class="flex items-center">
|
|
<div class="ml-3">
|
|
<p class="text-gray-900 whitespace-no-wrap">
|
|
<a href="{{ route('reports.bayaran-online-detail.index', ['startDate' => request()->startDate, 'endDate' => request()->endDate, 'kodcaw' => $transaction['cawangan']['kodcaw'], 'details_caw' => $transaction['cawangan']['details_caw']]) }}" class="px-1 py-2 font-medium text-yellow-600 transition-all duration-300 border border-yellow-600 font-montserrat rounded-xl hover:bg-yellow-600 hover:text-white">
|
|
<i class="fas fa-file-excel"></i> Export
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<div>
|
|
<td class="text-sm bg-white border-b border-gray-200" colspan="5">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center ml-3">
|
|
<p class="py-3 text-gray-900 whitespace-no-wrap">
|
|
Tiada transaksi pada tarikh yang dipilih
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</div>
|
|
</tr>
|
|
@endforelse
|
|
</x-slot>
|
|
</x-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</main>
|
|
@include('layouts.footer')
|
|
</div>
|
|
@endsection
|
|
|
|
<script>
|
|
function setAction(action) {
|
|
document.getElementById('formAction').value = action;
|
|
document.getElementById('form-bayaran-online').submit();
|
|
}
|
|
</script>
|