176 lines
9.1 KiB
PHP
176 lines
9.1 KiB
PHP
@extends('layouts.app')
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-header header-style">
|
|
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<div class="header-style-title">Semakan Billplz FPX</div>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
<form method="GET" action="{{ route('pembida.semakanbillplz') }}" class="mb-4">
|
|
<div class="form-inline">
|
|
<label for="date" class="mr-2">Pilih Tarikh:</label>
|
|
<input type="date" name="date" id="date" class="form-control mr-2" value="{{ $date }}">
|
|
<button type="submit" class="btn btn-primary">Semak</button>
|
|
</div>
|
|
</form>
|
|
|
|
<hr>
|
|
<h4>✅ Resit Telah Dibayar (PAID)</h4>
|
|
@if($paidResits->isEmpty())
|
|
<p>Tiada resit yang telah dibayar.</p>
|
|
@else
|
|
<table class="table table-bordered text-center">
|
|
<thead>
|
|
<tr>
|
|
<th>Nama Pembayar</th>
|
|
<th>ID Pembayar</th>
|
|
<th>Cawangan</th>
|
|
<th>Resit ID</th>
|
|
<th>Billplz ID</th>
|
|
<th>Jumlah (RM)</th>
|
|
<th>Dibayar Pada</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($paidResits as $resit)
|
|
<tr>
|
|
<td>{{ $resit->payer_name ?? '-' }}</td>
|
|
<td>{{ $resit->user_id }}</td>
|
|
<td>{{ $resit->cawangan_nama ?? '-' }}</td>
|
|
<td>{{ $resit->id }}</td>
|
|
<td>{{ $resit->billplz_id }}</td>
|
|
<td>{{ number_format($resit->total_payment, 2) }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($resit->paid_at)->format('d/m/Y H:i') }}</td>
|
|
<td>
|
|
<form method="POST" action="{{ route('pembida.prosesBillplz', ['resit_id' => $resit->id, 'billplz_id' => $resit->billplz_id]) }}">
|
|
@csrf
|
|
<input type="hidden" name="billplz_id" value="{{ $resit->billplz_id }}">
|
|
<input type="hidden" name="paid_at" value="{{ \Carbon\Carbon::parse($resit->paid_at)->toDateTimeString() }}">
|
|
<button type="submit" class="btn btn-sm btn-success">Proses</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
|
|
<hr>
|
|
|
|
<h4>❌ Resit Belum Dibayar (UNPAID)</h4>
|
|
@if($unpaidResits->isEmpty())
|
|
<p>Semua resit telah dibayar.</p>
|
|
@else
|
|
<table class="table table-bordered text-center">
|
|
<thead>
|
|
<tr>
|
|
<th>Nama Pembayar</th>
|
|
<th>ID Pembayar</th>
|
|
<th>Cawangan</th>
|
|
<th>Resit ID</th>
|
|
<th>Billplz ID</th>
|
|
<th>Jumlah (RM)</th>
|
|
<th>Tarikh Dicipta</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($groupedResitsUnpaid as $resit)
|
|
<tr>
|
|
<td>{{ $resit->payer_name ?? '-' }}</td>
|
|
<td>{{ $resit->user_id }}</td>
|
|
<td>{{ $resit->cawangan_nama ?? '-' }}</td>
|
|
<td>{{ $resit->resit_id }}</td>
|
|
<td>{{ $resit->billplz_id }}</td>
|
|
<td>{{ number_format($resit->jumlah_bayaran, 2) }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($resit->created_at)->format('d/m/Y H:i') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
|
|
<hr>
|
|
<h4>🔄 Resit Billplz yang Telah Dibayar Semula Melalui CDM</h4>
|
|
@if($billplzWithCdmResits->isEmpty())
|
|
<p>Tiada bayaran semula melalui CDM ditemui.</p>
|
|
@else
|
|
<table class="table table-bordered text-center">
|
|
<thead>
|
|
<tr>
|
|
<th>Nama Pembayar</th>
|
|
<th>ID Pembayar</th>
|
|
<th>Cawangan</th>
|
|
<th>Resit ID</th>
|
|
<th>Billplz ID</th>
|
|
<th>Jumlah (RM)</th>
|
|
<th>Tarikh Dicipta</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($groupedResits as $resit)
|
|
<tr>
|
|
<td>{{ $resit->payer_name }}</td>
|
|
<td>{{ $resit->user_id }}</td>
|
|
<td>{{ $resit->cawangan_nama }}</td>
|
|
<td>{{ $resit->resit_id }}</td>
|
|
<td>{{ $resit->billplz_id }}</td>
|
|
<td>{{ number_format($resit->jumlah_bayaran, 2) }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($resit->created_at)->format('d/m/Y H:i') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
|
|
<hr>
|
|
<h4>🕒 Resit Telah Dibayar Tetapi Dalam Proses (PENDING)</h4>
|
|
@if($processingResits->isEmpty())
|
|
<p>Tiada resit yang belum direlease.</p>
|
|
@else
|
|
<table class="table table-bordered text-center">
|
|
<thead>
|
|
<tr>
|
|
<th>Nama Pembayar</th>
|
|
<th>ID Pembayar</th>
|
|
<th>Cawangan</th>
|
|
<th>Resit ID</th>
|
|
<th>Billplz ID</th>
|
|
<th>Jumlah (RM)</th>
|
|
<th>Tarikh Dibayar</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($processingResits as $resit)
|
|
<tr>
|
|
<td>{{ $resit->payer_name }}</td>
|
|
<td>{{ $resit->user_id }}</td>
|
|
<td>{{ $resit->cawangan_nama ?? '-' }}</td>
|
|
<td>{{ $resit->id }}</td>
|
|
<td>{{ $resit->billplz_id }}</td>
|
|
<td>{{ number_format($resit->total_payment, 2) }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($resit->paid_at)->format('d/m/Y H:i') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |