Merge remote main
This commit is contained in:
@@ -0,0 +1,501 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Account Statements - {{ $bankDetails['name'] }}</title>
|
||||
<!-- Load Tailwind CSS -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
/* Custom styles for the Inter font */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
|
||||
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.statement-table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* A4 Print Optimization */
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 8mm; /* Minimal margin to prevent printer cutoff */
|
||||
padding: 8mm;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: white;
|
||||
font-size: 9pt;
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
|
||||
.statement-container {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 !important;
|
||||
padding: 3mm 5mm !important; /* Minimal padding */
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
header {
|
||||
border-color: #1f2937 !important;
|
||||
}
|
||||
|
||||
/* Optimize table for print */
|
||||
.statement-table {
|
||||
font-size: 8pt;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.statement-table th {
|
||||
padding: 4px 6px !important;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
.statement-table td {
|
||||
padding: 3px 6px !important;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
/* Reduce header size */
|
||||
header h1 {
|
||||
font-size: 20pt !important;
|
||||
}
|
||||
|
||||
header .text-sm {
|
||||
font-size: 8pt !important;
|
||||
}
|
||||
|
||||
/* Reduce summary section */
|
||||
.bg-blue-50 {
|
||||
padding: 8px !important;
|
||||
margin-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.bg-blue-50 h2 {
|
||||
font-size: 14pt !important;
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
.bg-blue-50 .text-sm {
|
||||
font-size: 8pt !important;
|
||||
}
|
||||
|
||||
/* Reduce final summary box */
|
||||
.max-w-lg {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* Prevent page breaks inside table rows */
|
||||
.statement-table tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/* Keep header rows on every page if table spans multiple pages */
|
||||
.statement-table thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.statement-table tfoot {
|
||||
display: table-footer-group;
|
||||
}
|
||||
|
||||
/* Reduce margins and padding throughout */
|
||||
header {
|
||||
padding-bottom: 4mm !important;
|
||||
margin-bottom: 4mm !important;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 4mm !important;
|
||||
}
|
||||
|
||||
.mb-6 {
|
||||
margin-bottom: 3mm !important;
|
||||
}
|
||||
|
||||
.p-8 {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.p-4 {
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.p-6 {
|
||||
padding: 8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.statement-container {
|
||||
max-width: 80rem;
|
||||
}
|
||||
|
||||
.print\:page-break-before {
|
||||
page-break-before: always;
|
||||
break-before: page;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="p-8">
|
||||
|
||||
@php
|
||||
// Helper function to format currency for the template
|
||||
function formatCurrency($amount, $currency = 'RM')
|
||||
{
|
||||
return is_numeric($amount) ? `$currency ` . number_format($amount, 2) : '-';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="statement-container mx-auto bg-white p-8 shadow-lg rounded-lg border border-gray-200">
|
||||
|
||||
<!-- Header Section -->
|
||||
<header class="flex justify-between items-start pb-6 border-b-4 border-gray-800 mb-6">
|
||||
<div class="flex-shrink-0">
|
||||
<h1 class="text-xl font-extrabold text-gray-800 uppercase tracking-widest">{{ $bankDetails['name'] }}
|
||||
</h1>
|
||||
<p class="text-sm mt-1 text-gray-600">{!! $bankDetails['address'] !!}</p>
|
||||
</div>
|
||||
<div class="text-right flex flex-col items-end">
|
||||
<div class="text-xl font-bold text-gray-700 mb-2">{{ $gadaian['norujukan'] }}</div>
|
||||
<div class="bg-gray-100 p-3 rounded-lg text-sm grid grid-cols-2 gap-x-4 gap-y-1 w-full">
|
||||
<span class="font-semibold text-gray-700">IC:</span>
|
||||
<span class="text-gray-900 font-mono">{{ $gadaian['nokp'] }}</span>
|
||||
|
||||
<span class="font-semibold text-gray-700">Tarikh Pembiayaan:</span>
|
||||
<span class="text-gray-900">{{ $gadaian['t_gadai'] }}</span>
|
||||
|
||||
<span class="font-semibold text-gray-700">Tempoh Pembiayaan:</span>
|
||||
<span class="text-gray-900 text-xs">{{ $gadaian['tempoh'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Address and Statement Info -->
|
||||
<div class="flex justify-between items-start mb-8">
|
||||
<!-- Account Holder Address -->
|
||||
<div class="w-1/2 pr-4">
|
||||
<p class="text-lg font-bold text-gray-900 uppercase">{{ $accountHolder['name'] }}</p>
|
||||
<p class="text-sm text-gray-700 uppercase">{!! $accountHolder['address'] !!}</p>
|
||||
<p class="text-sm text-gray-700 uppercase">{{ $accountHolder['city_state_zip'] }}</p>
|
||||
</div>
|
||||
<!-- Branch Info (from PDF structure) -->
|
||||
<div class="w-1/2 text-right">
|
||||
<p class="text-sm font-semibold text-gray-700">{{ $bankDetails['branch'] }}</p>
|
||||
<p class="text-xs text-gray-500 mt-1">Page 1 of 1</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Account Summary -->
|
||||
<div class="mb-8 p-4 bg-blue-50 rounded-lg shadow-inner">
|
||||
<h2 class="text-xl font-bold text-blue-800 mb-3 border-b pb-2">Ringkasan Pembiayaan</h2>
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-4 text-sm">
|
||||
<!-- Row 1 -->
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Pembiayaan:</div>
|
||||
<div class="text-gray-900 font-bold text-lg">{{ formatCurrency($gadaian['pinjaman']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Nilai Marhun:</div>
|
||||
<div class="text-green-600 font-bold text-lg">{{ formatCurrency($gadaian['nilaimarhun']) }}</div>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">1 Percent:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah']) }}</div>
|
||||
<div class="font-semibold text-gray-700">Ujrah:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['onepercent']) }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Keuntungan:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah'] + $gadaian['onepercent']) }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Harga Jualan:</div>
|
||||
<div class="text-gray-900">{{ formatCurrency($gadaian['hargajualan']) }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Jumlah Transaksi:</div>
|
||||
<div class="text-gray-900">{{ $transaction_count }}</div>
|
||||
</div>
|
||||
<div class="bg-blue-200 p-2 rounded-md shadow-md">
|
||||
<div class="font-semibold text-blue-900">Harga Tebus:</div>
|
||||
<div class="text-blue-900 font-extrabold text-xl">{{ formatCurrency($tebusTransaction['duit_masuk']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Transactions Table -->
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-gray-800 mb-3 border-b pb-2">Transaksi</h2>
|
||||
|
||||
<table class="w-full statement-table text-left text-sm">
|
||||
<thead>
|
||||
<tr class="bg-gray-100 text-gray-700 uppercase tracking-wider">
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12">Tarikh</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12">Deskripsi</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12">Tempoh</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Bayaran (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Upah (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Pembiayaan (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Rebet (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Baki (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $totalUpahRebet=0;$totalUpah = 0; $totalBayaran = 0; $totalPembiayaan = 0; $totalRebet = 0; @endphp
|
||||
@foreach ($ansuranTransaction as $transaction)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($transaction['created_at'])) }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300">{{ ($transaction['teller'] == 'Online') ? 'Bayaran Online' : 'Bayaran Kaunter' }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ $transaction['beza_tempoh'] }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||
@if ($transaction['duit_masuk'])
|
||||
{{ formatCurrency($transaction['duit_masuk']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($transaction['bayaran_keuntungan'])
|
||||
{{ formatCurrency($transaction['bayaran_keuntungan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($transaction['bayaran_pembiayaan'])
|
||||
{{ formatCurrency($transaction['bayaran_pembiayaan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ formatCurrency($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']) }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ formatCurrency($transaction['bakipinjaman']) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $totalUpahRebet += $transaction['keuntungan_rebet']; $totalUpah += $transaction['bayaran_keuntungan']; $totalBayaran += $transaction['duit_masuk']; $totalPembiayaan += $transaction['bayaran_pembiayaan']; $totalRebet += ($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']);@endphp
|
||||
@endforeach
|
||||
|
||||
<!-- Tebus Transaction Row -->
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($tebusTransaction['created_at'])) }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300">Tebus Kaunter</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ $tebusTransaction['beza_tempoh'] }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||
@if ($tebusTransaction['duit_masuk'])
|
||||
{{-- {{ formatCurrency($tebusTransaction['duit_masuk']) }} --}}
|
||||
-
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($tebusTransaction['bayaran_keuntungan'])
|
||||
{{ formatCurrency($tebusTransaction['bayaran_keuntungan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($tebusTransaction['bayaran_pembiayaan'])
|
||||
{{-- {{ formatCurrency($tebusTransaction['bayaran_pembiayaan']) }} --}}
|
||||
-
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
@php $tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusTransaction['keuntungan_rebet']) - $totalRebet;@endphp
|
||||
{{ formatCurrency($tebusRebet) }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
0
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Closing Balance Row -->
|
||||
<tr class="bg-blue-100 font-bold text-base text-blue-900">
|
||||
<td colspan="3" class="py-3 px-4 border border-gray-300 text-center">Jumlah</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalBayaran) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalUpah + $tebusTransaction['bayaran_keuntungan']) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalPembiayaan) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalRebet + $tebusRebet) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="print:page-break-before flex">
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||
SEMAKAN BAKI PEMBIAYAAN</h2>
|
||||
</div>
|
||||
@php
|
||||
/*Calculation Baki Pembiayaan*/
|
||||
$bakiPembiayaan = $tebusTransaction['bayaran_pembiayaan'];
|
||||
$onePercent = $tebusTransaction['onepercent'];
|
||||
$onePercentRebet = $tebusTransaction['onepercent'] - $tebusTransaction['onepercent_rebet'];
|
||||
$ujrah = $tebusTransaction['ujrah'];
|
||||
$ujrahRebet = $tebusTransaction['ujrah'] - $tebusTransaction['ujrah_rebet'];
|
||||
$totalBayaranPembiayaan = $bakiPembiayaan + $onePercent - $onePercentRebet + $ujrah - $ujrahRebet;
|
||||
@endphp
|
||||
|
||||
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||
<div class="col-span-1"></div>
|
||||
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||
|
||||
{{-- Beginning Balance --}}
|
||||
<div class="col-span-1 font-semibold">Baki Pembiayaan</div>
|
||||
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||
{{ formatCurrency($bakiPembiayaan) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Keuntungan 1%</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($onePercent) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(-) Rebet Keuntungan 1%</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($onePercentRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Ujrah</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($ujrah) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(-) Rebet Ujrah</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($ujrahRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||
<div class="col-span-2 my-2"></div>
|
||||
|
||||
{{-- Ending Balance --}}
|
||||
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||
<div class="col-span-1 text-right font-bold text-lg">
|
||||
{{ formatCurrency($totalBayaranPembiayaan) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||
SEMAKAN BAKI HARGA JUALAN</h2>
|
||||
</div>
|
||||
|
||||
@php
|
||||
/*Calculation Baki Harga Jualan*/
|
||||
$bakiHargaJualan = $gadaian['hargajualan'] - $totalBayaran;
|
||||
$upah12 = $gadaian['upah12'];
|
||||
$totalUpahRebet = $totalUpahRebet;
|
||||
$tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusRebet);
|
||||
$totalBayaranBakiHargaJualan = $bakiHargaJualan - $upah12 + $totalUpahRebet + $tebusRebet;
|
||||
@endphp
|
||||
|
||||
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||
<div class="col-span-1"></div>
|
||||
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||
|
||||
{{-- Beginning Balance --}}
|
||||
<div class="col-span-1 font-semibold">Baki Harga Jualan</div>
|
||||
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||
{{ formatCurrency($bakiHargaJualan) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(-) Upah 12</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($upah12) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(+) Jumlah Rebet</div>
|
||||
<div class="col-span-1 text-right ">
|
||||
{{ formatCurrency($totalUpahRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Upah Tebus Rebet</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($tebusRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||
<div class="col-span-2 my-2"></div>
|
||||
|
||||
{{-- Ending Balance --}}
|
||||
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||
<div class="col-span-1 text-right font-bold text-lg">
|
||||
{{ formatCurrency($totalBayaranBakiHargaJualan) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer / Notices -->
|
||||
<footer class="pt-6 border-t border-gray-300 text-center text-xs text-gray-500">
|
||||
<p>Ini ialah penyata akaun yang dijana secara automatik. Sila hubungi kami untuk sebarang percanggahan</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Print Button (non-functional in this environment, but useful in a real app) -->
|
||||
<div class="no-print max-w-4xl mx-auto mt-4 text-center">
|
||||
<button onclick="window.print()"
|
||||
class="px-6 py-2 bg-indigo-600 text-white font-semibold rounded-lg shadow-md hover:bg-indigo-700 transition duration-150">
|
||||
<svg class="w-4 h-4 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2z">
|
||||
</path>
|
||||
</svg>
|
||||
Print Statement
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -163,6 +163,16 @@
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
@php
|
||||
$reportNames = [
|
||||
'arrahnpay' => 'Laporan Ansuran Pembiayaan (Arrahn Pay)',
|
||||
'kaunter' => 'Laporan Ansuran Pembiayaan (Kaunter aros)',
|
||||
'all' => 'Laporan Ansuran Pembiayaan Semua'
|
||||
];
|
||||
|
||||
$displayJenisLaporan = $reportNames[$jenisLaporan] ?? 'Laporan Tidak Diketahui';
|
||||
@endphp
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@@ -171,10 +181,10 @@
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan="5"><b>LAPORAN ANSURAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
<th colspan="5"><b>{{ $displayJenisLaporan }} (arOSv3)</b></th>
|
||||
@else
|
||||
<th> </th>
|
||||
<th colspan ="5"><b>LAPORAN ANSURAN PEMBIAYAAN</b></thh>
|
||||
<th colspan ="5"><b>{{ $displayJenisLaporan }}</b></thh>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -233,6 +243,8 @@
|
||||
$totalbulansama = 0;
|
||||
@endphp
|
||||
@foreach($tebus as $index=>$item)
|
||||
{{-- @foreach($tebus as $index=>$item)
|
||||
@continue($item['teller'] === 'Online') --}}
|
||||
@php
|
||||
$tarikh_tebus = new DateTime($item['tarikh_bayaran']);
|
||||
$tarikh_gadai = new DateTime($item['t_gadai']);
|
||||
@@ -384,4 +396,13 @@
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function filterLaporan(jenis) {
|
||||
// Dapatkan tarikh mula dan hingga jika ada dalam form
|
||||
const mula = '{{ $mula_date }}';
|
||||
const hingga = '{{ $hingga_date }}';
|
||||
window.location.href = `?jenis=${jenis}&mula=${mula}&hingga=${hingga}`;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,339 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:8px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.new-page {
|
||||
page-break-before: always;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan ="5"><b>LAPORAN BARANG KES(arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan ="5"><b>LAPORAN BARANG KES</b></th>
|
||||
@endif
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5"><b> TARIKH CETAK:</b>
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp
|
||||
</th>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width:20px"> <b>TARIKH:</b></th>
|
||||
<th>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp</th>
|
||||
<th style="width:20px"> <b>HINGGA:</b></th>
|
||||
<th>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp</th>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
{{-- <table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>IC Pelanggan</th>
|
||||
<th>Nama Pelanggan</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Alasan</th>
|
||||
<th>Nilai Marhun(RM)</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Sebulan</th>
|
||||
<th>Jumlah</th>
|
||||
<th>Margin</th>
|
||||
</tr>
|
||||
@foreach($polis as $index=>$sh)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration}}</td>
|
||||
<td> {{ $sh['tarikh'] }}</td>
|
||||
<td> {{ $sh['nokp'] }}</td>
|
||||
@php
|
||||
$noic = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/customers/' .$sh['nokp'] )->json();
|
||||
@endphp
|
||||
<td> {{ $noic['nama'] }} </td>
|
||||
<td> {{ $sh['norujukan'] }}</td>
|
||||
<td> {{ $sh['komen1'] }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
|
||||
@php
|
||||
$koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/daerah/' .$sh['koddaerah'] )->json();
|
||||
$kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/negeri/' .$sh['kodnegeri'] )->json();
|
||||
@endphp
|
||||
<td> {{ $koddaerah['namadaerah'] }}</td>
|
||||
<td> {{ $kodnegeri['negeri'] }}</td>
|
||||
<td> {{ $sh['sttebus'] }}</td>
|
||||
<td> {{ $sh['t_update'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table> --}}
|
||||
{{-- <table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nota</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>JBG</th>
|
||||
<th>Untung (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Caj Lain (RM)</th>
|
||||
</tr>
|
||||
|
||||
@foreach($palsu as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['norujukan'] }}</td>
|
||||
<td>{{ $item['nota'] }}</td>
|
||||
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table> --}}
|
||||
<table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nota</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>JBG</th>
|
||||
<th>Untung (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Caj Lain (RM)</th>
|
||||
</tr>
|
||||
@php $bil = 1; @endphp
|
||||
|
||||
@foreach($palsu as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['norujukan'] }}</td>
|
||||
<td>{{ $item['nota'] }}</td>
|
||||
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<br>
|
||||
<br><br><br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> Disediakan </B> </td>
|
||||
<td></td>
|
||||
<td colspan="2"><B> Disemak </B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B> Disahkan </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,316 +1,346 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Laporan Pembiayaan & Statistik</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
/* Header Table Styles */
|
||||
#header {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
#header td, #header th {
|
||||
padding: 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
#header tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
#header tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Scan Table Styles */
|
||||
#scan {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
#scan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
/* Details Table Styles */
|
||||
#details {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
#details td, #details th {
|
||||
padding: 8px;
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
#details tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
#details tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
/* Sign Table Styles */
|
||||
#sign {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
#sign td, #sign th {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
#sign tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
#sign tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:8px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Statistics Table Styles */
|
||||
#statistik {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
#statistik th, #statistik td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#statistik th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header-row {
|
||||
background-color: #e0e0e0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.bangsa { background-color: #fce4ec; }
|
||||
.pekerjaan { background-color: #e8f5e9; }
|
||||
.nilai { background-color: #e1f5fe; }
|
||||
.pembiayaan-col { background-color: #ffe4d9; }
|
||||
.jenis { background-color: #e8eaf6; }
|
||||
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 30px 0 20px 0;
|
||||
padding: 10px;
|
||||
background-color: #f0f0f0;
|
||||
border-left: 5px solid #333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- SECTION 1: LAPORAN PEMBIAYAAN -->
|
||||
<table id="header">
|
||||
<tr>
|
||||
{{-- <th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th> --}}
|
||||
{{-- <th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th> --}}
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||
<td></td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
@endphp
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
||||
@endif
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
||||
<td style="text-align:left;"> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
||||
<td style="text-align:left;"> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
||||
<td style="text-align:left;">@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:50px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
@if(Str::contains($api_url, 'api_arrahnv3.test'))
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
||||
@endif
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:50px"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>Alamat</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>No K/P</th>
|
||||
<th>Masa</th>
|
||||
<th>Berat</th>
|
||||
<th>N Marhun</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Caj-caj Lain</th>
|
||||
<th>Keuntungan 1%</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Peratus (%)</th>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalpinjaman = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalupah = 0;
|
||||
$bil = 0;
|
||||
$full_total_ujrah = 0;
|
||||
$full_total_onepercent = 0;
|
||||
@endphp
|
||||
@foreach($gadai as $index=>$item)
|
||||
@php
|
||||
$ujrah = isset($item['ujrah']) ? $item['ujrah'] : 0;
|
||||
$onepercent = isset($item['onepercent']) ? $item['onepercent'] : 0;
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>Alamat</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>No K/P</th>
|
||||
<th>Masa</th>
|
||||
<th>Berat</th>
|
||||
<th>N Marhun</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Lain-Lain Caj</th>
|
||||
<th>Keuntungan 1%</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Peratus (%)</th>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalpinjaman = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalupah = 0;
|
||||
$bil = 0;
|
||||
$full_total_ujrah = 0;
|
||||
$full_total_onepercent = 0;
|
||||
@endphp
|
||||
@foreach($gadai as $index=>$item)
|
||||
@php
|
||||
$ujrah = isset($item['ujrah']) ? $item['ujrah'] : 0;
|
||||
$onepercent = isset($item['onepercent']) ? $item['onepercent'] : 0;
|
||||
|
||||
$totalpinjaman += $item['pinjaman'];
|
||||
$totalberat += $item['berat'];
|
||||
$totalnm += $item['nilaimarhun'];
|
||||
$totalupah += $item['upah12'];
|
||||
$full_total_ujrah += $ujrah * 12;
|
||||
$full_total_onepercent += $onepercent * 12;
|
||||
@endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $gadai[$index - 1]['teller'])
|
||||
$totalpinjaman += $item['pinjaman'];
|
||||
$totalberat += $item['berat'];
|
||||
$totalnm += $item['nilaimarhun'];
|
||||
$totalupah += $item['upah12'];
|
||||
$full_total_ujrah += $ujrah * 12;
|
||||
$full_total_onepercent += $onepercent * 12;
|
||||
@endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $gadai[$index - 1]['teller'])
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@php
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalupah12 = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
$totalonepercent= 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>{{ $item['nama'] }}</td>
|
||||
<td>{{ $item['alamat1'] }}</td>
|
||||
<td>{{ $item['t_gadai'] }}</td>
|
||||
<td>{{ $item['nokp'] }}</td>
|
||||
<td>{{ $item['masa'] }}</td>
|
||||
<td>{{ number_format($item['berat'],2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
<td>{{ number_format($ujrah*12,2) }}</td>
|
||||
<td>{{ number_format($onepercent*12,2) }}</td>
|
||||
<td>{{ number_format($item['upah12'],2) }}</td>
|
||||
<td>{{ $item['percentpinj'] }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalupah12 = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent= 0;
|
||||
$totalpinjamanteller += $item['pinjaman'];
|
||||
$totalnmteller += $item['nilaimarhun'];
|
||||
$totalberatteller += $item['berat'];
|
||||
$totalupah12 += $item['upah12'];
|
||||
$totalujrah += $ujrah*12;
|
||||
$totalonepercent += $onepercent*12;
|
||||
@endphp
|
||||
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>
|
||||
{{ $item['nama'] }}
|
||||
</td>
|
||||
<td>{{ $item['alamat1'] }}</td>
|
||||
<td>{{ $item['t_gadai'] }}</td>
|
||||
<td>{{ $item['nokp'] }}</td>
|
||||
<td>{{ $item['masa'] }}</td>
|
||||
<td>{{ number_format($item['berat'],2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
<td>{{ number_format($ujrah*12,2) }}</td>
|
||||
<td>{{ number_format($onepercent*12,2) }}</td>
|
||||
<td>{{ number_format($item['upah12'],2) }}</td>
|
||||
<td>{{ $item['percentpinj'] }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@php
|
||||
$totalpinjamanteller += $item['pinjaman'];
|
||||
$totalnmteller += $item['nilaimarhun'];
|
||||
$totalberatteller += $item['berat'];
|
||||
$totalupah12 += $item['upah12'];
|
||||
$totalujrah += $ujrah*12;
|
||||
$totalonepercent += $onepercent*12;
|
||||
@endphp
|
||||
@if($index+1 < sizeof($gadai))
|
||||
@if($item['teller'] != $gadai[$index + 1]['teller'])
|
||||
@php if($item['teller'] != '')$bil += ($counter-1); @endphp
|
||||
@if($index+1 < sizeof($gadai))
|
||||
@if($item['teller'] != $gadai[$index + 1]['teller'])
|
||||
@php if($item['teller'] != '')$bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalupah12 = 0;
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
@php $bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
@@ -319,77 +349,180 @@
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalupah12 = 0;
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
@php $bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<table id="details" style="border-top:1px solid black;border-bottom:1px solid black;text-align:center;">
|
||||
<tr>
|
||||
<th colspan="9" style="text-align: center;"><b>JUMLAH BILANGAN = {{ $bil }}</b></th>
|
||||
<th style="text-align:center;">Berat (g/m)</th>
|
||||
<th style="text-align:center;">Nilai Marhun (RM)</th>
|
||||
<th style="text-align:center;">Pembiayaan (RM)</th>
|
||||
<th style="text-align:center;">Caj-caj Lain (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan 1% (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan (RM)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center;"><b>JUMLAH KESELURUHAN</b></td>
|
||||
<td>{{ number_format($totalberat,2) }}</td>
|
||||
<td>{{ number_format($totalnm,2) }}</td>
|
||||
<td>{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td>{{ number_format($full_total_ujrah,2) }}</td>
|
||||
<td>{{ number_format($full_total_onepercent,2) }}</td>
|
||||
<td>{{ number_format($totalupah,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="9" style="text-align: center;"><b>JUMLAH BILANGAN = {{ $bil }}</b></th>
|
||||
<th style="text-align:center;">Berat (g/m)</th>
|
||||
<th style="text-align:center;">Nilai Marhun (RM)</th>
|
||||
<th style="text-align:center;">Pembiayaan (RM)</th>
|
||||
<th style="text-align:center;">Caj-caj Lain (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan 1% (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan (RM)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center;"><b>JUMLAH KESELURUHAN</b></td>
|
||||
<td>{{ number_format($totalberat,2) }}</td>
|
||||
<td>{{ number_format($totalnm,2) }}</td>
|
||||
<td>{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td>{{ number_format($full_total_ujrah,2) }}</td>
|
||||
<td>{{ number_format($full_total_onepercent,2) }}</td>
|
||||
<td>{{ number_format($totalupah,2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{-- <h5 style="float:right;">JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}</h5> --}}
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br><br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- PAGE BREAK FOR PRINT -->
|
||||
<div class="page-break"></div>
|
||||
|
||||
<!-- SECTION 2: STATISTIK JENIS -->
|
||||
<div class="section-title">STATISTIK JENIS PEMBIAYAAN</div>
|
||||
|
||||
<table id="statistik" class="min-w-full border border-gray-300">
|
||||
<thead>
|
||||
<tr class="header-row bg-gray-100 text-center">
|
||||
<th colspan="2">Bangsa</th>
|
||||
<th colspan="2">Pekerjaan</th>
|
||||
<th colspan="2">Nilai Marhun</th>
|
||||
<th colspan="2">Pembiayaan</th>
|
||||
<th colspan="2">Pembiayaan Margin</th>
|
||||
<th colspan="2">Jenis Pembiayaan</th>
|
||||
</tr>
|
||||
<tr class="bg-gray-50 text-center text-sm">
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
<th>RM</th>
|
||||
<th>Bil</th>
|
||||
<th>RM</th>
|
||||
<th>Bil</th>
|
||||
<th>%</th>
|
||||
<th>Bil</th>
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="text-sm text-center">
|
||||
@php
|
||||
// Get all arrays from statistik
|
||||
$bangsaData = $statistik['reportCustomerRace'];
|
||||
$pekerjaanData = $statistik['reportCustomerJob'];
|
||||
$marhunData = $statistik['reportMarhunValue'];
|
||||
$pembiayaanData = $statistik['reportLoanAmount'];
|
||||
$marginData = $statistik['reportMarhunMargin'];
|
||||
$jenisPembiayaanData = $statistik['reportPembiayaan'];
|
||||
|
||||
// Get maximum rows needed
|
||||
$maxRows = max(
|
||||
count($bangsaData),
|
||||
count($pekerjaanData),
|
||||
count($marhunData),
|
||||
count($pembiayaanData),
|
||||
count($marginData),
|
||||
count($jenisPembiayaanData)
|
||||
);
|
||||
|
||||
// Convert to indexed arrays (preserving order)
|
||||
$bangsaKeys = array_keys($bangsaData);
|
||||
$bangsa = array_values($bangsaData);
|
||||
|
||||
$pekerjaanKeys = array_keys($pekerjaanData);
|
||||
$pekerjaan = array_values($pekerjaanData);
|
||||
|
||||
$marhunKeys = array_keys($marhunData);
|
||||
$marhun = array_values($marhunData);
|
||||
|
||||
$pembiayaanKeys = array_keys($pembiayaanData);
|
||||
$pembiayaan = array_values($pembiayaanData);
|
||||
|
||||
$marginKeys = array_keys($marginData);
|
||||
$margin = array_values($marginData);
|
||||
|
||||
$jenisPembiayaanKeys = array_keys($jenisPembiayaanData);
|
||||
$jenisPembiayaan = array_values($jenisPembiayaanData);
|
||||
|
||||
// Labels for jenis pembiayaan
|
||||
$jenisLabels = [
|
||||
'pembiayaanbaru' => 'Pembiayaan Baru',
|
||||
'pembiayaansemula' => 'Pembiayaan Semula',
|
||||
'lelongan' => 'Lelongan'
|
||||
];
|
||||
|
||||
// Check if there's any data at all
|
||||
$hasAnyData = count($bangsaData) > 0 || count($pekerjaanData) > 0 ||
|
||||
count($marhunData) > 0 || count($pembiayaanData) > 0 ||
|
||||
count($marginData) > 0 || count($jenisPembiayaanData) > 0;
|
||||
@endphp
|
||||
|
||||
@if($hasAnyData)
|
||||
@for($i = 0; $i < $maxRows; $i++)
|
||||
<tr>
|
||||
{{-- Bangsa: Nama | Jumlah --}}
|
||||
<td>{{ $bangsaKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ $bangsa[$i] ?? '-' }}</td>
|
||||
|
||||
{{-- Pekerjaan: Jenis | Jumlah --}}
|
||||
<td>{{ $pekerjaanKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ $pekerjaan[$i] ?? '-' }}</td>
|
||||
|
||||
{{-- Nilai Marhun: RM | Berat (g) --}}
|
||||
<td>{{ $marhunKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($marhun[$i]) ? number_format($marhun[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Pembiayaan: RM | Bil --}}
|
||||
<td>{{ $pembiayaanKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($pembiayaan[$i]) ? number_format($pembiayaan[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Pembiayaan Margin: RM | % --}}
|
||||
<td>{{ $marginKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($margin[$i]) ? number_format($margin[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Jenis Pembiayaan: Jenis | Bil --}}
|
||||
<td>
|
||||
@if(isset($jenisPembiayaanKeys[$i]))
|
||||
{{ $jenisLabels[$jenisPembiayaanKeys[$i]] ?? ucfirst($jenisPembiayaanKeys[$i]) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $jenisPembiayaan[$i] ?? '-' }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
{{-- Show "Not Available" if no data at all --}}
|
||||
<tr>
|
||||
<td colspan="12" style="text-align: center; color: #999; font-style: italic;">
|
||||
Not Available
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -164,7 +164,7 @@
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
$api_url = $api_url;
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
@@ -227,7 +227,7 @@
|
||||
@foreach($tuntutbaki as $index=>$item)
|
||||
@php $totaljumlah += $item['jumlah'] @endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $tuntutbaki[$index - 1]['teller'])
|
||||
@if($item['teller'] != ($tuntutbaki[$index - 1]['teller'] ?? null))
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@@ -240,17 +240,20 @@
|
||||
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
|
||||
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">
|
||||
@php
|
||||
|
||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
||||
//// $gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json(); - code asal
|
||||
//// $gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukankodcaw/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0]['nokp'])->json();
|
||||
echo $customer_detail['nama'];
|
||||
@endphp
|
||||
|
||||
</td>
|
||||
<td style="width:100px">{{$gadaidetail[0][0]['nokp']}}</td>
|
||||
<td style="width:100px">{{$gadaidetail[0]['nokp']}}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['cajlelong'] }}</td>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@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' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||
|
||||
<searchbarangkes-component kodcaw="{{ Auth::user()->cawangan }}"></searchbarangkes-component>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.generate') }}'"
|
||||
class="bg-yellow-500 p-4 rounded text-white mr-4">
|
||||
Jana Simulasi
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
{{-- <div class="bg-white p-6 shadow rounded-lg">
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||
class="focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:focus:ring-yellow-900">
|
||||
Senarai Simulasi
|
||||
</button>
|
||||
</div> --}}
|
||||
|
||||
<div>
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||
class="bg-yellow-500 p-4 rounded text-white">
|
||||
Senarai Simulasi
|
||||
</button>
|
||||
</div>
|
||||
@@ -48,6 +48,7 @@
|
||||
<th>Baki Pembiayaan (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Harga Jual (RM)</th>
|
||||
<th>Baki(RM)</th>
|
||||
</tr>
|
||||
@@ -68,6 +69,7 @@
|
||||
<td>{{ $lelongan_detail['bakipjm'] }}</td>
|
||||
<td>{{ $lelongan_detail['keuntungan'] }}</td>
|
||||
<td>{{ $lelongan_detail['cajlelong'] }}</td>
|
||||
<td>{{ $lelongan_detail['hargaasas'] }}</td>
|
||||
<td>{{ $lelongan_detail['hargajual'] }}</td>
|
||||
<td>{{ $lelongan_detail['baki'] }}</td>
|
||||
|
||||
@@ -87,6 +89,7 @@
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_baki'] }}</td>
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<table border="1" cellspacing="0" cellpadding="3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="14" style="text-align: center; font-weight: bold; font-size: 16px;">
|
||||
SENARAI LELONGAN KESELURUHAN
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14" style="text-align: center;">
|
||||
Cawangan: {{ $cawangan_detail['nama'] ?? '-' }} |
|
||||
Tarikh: {{ $query['startDate'] ?? '-' }} hingga {{ $query['endDate'] ?? '-' }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr><td colspan="14"> </td></tr>
|
||||
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>No KP</th>
|
||||
<th>Marhun</th>
|
||||
<th>Berat</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>%</th>
|
||||
<th>Baki Pembiayaan (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Harga Jual (RM)</th>
|
||||
<th>Baki (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$total_berat = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
$total_pinjaman = 0;
|
||||
$total_hargajual = 0;
|
||||
$total_keuntungan = 0;
|
||||
$total_cajlelong = 0;
|
||||
$total_baki = 0;
|
||||
$total_hargaasas = 0;
|
||||
$row_no = 1;
|
||||
@endphp
|
||||
|
||||
@foreach ($lelongan_data as $item)
|
||||
@php
|
||||
$total_berat += (float) $item['berat'];
|
||||
$total_nilaimarhun += (float) $item['nilai_marhun'];
|
||||
$total_pinjaman += (float) $item['pinjaman'];
|
||||
$total_hargajual += (float) $item['hargajual'];
|
||||
$total_keuntungan += (float) ($item['keuntungan'] ?? 0);
|
||||
$total_cajlelong += (float) ($item['cajlelong'] ?? 0);
|
||||
$total_baki += (float) ($item['baki'] ?? 0);
|
||||
$total_hargaasas += (float) ($item['hargaasas'] ?? 0);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $row_no++ }}</td>
|
||||
<td>{{ $item['no_rujukan'] ?? '' }}</td>
|
||||
<td>{{ $item['nama'] ?? '' }}</td>
|
||||
<td>'{{ $item['no_kp'] ?? '' }}</td>
|
||||
<td>{{ $item['marhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilai_marhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>{{ $item['peratusan_margin_pinjaman'] ?? 0 }}</td>
|
||||
<td>{{ $item['bakipjm'] ?? 0 }}</td>
|
||||
<td>{{ $item['keuntungan'] ?? 0 }}</td>
|
||||
<td>{{ $item['cajlelong'] ?? 0 }}</td>
|
||||
<td>{{ $item['hargaasas'] ?? 0 }}</td>
|
||||
<td>{{ $item['hargajual'] ?? 0 }}</td>
|
||||
<td>{{ $item['baki'] ?? 0 }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="5"><strong>Jumlah</strong></td>
|
||||
<td><strong>{{ number_format($total_berat, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_nilaimarhun, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_keuntungan, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_cajlelong, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_hargaasas ?? 0, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_hargajual, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_baki, 2) }}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -35,6 +35,7 @@
|
||||
<th>Baki Pembiayaan(RM)</th>
|
||||
<th>Keuntungan(RM)</th>
|
||||
<th>Caj Lelong(RM)</th>
|
||||
<th>Harga Asas(RM)</th>
|
||||
<th>Harga Jual(RM)</th>
|
||||
<th>Baki(RM)</th>
|
||||
|
||||
@@ -49,6 +50,7 @@
|
||||
<td>{{ $data['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_baki'] }}</td>
|
||||
|
||||
@@ -64,6 +66,7 @@
|
||||
<td>{{ $summary_lelongan['total_bakipjm'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_keuntungan'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_cajlelong'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_hargaasas'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_hargajual'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_baki'] }}</td>
|
||||
|
||||
|
||||
@@ -104,6 +104,36 @@
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera(By Masa)</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.saringan-gadaian.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Saringan Gadaian</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.summary-wtd.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Selesai WTD</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.dataPelanggan.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan</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.dataPelangganBycaw.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan By Cawangan</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="px-6 py-4 mb-2 ml-2 bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all">
|
||||
<a href="{{ route('reports.agingtebus.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-2xl font-bold text-center uppercase">Keuntungan Penyelesaian Pembiayaan By Tempoh</h2>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<link href="{{ asset('css/all.min.css') }}" rel="stylesheet">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{asset(mix('js/app.js')), true}}" defer></script>
|
||||
<script src="{{ asset(mix('js/app.js')), true }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
@@ -151,13 +151,15 @@
|
||||
|
||||
@auth
|
||||
<clock-component></clock-component>
|
||||
<cawangan-component roles={{ Auth::user()->roles }}
|
||||
<cawangan-component @clickEvent_="getText()" roles={{ Auth::user()->roles }}
|
||||
route={{ Route::is('home') || Route::is('akaun.home') || Route::is('audit.index') ? 'ada' : 'tiada' }}
|
||||
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}>
|
||||
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}
|
||||
>
|
||||
</cawangan-component>
|
||||
<div class="mx-auto">
|
||||
<a class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
{{Auth::user()->roles}} : {{Auth::user()->name}}
|
||||
<a
|
||||
class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
{{ Auth::user()->roles }} : {{ Auth::user()->name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -255,6 +257,15 @@
|
||||
<script>
|
||||
let response_status = {!! json_encode(\Session::get('response_status')) !!};
|
||||
let response_message = {!! json_encode(\Session::get('response_message')) !!};
|
||||
let peti_besi_error_message = {!! json_encode(\Session::get('peti_besi_error_message')) !!};
|
||||
|
||||
if(peti_besi_error_message){
|
||||
Swal.fire({
|
||||
title: "Tiada Data",
|
||||
text: peti_besi_error_message,
|
||||
icon: "warning"
|
||||
});
|
||||
}
|
||||
|
||||
let successToastMessage = document.querySelector('#success-toast-message')
|
||||
let failToastMessage = document.querySelector('#fail-toast-message')
|
||||
|
||||
@@ -129,6 +129,18 @@
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('wtd.debugWTD.home') }}" class="rounded mb-2 mr-2 {{ Route::is('wtd.debugWTD') || Route::is('wtd.debugWTD.home') ? '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">Debug Proses WTD</span>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
{{-- <a href="#" class="rounded mb-2 mr-2 {{ Route::is('online') || Route::is('online.*') ? '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">
|
||||
@@ -179,7 +191,18 @@
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('barangkes') }}"
|
||||
class="rounded mb-2 mr-2 {{ Route::is('barangkes') || Route::is('barangkes.*') ? 'bg-gray-200 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" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-box-seam" viewBox="0 0 16 16">
|
||||
<path d="M3.5 0a.5.5 0 0 0-.5.5v1.086l-1.553.777A.5.5 0 0 0 1 2.8v10.4a.5.5 0 0 0 .276.447l6 3a.5.5 0 0 0 .448 0l6-3A.5.5 0 0 0 14 13.2V2.8a.5.5 0 0 0-.447-.447L12 1.586V.5a.5.5 0 0 0-.5-.5h-8zM2 3.515 7.5 6.309v7.918L2 11.433V3.515zm6 10.712V6.309L14 3.515v7.918l-6 3.294zM12 2v.5L8 4.691 4 2.5V2h8z"/>
|
||||
</svg>
|
||||
<span class="ml-2 text-lg">Barang Kes</span>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
<a href="{{ route('lelong') }}" class="rounded mb-2 mr-2 {{ Route::is('lelong') || Route::is('lelong.*') ? '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">
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@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' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||
|
||||
<barangkes-pelanggan kodcaw="{{ Auth::user()->cawangan }}"></barangkes-pelanggan>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,21 @@
|
||||
@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' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Butiran', 'icon' : 'fas fa-users' }]"></breadcrumb>
|
||||
|
||||
<details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}"></details-sag>
|
||||
{{-- <details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}" norujukan="{{ $norujukan }}"></details-sag> --}}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
@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': 'Keuntungan Penyelesaian Pembiayaan By Tempoh', 'icon': 'fas fa-file' }]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
<div class="flex w-full">
|
||||
<div class="w-full xl:w-4/5 2xl:w-5/6 p-12 mx-auto">
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="/reports" class="router-link-active">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-center mx-auto text-white font-bold">Keuntungan Penyelesaian Pembiayaan By Tempoh</span>
|
||||
</div>
|
||||
|
||||
<form id="formAging" method="GET" action="{{ route('reports.agingtebus.show') }}">
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
|
||||
<label class="font-semibold text-gray-700 block pb-3">
|
||||
Pilih Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex flex-wrap lg:flex-nowrap items-end gap-4">
|
||||
|
||||
{{-- Dari --}}
|
||||
<div>
|
||||
<label class="text-gray-600 block pb-1">
|
||||
Dari
|
||||
</label>
|
||||
|
||||
<input
|
||||
id="startDate"
|
||||
name="startDate"
|
||||
type="date"
|
||||
value="{{ request()->startDate ?? $startDate ?? '' }}"
|
||||
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{{-- Hingga --}}
|
||||
<div>
|
||||
<label class="text-gray-600 block pb-1">
|
||||
Hingga
|
||||
</label>
|
||||
|
||||
<input
|
||||
id="endDate"
|
||||
name="endDate"
|
||||
type="date"
|
||||
value="{{ request()->endDate ?? $endDate ?? '' }}"
|
||||
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="action" id="formAction" value="search">
|
||||
|
||||
{{-- Button Group --}}
|
||||
<div class="flex gap-3 w-full md:w-auto">
|
||||
|
||||
{{-- Button Group --}}
|
||||
<div class="flex gap-3">
|
||||
|
||||
{{-- Search --}}
|
||||
<button
|
||||
type="submit"
|
||||
onclick="setAction('search')"
|
||||
class="border border-yellow-600 text-yellow-600 font-montserrat py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||
|
||||
<i class="fas fa-magnifying-glass mr-2"></i>
|
||||
Search
|
||||
</button>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button
|
||||
type="submit"
|
||||
onclick="setAction('excel')"
|
||||
class="border border-yellow-600 text-yellow-600 py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||
|
||||
<i class="fas fa-file-excel mr-2"></i>
|
||||
Excel
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
</div>
|
||||
|
||||
@if(empty($aging))
|
||||
<div class="alert alert-warning">
|
||||
Tiada data dijumpai untuk tarikh {{ $endDate }}.
|
||||
</div>
|
||||
@else
|
||||
<!-- <h1>Summary Report</h1> -->
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<!-- Create a table with horizontal headers -->
|
||||
<table class="table-auto w-full border-collapse border border-gray-200">
|
||||
<thead class="bg-yellow-500 text-white">
|
||||
<tr>
|
||||
<th class="px-4 py-2 border">Bil.</th> <!-- Add Bilangan here -->
|
||||
<th class="px-4 py-2 border">Cawangan</th>
|
||||
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||
<th class="px-4 py-2 border" colspan="2">{{ $summary['label'] }}</th> <!-- Merge Tempoh with Bilangan and Jumlah -->
|
||||
@endforeach
|
||||
<th class="px-4 py-2 border" colspan="2">Keseluruhan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="px-4 py-2 border"> </th> <!-- Empty for Bilangan Row -->
|
||||
<th class="px-4 py-2 border"> </th> <!-- Empty for Cawangan Row -->
|
||||
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||
<th class="px-4 py-2 border">Bil</th> <!-- Bilangan Column Title -->
|
||||
<th class="px-4 py-2 border">RM</th> <!-- Jumlah Column Title -->
|
||||
@endforeach
|
||||
<th class="px-4 py-2 border">Bil</th>
|
||||
<th class="px-4 py-2 border">RM</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$counter = 1;
|
||||
|
||||
$totalGrandCountByTempoh = array_fill(
|
||||
0,
|
||||
count($aging[0]['summary_by_tempoh']),
|
||||
0
|
||||
);
|
||||
|
||||
$totalGrandKeuntunganByTempoh = array_fill(
|
||||
0,
|
||||
count($aging[0]['summary_by_tempoh']),
|
||||
0
|
||||
);
|
||||
@endphp
|
||||
|
||||
@foreach ($aging as $branch)
|
||||
|
||||
@php
|
||||
$totalCount = 0;
|
||||
$totalKeuntungan = 0;
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $counter++ }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border font-bold">
|
||||
{{ $branch['cawangan'] }}
|
||||
</td>
|
||||
|
||||
@foreach ($branch['summary_by_tempoh'] as $index => $summary)
|
||||
|
||||
{{-- Bil --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $summary['count'] }}
|
||||
</td>
|
||||
|
||||
{{-- RM --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($summary['sum_bayaran_keuntungan_rebet'], 2) }}
|
||||
</td>
|
||||
|
||||
@php
|
||||
// Total per cawangan
|
||||
$totalCount += $summary['count'];
|
||||
|
||||
$totalKeuntungan +=
|
||||
$summary['sum_bayaran_keuntungan_rebet'];
|
||||
|
||||
// Grand total
|
||||
$totalGrandCountByTempoh[$index] +=
|
||||
$summary['count'];
|
||||
|
||||
$totalGrandKeuntunganByTempoh[$index] +=
|
||||
$summary['sum_bayaran_keuntungan_rebet'];
|
||||
@endphp
|
||||
|
||||
@endforeach
|
||||
|
||||
{{-- Keseluruhan --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $totalCount }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($totalKeuntungan, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
|
||||
<td class="px-4 py-2 border font-bold" colspan="2">
|
||||
Total
|
||||
</td>
|
||||
|
||||
@foreach ($totalGrandCountByTempoh as $index => $grandCount)
|
||||
|
||||
{{-- Grand total bil --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $grandCount }}
|
||||
</td>
|
||||
|
||||
{{-- Grand total RM --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($totalGrandKeuntunganByTempoh[$index], 2) }}
|
||||
</td>
|
||||
|
||||
@endforeach
|
||||
|
||||
{{-- Total keseluruhan --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ array_sum($totalGrandCountByTempoh) }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format(array_sum($totalGrandKeuntunganByTempoh), 2) }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
<!-- JavaScript to Change Action -->
|
||||
<script>
|
||||
function setAction(action) {
|
||||
document.getElementById('formAction').value = action;
|
||||
document.getElementById('formAging').submit();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,241 @@
|
||||
@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 --}}
|
||||
<breadcrumb
|
||||
:items="[
|
||||
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'Data Pelanggan By Cawangan', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{{-- Error Alert --}}
|
||||
@if ($errors->any())
|
||||
<div class="flex justify-center mb-4">
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||
role="alert">
|
||||
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||
viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Z"/>
|
||||
</svg>
|
||||
<div class="ml-3 text-sm font-medium">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="{{ route('reports') }}">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-white font-bold ml-2">
|
||||
Laporan Data Pelanggan By Cawangan
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- FORM --}}
|
||||
<form method="GET"
|
||||
id="formStokAudit"
|
||||
action="{{ route('reports.dataPelangganBycaw.show') }}">
|
||||
|
||||
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
|
||||
{{-- Tahun --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tahun Laporan
|
||||
</label>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-gray-600 border rounded-l px-4 py-2 bg-gray-50">
|
||||
Tahun
|
||||
</span>
|
||||
|
||||
<select name="year"
|
||||
id="report_year"
|
||||
class="border border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||
required>
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@for ($y = now()->year; $y >= 2019; $y--)
|
||||
<option value="{{ $y }}">{{ $y }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
|
||||
{{-- Hidden generate type --}}
|
||||
<input type="radio" name="generateType" id="generateTypePdf" value="pdf" hidden>
|
||||
<input type="radio" name="generateType" id="generateTypeExcel" value="excel" hidden>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button type="button" id="generateExcel"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||
</button>
|
||||
|
||||
{{-- PDF --}}
|
||||
<button type="button" id="generatePdf"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-eye mr-2"></i> View
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Pilih Cawangan --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-2">
|
||||
Pilih Cawangan
|
||||
</label>
|
||||
|
||||
{{-- Select All --}}
|
||||
<div class="mb-2">
|
||||
<label class="inline-flex items-center">
|
||||
<input type="checkbox" id="checkAllCawangan"
|
||||
class="rounded border-gray-300">
|
||||
<span class="ml-2 text-sm font-medium">Pilih Semua</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="cawanganContainer"
|
||||
class="grid grid-cols-2 gap-3 max-h-64 overflow-y-auto
|
||||
border rounded p-4 bg-gray-50 text-sm text-gray-500">
|
||||
Memuatkan senarai cawangan...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
||||
{{-- Loading Overlay --}}
|
||||
<div id="loadingOverlay"
|
||||
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||
stroke="currentColor" stroke-width="4"></circle>
|
||||
</svg>
|
||||
<span class="text-gray-700 font-semibold">
|
||||
Sedang menjana laporan..
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const form = document.getElementById('formStokAudit');
|
||||
const loading = document.getElementById('loadingOverlay');
|
||||
|
||||
const container = document.getElementById('cawanganContainer');
|
||||
const checkAll = document.getElementById('checkAllCawangan');
|
||||
|
||||
let downloadFrame = null;
|
||||
let forceHideTimeout = null;
|
||||
|
||||
// =====================
|
||||
// Fetch Cawangan API
|
||||
// =====================
|
||||
fetch("{{ config('api.url') }}/api/cawangan")
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
container.innerHTML = '';
|
||||
if (!data.length) {
|
||||
container.innerHTML = '<span class="text-gray-400">Tiada cawangan</span>';
|
||||
return;
|
||||
}
|
||||
data.forEach(caw => {
|
||||
container.innerHTML += `
|
||||
<label class="flex items-center space-x-2">
|
||||
<input type="checkbox"
|
||||
name="cawangan[]"
|
||||
value="${caw.kodcaw}"
|
||||
class="cawangan-item rounded border-gray-300">
|
||||
<span>${caw.kodcaw} - ${caw.details_caw}</span>
|
||||
</label>
|
||||
`;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
container.innerHTML = '<span class="text-red-500">Gagal load cawangan</span>';
|
||||
});
|
||||
|
||||
// =====================
|
||||
// Select All Checkbox
|
||||
// =====================
|
||||
checkAll.addEventListener('change', function () {
|
||||
document.querySelectorAll('.cawangan-item').forEach(cb => cb.checked = this.checked);
|
||||
});
|
||||
|
||||
// =====================
|
||||
// Submit Form Function
|
||||
// =====================
|
||||
function submitForm(isExcel = false) {
|
||||
|
||||
if (document.querySelectorAll('.cawangan-item:checked').length === 0) {
|
||||
alert('Sila pilih sekurang-kurangnya satu cawangan');
|
||||
return;
|
||||
}
|
||||
|
||||
// set generateType
|
||||
if (isExcel) document.getElementById('generateTypeExcel').checked = true;
|
||||
else document.getElementById('generateTypePdf').checked = true;
|
||||
|
||||
// Show loading
|
||||
loading.classList.remove('hidden');
|
||||
|
||||
// Excel via iframe
|
||||
if (isExcel) {
|
||||
if (downloadFrame) downloadFrame.remove();
|
||||
downloadFrame = document.createElement('iframe');
|
||||
downloadFrame.name = 'downloadFrame';
|
||||
downloadFrame.style.display = 'none';
|
||||
document.body.appendChild(downloadFrame);
|
||||
form.target = 'downloadFrame';
|
||||
} else {
|
||||
form.removeAttribute('target');
|
||||
}
|
||||
|
||||
form.submit();
|
||||
|
||||
// Hide overlay after max 15 sec
|
||||
forceHideTimeout = setTimeout(() => loading.classList.add('hidden'), 15000);
|
||||
}
|
||||
|
||||
// =====================
|
||||
// Button Handlers
|
||||
// =====================
|
||||
document.getElementById('generateExcel').addEventListener('click', () => submitForm(true));
|
||||
document.getElementById('generatePdf').addEventListener('click', () => submitForm(false));
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,247 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #030101;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Semua Cawangan</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||
<th colspan="3" style="text-align:right">
|
||||
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||
<td colspan="8">{{ $tebus_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Cawangan</th>
|
||||
<!-- <th>Nama Pelanggan</th> -->
|
||||
<th>No.Pelanggan</th>
|
||||
<th>Umur</th>
|
||||
<th>Jantina</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Lokasi</th>
|
||||
<th>Tempoh Pajakan</th>
|
||||
<th>Tarikh Mula</th>
|
||||
<th>Tarikh Tamat</th>
|
||||
<th>Hari Sejak Transaksi Terakhir</th>
|
||||
<th>Bil Transaksi</th>
|
||||
<th>Bil Outstanding</th>
|
||||
<th>Bil Tebus</th>
|
||||
<th>Jumlah Pinjaman (RM)</th>
|
||||
<th>Jumlah Ujrah (RM)</th>
|
||||
<th>Tujuan Gadaian</th>
|
||||
<th>Status Aktif</th>
|
||||
<th>Cara Bayaran</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($pelanggan as $index => $row)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}</td>
|
||||
<td>{{ $row['cawangan'] }}</td>
|
||||
<!-- <td>{{ strtoupper($row['nama']) }}</td> -->
|
||||
<td>{{ $row['nopelanggan'] }}</td>
|
||||
<td>{{ $row['umur'] }}</td>
|
||||
<td>{{ $row['jantina'] }}</td>
|
||||
<td>{{ $row['pekerjaan'] }}</td>
|
||||
<td>{{ $row['daerah'] }}</td>
|
||||
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||
<td>{{ $row['tarikh_mula'] }}</td>
|
||||
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_outstanding'] }}</td>
|
||||
<td>{{ $row['bil_tebus'] }}</td>
|
||||
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||
<td>{{ $row['status_aktif'] }}</td>
|
||||
<td>{{ $row['cara_bayaran'] }}</td>
|
||||
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,223 @@
|
||||
@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 --}}
|
||||
<breadcrumb
|
||||
:items="[
|
||||
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'Data Pelanggan', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{{-- Error Alert --}}
|
||||
@if ($errors->any())
|
||||
<div id="error-alert" class="flex justify-center">
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||
role="alert">
|
||||
<svg class="flex-shrink-0 w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||
viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3
|
||||
1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1
|
||||
1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
||||
</svg>
|
||||
<div class="ms-3 text-sm font-medium ml-2">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="{{ route('reports') }}">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-white font-bold ml-2">
|
||||
Laporan Data Pelanggan
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- FORM --}}
|
||||
<form method="GET" id="formStokAudit"
|
||||
action="{{ route('reports.dataPelanggan.show') }}">
|
||||
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
|
||||
{{-- Tahun --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tahun Laporan
|
||||
</label>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||
style="background-color: rgb(249, 250, 251);">
|
||||
Tahun
|
||||
</span>
|
||||
|
||||
<select name="year" id="report_year"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||
required>
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@for ($y = now()->year; $y >= 2019; $y--)
|
||||
<option value="{{ $y }}">{{ $y }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
|
||||
{{-- Hidden generate type --}}
|
||||
<div class="hidden">
|
||||
<input type="radio" name="generateType"
|
||||
id="generateTypePdf" value="pdf">
|
||||
<input type="radio" name="generateType"
|
||||
id="generateTypeExcel" value="excel">
|
||||
</div>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button id="generateExcel" type="button"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||
</button>
|
||||
|
||||
{{-- PDF --}}
|
||||
<button id="generatePdf" type="button"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-eye mr-2"></i> View
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
||||
{{-- Loading Overlay --}}
|
||||
<div id="loadingOverlay"
|
||||
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||
stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor"
|
||||
d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z">
|
||||
</path>
|
||||
</svg>
|
||||
<span class="text-gray-700 font-semibold">
|
||||
Sedang menjana laporan..
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
{{-- =======================
|
||||
| Scripts
|
||||
|======================= --}}
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const form = document.getElementById('formStokAudit');
|
||||
const loading = document.getElementById('loadingOverlay');
|
||||
|
||||
let downloadFrame = null;
|
||||
let forceHideTimeout = null;
|
||||
let minLoadingTimeout = null;
|
||||
|
||||
function showLoading() {
|
||||
loading.classList.remove('hidden');
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
loading.classList.add('hidden');
|
||||
|
||||
clearTimeout(forceHideTimeout);
|
||||
clearTimeout(minLoadingTimeout);
|
||||
}
|
||||
|
||||
// =====================
|
||||
// EXCEL DOWNLOAD
|
||||
// =====================
|
||||
document.getElementById('generateExcel').addEventListener("click", function () {
|
||||
|
||||
document.getElementById('generateTypeExcel').checked = true;
|
||||
|
||||
showLoading();
|
||||
|
||||
// Remove iframe lama
|
||||
if (downloadFrame) downloadFrame.remove();
|
||||
|
||||
downloadFrame = document.createElement('iframe');
|
||||
downloadFrame.name = 'downloadFrame';
|
||||
downloadFrame.style.display = 'none';
|
||||
document.body.appendChild(downloadFrame);
|
||||
|
||||
form.target = 'downloadFrame';
|
||||
form.submit();
|
||||
|
||||
/**
|
||||
* 🔐 Minimum loading time
|
||||
* elak tutup terlalu awal
|
||||
*/
|
||||
minLoadingTimeout = setTimeout(() => {
|
||||
// Lepas 5 saat, barulah loading boleh ditutup
|
||||
}, 10000);
|
||||
|
||||
/**
|
||||
* 🧯 Fallback safety
|
||||
* Tutup paksa selepas 20 saat
|
||||
*/
|
||||
forceHideTimeout = setTimeout(() => {
|
||||
hideLoading();
|
||||
}, 20000);
|
||||
});
|
||||
|
||||
// =====================
|
||||
// PDF VIEW
|
||||
// =====================
|
||||
document.getElementById('generatePdf').addEventListener("click", function () {
|
||||
|
||||
document.getElementById('generateTypePdf').checked = true;
|
||||
|
||||
form.removeAttribute('target');
|
||||
showLoading();
|
||||
|
||||
form.submit();
|
||||
|
||||
// PDF cepat → tutup awal
|
||||
setTimeout(() => {
|
||||
hideLoading();
|
||||
}, 10000);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Semua Cawangan</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||
<th colspan="3" style="text-align:right">
|
||||
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||
<td colspan="8">{{ $tebus_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama Pelanggan</th>
|
||||
<th>No.Pelanggan</th>
|
||||
<th>Umur</th>
|
||||
<th>Jantina</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Lokasi</th>
|
||||
<th>Tempoh Pajakan</th>
|
||||
<th>Tarikh Mula</th>
|
||||
<th>Tarikh Tamat</th>
|
||||
<th>Hari Sejak Transaksi Terakhir</th>
|
||||
<th>Bil Transaksi</th>
|
||||
<th>Bil Outstanding</th>
|
||||
<th>Bil Tebus</th>
|
||||
<th>Jumlah Pinjaman (RM)</th>
|
||||
<th>Jumlah Ujrah (RM)</th>
|
||||
<th>Tujuan Gadaian</th>
|
||||
<th>Status Aktif</th>
|
||||
<th>Cara Bayaran</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($pelanggan as $index => $row)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}</td>
|
||||
<td>{{ strtoupper($row['nama']) }}</td>
|
||||
<td>{{ $row['nopelanggan'] }}</td>
|
||||
<td>{{ $row['umur'] }}</td>
|
||||
<td>{{ $row['jantina'] }}</td>
|
||||
<td>{{ $row['pekerjaan'] }}</td>
|
||||
<td>{{ $row['daerah'] }}</td>
|
||||
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||
<td>{{ $row['tarikh_mula'] }}</td>
|
||||
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_outstanding'] }}</td>
|
||||
<td>{{ $row['bil_tebus'] }}</td>
|
||||
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||
<td>{{ $row['status_aktif'] }}</td>
|
||||
<td>{{ $row['cara_bayaran'] }}</td>
|
||||
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -89,6 +89,10 @@
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pinjaman(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pendapatan 12 Bulan(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
@@ -101,6 +105,7 @@
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalpinjaman = 0;
|
||||
$totalupah12 = 0;
|
||||
@endphp
|
||||
<tbody>
|
||||
@forelse ($gadaian as $gadai)
|
||||
@@ -109,6 +114,8 @@
|
||||
$totalberat += $gadai['sum_berat'];
|
||||
$totalnm += $gadai['sum_nilai_marhun'];
|
||||
$totalpinjaman += $gadai['sum_pinjaman'];
|
||||
$totalupah12 += $gadai['sum_upah_12'];
|
||||
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
@@ -164,6 +171,14 @@
|
||||
{{ number_format($gadai['sum_pinjaman'], 2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
{{ number_format($gadai['sum_upah_12'], 2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
@@ -228,6 +243,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
{{ number_format($totalupah12,2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Caj Lelong(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Harga Asas(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Harga Jual(RM)
|
||||
@@ -133,6 +137,7 @@
|
||||
$totalkeuntungan = 0;
|
||||
$totalcajlelong = 0;
|
||||
$totalhargajual= 0;
|
||||
$totalhargaasas= 0;
|
||||
$totalbaki= 0;
|
||||
@endphp
|
||||
<tbody>
|
||||
@@ -146,6 +151,7 @@
|
||||
$totalkeuntungan += $lelong['sum_bakiupah'];
|
||||
$totalcajlelong+= $lelong['sum_cajlelong'];
|
||||
$totalhargajual+= $lelong['sum_hargajual'];
|
||||
$totalhargaasas+= $lelong['sum_hargaasas'];
|
||||
$totalbaki+= $lelong['sum_baki'];
|
||||
@endphp
|
||||
|
||||
@@ -227,6 +233,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
{{ number_format($lelong['sum_hargaasas'], 2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
@@ -330,6 +344,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
{{ number_format($totalhargaasas,2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
<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">Bil Pembiayaan (BRG KES)</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">Jumlah Pembiayaan (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">Bil Pembiayaan (SAG LAMA)</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">Jumlah Pembiayaan (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">Bil Pembiayaan (SAG BARU)</th>
|
||||
@@ -61,8 +63,10 @@
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$totalbilgadaikes = 0; // KES
|
||||
$totalbilgadai = 0; // LAMA
|
||||
$totalbilgadai2 = 0; // BARU
|
||||
$totalpinjamankes = 0; // KES
|
||||
$totalpinjaman = 0; // LAMA
|
||||
$totalpinjaman2 = 0; // BARU
|
||||
|
||||
@@ -72,6 +76,8 @@
|
||||
<tbody>
|
||||
@forelse ($outstanding as $outs)
|
||||
@php
|
||||
$totalbilgadaikes += $outs['total_gadaian_kes'];
|
||||
$totalpinjamankes += $outs['sum_pinjaman_kes'];
|
||||
$totalbilgadai += $outs['total_gadaian'];
|
||||
$totalpinjaman += $outs['sum_pinjaman'];
|
||||
$totalbilgadai2 += $outs['total_gadaian2'];
|
||||
@@ -84,6 +90,8 @@
|
||||
<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">{{ $outs['total_gadaian_kes'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman_kes'], 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman'], 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian2'] }}</td>
|
||||
@@ -99,6 +107,8 @@
|
||||
@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">{{ $totalbilgadaikes }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjamankes,2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai2 }}</td>
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||
LAPORAN SARINGAN PEMBIAYAAN
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tempoh : {{ request()->startDate }} hingga {{ request()->endDate }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh Dijana : {{ $generatedAt }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan Tebus</th>
|
||||
<th>No Rujukan Gadai Balik</th>
|
||||
<th>No KP</th>
|
||||
<th>Berat (g)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Tag Lelong</th>
|
||||
<th>Tarikh Gadai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
{{-- ================= TGB LELONG ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">TGB LELONG</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($tgb_lelong as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>Ya</td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
{{-- ================= TGB BIASA ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">TGB BIASA</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($tgb_biasa as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>Tidak</td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
{{-- ================= GADAI BIASA ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">GADAI BIASA</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($gadai_biasa as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td></td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td></td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style="font-weight:bold; background:#eee;">
|
||||
JUMLAH KESELURUHAN
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['berat'], 2) }}
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['nilai'], 2) }}
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['pinjaman'], 2) }}
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
@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': 'Gadaian', '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="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Saringan Pembiayaan</span>
|
||||
</div>
|
||||
<form method="get" id="formgadaian" action="{{ route('reports.saringan-gadaian.index') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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-left 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-left 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-left 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-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Jumlah Surat
|
||||
</th>
|
||||
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
TGB Lelong
|
||||
</th>
|
||||
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
TGB Biasa
|
||||
</th>
|
||||
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Gadai Biasa
|
||||
</th>
|
||||
|
||||
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Berat (g)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Nilai Marhun(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pinjaman(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
NM TGB Lelong
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
NM TGB Biasa
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
NM Gadai Biasa
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pinjaman TGB Lelong(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pinjaman TGB Biasa(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Pinjaman Gadai Biasa(RM)
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php
|
||||
$totalbilgadai = 0; // jumlah semua surat
|
||||
$total_tgb_lelong = 0;
|
||||
$total_tgb_biasa = 0;
|
||||
$total_gadai_biasa = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalpinjaman = 0;
|
||||
|
||||
$total_nm_tgb_lelong = 0;
|
||||
$total_nm_tgb_biasa = 0;
|
||||
$total_nm_gadai_biasa = 0;
|
||||
|
||||
$total_pinjaman_tgb_lelong = 0;
|
||||
$total_pinjaman_tgb_biasa = 0;
|
||||
$total_pinjaman_gadai_biasa = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
@forelse ($gadaian as $gadai)
|
||||
@php
|
||||
// Jumlah semua surat
|
||||
$totalbilgadai += $gadai['jumlah_surat'] ?? 0;
|
||||
|
||||
// Jumlah per kategori
|
||||
$total_tgb_lelong += $gadai['total_tgb_lelong'] ?? 0;
|
||||
$total_tgb_biasa += $gadai['total_tgb_biasa'] ?? 0;
|
||||
$total_gadai_biasa += $gadai['total_gadai_biasa'] ?? 0;
|
||||
|
||||
// Jumlah nilai
|
||||
$totalberat += $gadai['sum_berat'] ?? 0;
|
||||
$totalnm += $gadai['sum_nilai_marhun'] ?? 0;
|
||||
$totalpinjaman += $gadai['sum_pinjaman'] ?? 0;
|
||||
|
||||
$nm_tgb_lelong = $gadai['details'] ?? [];
|
||||
$nm_tgb_lelong = collect($nm_tgb_lelong)
|
||||
->where('jenis', 'TGB_LELONG')
|
||||
->sum('nilaimarhun');
|
||||
|
||||
$nm_tgb_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_BIASA')
|
||||
->sum('nilaimarhun');
|
||||
$nm_gadai_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'GADAI_BIASA')
|
||||
->sum('nilaimarhun');
|
||||
|
||||
$pinjaman_tgb_lelong = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_LELONG')
|
||||
->sum('pinjaman');
|
||||
$pinjaman_tgb_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_BIASA')
|
||||
->sum('pinjaman');
|
||||
$pinjaman_gadai_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'GADAI_BIASA')
|
||||
->sum('pinjaman');
|
||||
|
||||
$total_nm_tgb_lelong += $nm_tgb_lelong;
|
||||
$total_nm_tgb_biasa += $nm_tgb_biasa;
|
||||
$total_nm_gadai_biasa += $nm_gadai_biasa;
|
||||
|
||||
$total_pinjaman_tgb_lelong += $pinjaman_tgb_lelong;
|
||||
$total_pinjaman_tgb_biasa += $pinjaman_tgb_biasa;
|
||||
$total_pinjaman_gadai_biasa += $pinjaman_gadai_biasa;
|
||||
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['jumlah_surat'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_tgb_lelong'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_tgb_biasa'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_gadai_biasa'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_berat'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_nilai_marhun'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_pinjaman'], 2) }}</div>
|
||||
</td>
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_gadai_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_gadai_biasa, 2) }}</td>
|
||||
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">
|
||||
<a href="{{ route('reports.saringan.gadaian.cawangan.excel', [$gadai['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-download mr-2"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $totalbilgadai }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_tgb_lelong }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_tgb_biasa }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_gadai_biasa }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalberat, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalnm, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalpinjaman, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_gadai_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_gadai_biasa, 2) }}</td>
|
||||
|
||||
<td colspan="1"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -15,10 +15,7 @@
|
||||
<div class="container">
|
||||
@if ($errors->any())
|
||||
<div id="error-alert" class="flex justify-center">
|
||||
<div id="alert-border-2" class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 dark:text-red-400 dark:bg-gray-800 dark:border-red-800 px-10" role="alert">
|
||||
<svg class="flex-shrink-0 w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
||||
</svg>
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10" role="alert">
|
||||
<div class="ms-3 text-sm font-medium ml-2 ">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@@ -29,58 +26,75 @@
|
||||
@endif
|
||||
<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="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Stok Audit</span></div>
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="/reports">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-center mx-auto text-white font-bold">
|
||||
Laporan Stok Audit
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<form method="get" id="formStokAudit" action="{{ route('reports.stok-audit.show') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
|
||||
{{-- PILIHAN TARIKH --}}
|
||||
<div class="pb-4">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Pilihan Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex items-center space-x-6 mb-3">
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="dateOption" value="manual" checked class="mr-2">
|
||||
Pilih Tarikh
|
||||
</label>
|
||||
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="dateOption" value="current" class="mr-2">
|
||||
Tarikh Semasa (Hari Ini)
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="stock_audit_monthYear" name="monthYear" value=""
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||
style="background-color: rgb(249, 250, 251);">
|
||||
Pilih
|
||||
</span>
|
||||
|
||||
<input type="date"
|
||||
id="stock_audit_monthYear"
|
||||
name="monthYear"
|
||||
value=""
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80 mr-2">
|
||||
|
||||
<div class="hidden">
|
||||
<input type="radio" name="generateType" id="generateTypePdf"
|
||||
value="pdf">
|
||||
<input type="radio" name="generateType" id="generateTypeExcel"
|
||||
value="excel">
|
||||
<input type="radio" name="generateType" id="generateTypePdf" value="pdf">
|
||||
<input type="radio" name="generateType" id="generateTypeExcel" value="excel">
|
||||
</div>
|
||||
<button id="generateExcel"
|
||||
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"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||
type="button">
|
||||
<i class="fas fa-file-excel mr-2"></i>Excel
|
||||
</button>
|
||||
<button id="generatePdf"
|
||||
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"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||
type="button">
|
||||
<i class="fas fa-eye mr-2"></i>View
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@@ -90,30 +104,58 @@
|
||||
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
let form = document.querySelector('#formStokAudit')
|
||||
let form = document.querySelector('#formStokAudit');
|
||||
|
||||
document.querySelector('button#generatePdf').addEventListener("click", function(event) {
|
||||
// ===== BUTTON PDF =====
|
||||
document.querySelector('#generatePdf').addEventListener("click", function() {
|
||||
document.querySelector('#generateTypePdf').checked = true;
|
||||
form.submit();
|
||||
})
|
||||
});
|
||||
|
||||
document.querySelector('button#generateExcel').addEventListener("click", function(event) {
|
||||
// ===== BUTTON EXCEL =====
|
||||
document.querySelector('#generateExcel').addEventListener("click", function() {
|
||||
document.querySelector('#generateTypeExcel').checked = true;
|
||||
form.submit();
|
||||
})
|
||||
});
|
||||
|
||||
// ===== TARIKH OPTION =====
|
||||
const dateInput = document.getElementById('stock_audit_monthYear');
|
||||
const dateOptions = document.querySelectorAll('input[name="dateOption"]');
|
||||
|
||||
dateOptions.forEach(option => {
|
||||
option.addEventListener('change', function () {
|
||||
|
||||
if (this.value === 'current') {
|
||||
|
||||
let today = new Date();
|
||||
let day = String(today.getDate()).padStart(2, '0');
|
||||
let month = String(today.getMonth() + 1).padStart(2, '0');
|
||||
let year = today.getFullYear();
|
||||
|
||||
dateInput.value = year + '-' + month + '-' + day;
|
||||
|
||||
// Ganti readOnly dengan disable
|
||||
dateInput.disabled = true;
|
||||
|
||||
} else {
|
||||
dateInput.disabled = false;
|
||||
dateInput.value = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// ===== AUTO HIDE ERROR =====
|
||||
const errorAlert = document.getElementById("error-alert");
|
||||
|
||||
if (errorAlert) {
|
||||
|
||||
setTimeout(function() {
|
||||
errorAlert.classList.add = "opacity-0";
|
||||
errorAlert.classList.add("opacity-0");
|
||||
setTimeout(function() {
|
||||
errorAlert.style.display = "none";
|
||||
}, 500)
|
||||
}, 5000); // 5000 milliseconds = 5 seconds
|
||||
}, 500);
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||
LAPORAN RUMUSAN WTD
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh : {{ $startDate }} hingga {{ $endDate }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh Dijana : {{ $generatedAt }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||
<th>Bil</th>
|
||||
<th>Batch WTD</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>No KP</th>
|
||||
<th>Nama</th>
|
||||
<th>Tarikh Proses</th>
|
||||
<th>Jumlah (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$sum_baki = 0;
|
||||
$jumlah = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($details as $item)
|
||||
|
||||
@php
|
||||
$jumlah = $item['jumlah'];
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['batchno'] ?? 0 }}</td>
|
||||
<td>{{ $item['norujukan'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['nama_cust'] ?? null }}</td>
|
||||
<td>{{ $item['t_proses'] ?? null }}</td>
|
||||
<td>{{ number_format($jumlah, 2) }}</td>
|
||||
</tr>
|
||||
@php
|
||||
$sum_baki += $item['jumlah'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="6" style="font-weight:bold; background:#eee;">
|
||||
JUMLAH KESELURUHAN
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($sum_baki, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
@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': 'WTD', '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="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Selesai WTD</span>
|
||||
</div>
|
||||
<form method="get" id="formwtd" action="{{ route('reports.summary-wtd.index') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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-left 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-left 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-left 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-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Jumlah Surat
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Jumlah WTD Dihantar
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php
|
||||
$totalsag = 0; // jumlah semua surat
|
||||
$totalbaki = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
|
||||
@forelse ($summarywtd ?? [] as $wtd)
|
||||
@php
|
||||
// Jumlah semua surat
|
||||
$totalsag += $wtd['jumlah_surat'] ?? 0;
|
||||
$totalbaki += $wtd['sum_baki'] ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $wtd['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $wtd['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ $wtd['jumlah_surat'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($wtd['sum_baki'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-center">
|
||||
<a href="{{ route('reports.wtd.cawangan.excel', [$wtd['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-download mr-2"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ $totalsag }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -440,14 +440,13 @@ hr.new5 {
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">DiSemak </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Cagaran Di Keluarkan</td>
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
|
||||
<td colspan="3">DiSemak </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Cagaran Di Keluarkan</td>
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
@@ -549,7 +548,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,702 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
window.print();
|
||||
window.onfocus = function() {
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
/* Red border */
|
||||
hr.new1 {
|
||||
border-top: 1px solid red;
|
||||
}
|
||||
|
||||
/* Dashed red border */
|
||||
hr.new2 {
|
||||
border-top: 1px dashed red;
|
||||
}
|
||||
|
||||
/* Dotted red border */
|
||||
hr.new3 {
|
||||
border-top: 1px dotted red;
|
||||
}
|
||||
|
||||
/* Thick red border */
|
||||
hr.new4 {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
/* Large rounded green border */
|
||||
hr.new5 {
|
||||
border: 10px solid green;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 20%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#cust td,
|
||||
#cust th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
#cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#cust tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#cust {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
hr.new1 {
|
||||
border-top: 1px dotted black;
|
||||
}
|
||||
|
||||
.khazanah {
|
||||
border: 1px solid black;
|
||||
margin-left: 20px;
|
||||
padding: 10px;
|
||||
width: 250px;
|
||||
transform: rotate(-90deg);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#inside {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#inside td,
|
||||
#inside th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#semakan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#semakan td,
|
||||
#semakan th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#semakan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#semakan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#semakan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#salinan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#salinan td,
|
||||
#salinan th {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
#salinan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan tr:hover {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: right;
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#perjanjian {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#perjanjian td,
|
||||
#perjanjian th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#perjanjian tr:nth-child(even) {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#perjanjian tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#perjanjian th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#keuntungan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#keuntungan td,
|
||||
#keuntungan th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#keuntungan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#keuntungan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#keuntungan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 90%;
|
||||
font-size: 13px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#payment td,
|
||||
#payment th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#payment tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#payment tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#payment th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#akuan td,
|
||||
#akuan th {
|
||||
padding: 7px;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#akuan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#akuan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#akuan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.formula {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 10%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#copy_cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#copy_cust tr:hover {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#copy_cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#copy_cust td,
|
||||
#copy_cust th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 9px;
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
margin-right: 0px;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.header-style {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.header-style span {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.receipt-type-style {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width:40px;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-items:end;
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<div class="header-style">
|
||||
<!-- Logo Section -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||
</div>
|
||||
|
||||
<!-- Cawangan Info -->
|
||||
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notice Section -->
|
||||
<div style="margin-top: 10px;">
|
||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">A</div>
|
||||
<table id="inside">
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><b> No SAG</b></td>
|
||||
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($transaction['created_at']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table id="payment" style="width: 60%">
|
||||
<tr>
|
||||
<td>Ansuran Pembiayaan</td>
|
||||
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keuntungan</td>
|
||||
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lain-Lain Caj</td>
|
||||
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||
@php
|
||||
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||
@endphp
|
||||
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table> --}}
|
||||
<br>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">Pelanggan</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">Teller</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<hr class="new2">
|
||||
</hr>
|
||||
</table>
|
||||
<div class="header-style">
|
||||
<div style="display: flex; align-items:center">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">A</div>
|
||||
<table id="inside">
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><b> No SAG</b></td>
|
||||
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($transaction['created_at']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table id="payment" style="width: 60%">
|
||||
<tr>
|
||||
<td>Ansuran Pembiayaan</td>
|
||||
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keuntungan</td>
|
||||
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lain-Lain Caj</td>
|
||||
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||
@php
|
||||
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||
@endphp
|
||||
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table> --}}
|
||||
<br>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">Pelanggan</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">Teller</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<table id="inside" style="width: 45%; margin-top:20px">
|
||||
<tr>
|
||||
<td>Duit Pelanggan</td>
|
||||
<td>: RM {{ number_format($transaction['duitpelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumlah Perlu Dibayar</td>
|
||||
<td>: RM {{ number_format($transaction['duit_masuk'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Baki</td>
|
||||
<td>: RM {{ number_format($transaction['bakipelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr style="visibility: hidden">
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
@@ -473,7 +473,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3">Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
@@ -575,7 +575,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,947 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
window.print();
|
||||
window.onfocus = function() {
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
/* Red border */
|
||||
hr.new1 {
|
||||
border-top: 1px solid red;
|
||||
}
|
||||
|
||||
/* Dashed red border */
|
||||
hr.new2 {
|
||||
border-top: 1px dashed red;
|
||||
}
|
||||
|
||||
/* Dotted red border */
|
||||
hr.new3 {
|
||||
border-top: 1px dotted red;
|
||||
}
|
||||
|
||||
/* Thick red border */
|
||||
hr.new4 {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
/* Large rounded green border */
|
||||
hr.new5 {
|
||||
border: 10px solid green;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 20%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#cust td,
|
||||
#cust th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
#cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#cust tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#cust {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
hr.new1 {
|
||||
border-top: 1px dotted black;
|
||||
}
|
||||
|
||||
.khazanah {
|
||||
border: 1px solid black;
|
||||
margin-left: 20px;
|
||||
padding: 10px;
|
||||
width: 250px;
|
||||
transform: rotate(-90deg);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#inside {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#inside td,
|
||||
#inside th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#semakan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#semakan td,
|
||||
#semakan th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#semakan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#semakan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#semakan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#salinan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#salinan td,
|
||||
#salinan th {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
#salinan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan tr:hover {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: right;
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#perjanjian {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#perjanjian td,
|
||||
#perjanjian th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#perjanjian tr:nth-child(even) {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#perjanjian tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#perjanjian th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#keuntungan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#keuntungan td,
|
||||
#keuntungan th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#keuntungan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#keuntungan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#keuntungan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 60%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#payment td,
|
||||
#payment th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#payment tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#payment tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#payment th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#akuan td,
|
||||
#akuan th {
|
||||
padding: 7px;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#akuan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#akuan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#akuan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.formula {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 10%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#copy_cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#copy_cust tr:hover {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#copy_cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#copy_cust td,
|
||||
#copy_cust th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
margin-right: 0px;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.header-style {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.header-style span {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.center-table-style-border {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
border: 1px solid black
|
||||
}
|
||||
|
||||
.center-table-style {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.receipt-type-style {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: end;
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.custom-table-right {
|
||||
border: none !important;
|
||||
border-left: 1px solid !important;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.vertical-baseline {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
</style>
|
||||
<div class="header-style">
|
||||
<!-- Logo Section -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||
</div>
|
||||
|
||||
<!-- Cawangan Info -->
|
||||
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notice Section -->
|
||||
<div style="margin-top: 10px;">
|
||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">T</div>
|
||||
<table id="inside">
|
||||
|
||||
@if (sizeof($wakil) != 0)
|
||||
<tr>
|
||||
<td colspan="3">Nama Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> <b>No SAG</b></td>
|
||||
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['nokp'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Telefon</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['telefon'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran </td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||
<td colspan="7"> </td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><strong>No SAG</strong></td>
|
||||
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Tempoh Simpan</td>
|
||||
<td>: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||
@if (sizeof($wakil) != 0)
|
||||
<table id="payment" style="border: none; height: fit-content">
|
||||
<tr>
|
||||
<td colspan="3">Maklumat Pelanggan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td style="">{{ $customers_info['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td>
|
||||
@php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||
<tr>
|
||||
<td style="width:10px">Baki Pembiayaan</td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Keuntungan</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||
<td style="font-size: 17px"><strong>: RM
|
||||
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Teller</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">Khazanah</td>
|
||||
|
||||
</tr>
|
||||
{{-- <tr> --}}
|
||||
{{-- <td colspan="3">{{ Auth::user()->name }}</td> --}}
|
||||
|
||||
{{-- <td></td> --}}
|
||||
{{-- <td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td> --}}
|
||||
{{-- <td></td> --}}
|
||||
{{-- <td colspan="3"> {{ $khazanah_user->name }}</td> --}} {{-- <td colspan="3">{{ $khazanah_user->name ?? '' }}</td> --}}
|
||||
{{-- </tr> --}}
|
||||
</table>
|
||||
<hr class="new2">
|
||||
|
||||
</table>
|
||||
|
||||
<div class="header-style">
|
||||
<div style="display: flex; align-items:center">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">T</div>
|
||||
<table id="inside">
|
||||
|
||||
@if (sizeof($wakil) != 0)
|
||||
<tr>
|
||||
<td colspan="3">Nama Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> <b>No SAG</b></td>
|
||||
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['nokp'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Telefon</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['telefon'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran </td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||
<td colspan="7"> </td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><strong>No SAG</strong></td>
|
||||
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Tempoh Simpan</td>
|
||||
<td>: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||
@if (sizeof($wakil) != 0)
|
||||
<table id="payment" style="border: none; height: fit-content">
|
||||
<tr>
|
||||
<td colspan="3">Maklumat Pelanggan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td style="">{{ $customers_info['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td>
|
||||
@php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||
<tr>
|
||||
<td style="width:10px">Baki Pembiayaan</td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Keuntungan</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||
<td style="font-size: 17px"><strong>: RM
|
||||
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Teller</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">Khazanah</td>
|
||||
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3"> {{ Auth::user()->name }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td>
|
||||
<td></td> --}}
|
||||
{{-- <td colspan="3">{{ $khazanah_user->name }}</td> --}}
|
||||
{{-- <td colspan="3">{{ $khazanah_user->name ?? '-' }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<table id="inside" style="width: 45%; margin-top:20px">
|
||||
<tr>
|
||||
<td>Duit Pelanggan</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['duitpelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumlah Perlu Dibayar</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['duit_masuk'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Baki</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['bakipelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan" style="margin-top: 0">
|
||||
<tr style="visibility: hidden">
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
@@ -0,0 +1,48 @@
|
||||
@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' : 'Debug Proses WTD', 'icon' : 'fas fa-file-invoice','url' : {{ json_encode(route('wtd.debugWTD.home')) }}}]"></breadcrumb>
|
||||
|
||||
|
||||
@if (Session::has('type'))
|
||||
<div class="@if(Session::get('type') == 'error') bg-red-100 border-red-500 text-red-900 @else bg-yellow-100 border-green-500 text-green-900 @endif border-t-4 rounded-b px-4 py-3 shadow-md w-96 mx-auto mb-5" role="alert">
|
||||
<div class="flex">
|
||||
<div class="py-1">
|
||||
@if(Session::get('type') == 'error')
|
||||
<svg class="w-6 h-6 mr-4 text-red-500 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"/></svg>
|
||||
@else
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 mr-4 text-green-500 fill-current" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" />
|
||||
</svg>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<p class="font-bold">{{ Session::get('message') }}</p>
|
||||
<p class="text-sm">{{ Session::get('title') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex items-center justify-center pt-5 mx-auto mr-3 ">
|
||||
<a href="{{ route('wtd.debugWTD.trail', ['startDate' => \Carbon\Carbon::yesterday()->format('Y-m-d'), 'endDate' => \Carbon\Carbon::yesterday()->format('Y-m-d')]) }}" class="w-1/6 px-6 py-4 mr-3 transition transform bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all hover:-translate-y-1 ">
|
||||
<div class="flex items-center justify-center">
|
||||
<svg fill="#000000" width="128px" height="128px" viewBox="0 0 256 256" id="Flat" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M208,72V184a7.99989,7.99989,0,0,1-8,8H176V104L136,64H80V40.00006a7.99989,7.99989,0,0,1,8-8L168,32Z" opacity="0.2"></path> <path d="M213.65723,66.34326l-40-40A8.00076,8.00076,0,0,0,168,24H88A16.01833,16.01833,0,0,0,72,40V56H56A16.01833,16.01833,0,0,0,40,72V216a16.01833,16.01833,0,0,0,16,16H168a16.01833,16.01833,0,0,0,16-16V200h16a16.01833,16.01833,0,0,0,16-16V72A8.00035,8.00035,0,0,0,213.65723,66.34326ZM168,216H56V72h76.68652L168,107.314l.00781,84.53083c-.001.05212-.00781.10284-.00781.15521,0,.05255.00684.10345.00781.15576l.002,23.84375Zm32-32H184V104a8.00035,8.00035,0,0,0-2.34277-5.65674l-40-40A8.00076,8.00076,0,0,0,136,56H88V40h76.68652L200,75.314Zm-56-32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,152Zm0,32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,184Z"></path> </g></svg>
|
||||
</div>
|
||||
<h2 class="mx-auto mt-4 text-2xl font-bold text-center uppercase">Trail Proses WTD</h2>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,198 @@
|
||||
@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': 'Debug Proses WTD', 'icon': 'fas fa-users', 'url': '{{ route('wtd.debugWTD.home') }}' },
|
||||
{ 'title': 'Data WTD', '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=""
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Selesai WTD</span>
|
||||
</div>
|
||||
<form method="get" id="formwtd" action="{{ route('wtd.debugWTD.trail') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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-left 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-left 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-left 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-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table Serahbaki
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table Tuntutbaki
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table WTD
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php
|
||||
$totalserahbaki = 0;
|
||||
$totaltuntutbaki = 0;
|
||||
$totalwtd = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
|
||||
@forelse ($debugwtd ?? [] as $dwtd)
|
||||
@php
|
||||
// Total
|
||||
$totalserahbaki += $dwtd['serahb'] ?? 0;
|
||||
$totaltuntutbaki += $dwtd['tuntutb'] ?? 0;
|
||||
$totalwtd += $dwtd['twtd'] ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $dwtd['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $dwtd['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['serahb'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['tuntutb'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['twtd'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-center">
|
||||
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3"></span>
|
||||
@else
|
||||
<span style="color: red;">Perlu Semakan</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalserahbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totaltuntutbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalwtd, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="pt-6 px-4">
|
||||
<breadcrumb :items="[{ 'title' : 'Wang Tak Dituntut', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
|
||||
|
||||
<wtdindex-component></wtd-component>
|
||||
<wtdindex-component></wtdindex-component>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="flex justify-center mt-10">
|
||||
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-lg max-w-md w-full">
|
||||
|
||||
<h5 class="mb-6 text-2xl font-bold tracking-tight text-gray-900 text-center">Jana Simulasi</h5>
|
||||
|
||||
<form method="GET" action="{{ route('wtd.simulasi.show') }}">
|
||||
@csrf
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="branch" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Cawangan</label>
|
||||
<select id="branch" name="kodcaw" required
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||
<option disabled {{ old('kodcaw') ? '' : 'selected' }}>Pilih Cawangan</option>
|
||||
@foreach ($cawangan as $cawanganItem)
|
||||
<option value="{{ $cawanganItem['kodcaw'] }}"
|
||||
{{ old('kodcaw') == $cawanganItem['kodcaw'] ? 'selected' : '' }}>
|
||||
{{ $cawanganItem['details_caw'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@error('kodcaw')
|
||||
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="year" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Tahun</label>
|
||||
<select id="year" name="tahun" required
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||
<option disabled {{ old('tahun') ? '' : 'selected' }}>Pilih Tahun</option>
|
||||
@for ($year = 2020; $year <= now()->year; $year++)
|
||||
<option value="{{ $year }}" {{ old('tahun') == $year ? 'selected' : '' }}>
|
||||
{{ $year }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
@error('tahun')
|
||||
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit"
|
||||
class="w-full px-4 py-2 text-white bg-yellow-600 rounded-lg hover:bg-yellow-700 focus:ring-4 focus:ring-yellow-300">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// let branch = document.getElementById('branch');
|
||||
// // alert(branch);
|
||||
// branch.addEventListener('change',function(){
|
||||
// alert('Hello');
|
||||
// } )
|
||||
|
||||
// Ensure the DOM is fully loaded before accessing elements
|
||||
// document.addEventListener('DOMContentLoaded', function() {
|
||||
// let branch = document.getElementById('branch');
|
||||
|
||||
// // Check if the element exists
|
||||
// if (branch) {
|
||||
// branch.addEventListener('change', function(e) {
|
||||
// alert('Hello');
|
||||
// alert(branch.value);
|
||||
// let q = document.getElementById('cawangan_selector')
|
||||
// console.log(e);
|
||||
// q.innerText = branch.value;
|
||||
// });
|
||||
// } else {
|
||||
// console.error('Element with ID "branch" not found.');
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// function updateHeaderCawangan(selectedCawangan) {
|
||||
// alert('hello');
|
||||
// let componentElement = document.querySelector('cawangan-component');
|
||||
|
||||
// // Create a custom event
|
||||
// let event = new CustomEvent('clickEvent_', {
|
||||
// detail: 'Some data', // Pass any data you need
|
||||
// });
|
||||
|
||||
// // Dispatch the event on the component's DOM element
|
||||
// componentElement.dispatchEvent(event);
|
||||
|
||||
// axios.post('/update-cawangan', {
|
||||
// kodcaw: selectedCawangan
|
||||
// }).then(response => {
|
||||
// console.log('Cawangan updated successfully');
|
||||
// }).catch(error => {
|
||||
// console.error('Error updating cawangan:', error);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,89 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
<h1 class="text-2xl font-bold text-center my-4">Pengesahan Simulasi WTD</h1>
|
||||
{{-- Display success or error messages --}}
|
||||
@if (session('success'))
|
||||
<div class="bg-green-500 text-white px-4 py-2 rounded mb-4">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@elseif (session('error'))
|
||||
<div class="bg-red-500 text-white px-4 py-2 rounded mb-4">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<div>
|
||||
<h5 class="text-lg font-semibold">Maklumat Simulasi yang Dipilih</h5>
|
||||
</div>
|
||||
|
||||
<div class="py-2">
|
||||
<a href="{{ url()->previous() }}"
|
||||
class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (!empty($insertedRecords) && count($insertedRecords) > 0)
|
||||
@php
|
||||
// Calculate total baki
|
||||
$totalBakiLelong = array_reduce(
|
||||
$insertedRecords,
|
||||
function ($sum, $record) {
|
||||
return $sum + $record['baki'];
|
||||
},
|
||||
0,
|
||||
);
|
||||
@endphp
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Jumlah No Rujukan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($insertedRecords as $index => $record)
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['bulan'] }}</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['jumlah_sag'] }}</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($record['pembiayaan'], 2) }}
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($record['baki'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<!-- Add the total row -->
|
||||
<tr class="bg-gray-200 font-bold">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center" colspan="3">Jumlah Baki Lelong</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($totalBakiLelong, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<p class="text-center text-gray-600 mt-4">Tiada data yang dipilih untuk pengesahan.</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mt-6">
|
||||
<form action="{{ route('wtd.simulasi.proses-pengesahan') }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="records" value="{{ json_encode($insertedRecords) }}">
|
||||
<input type="hidden" name="kodcaw" value="{{ json_encode($kodcaw) }}">
|
||||
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700">
|
||||
Sahkan
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
<h1 class="text2xl font-bold">
|
||||
Senarai Surat Akuan Gadaian: <span class="underline hover:underline-offset-auto 2xl: uppercase font-extrabold">{{ $bulan }}</span>
|
||||
</h1>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||
<span id="total-baki" class="text-yellow-600">
|
||||
RM {{ number_format($totalBaki, 2) }}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||
<th class="border border-gray-200 px-4 py-2">No Rujukan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Tarikh Lelong</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rekod as $index => $item)
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||
|
||||
<td class="px-4 py-2 border">{{ $item['norujukan'] }}</td>
|
||||
<td class="px-4 py-2 border">{{ $item['t_lelong'] }}</td>
|
||||
<td class="px-4 py-2 border">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||
<td class="px-4 py-2 border">{{ number_format($item['baki'], 2) }}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<a href="{{ url()->previous() }}" class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@include('layouts.footer');
|
||||
@endsection
|
||||
@@ -0,0 +1,131 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
@if (session('success'))
|
||||
<div class="bg-green-100 text-green-800 px-4 py-3 rounded mb-4">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<h2 class="text-2xl font-bold mb-6">Senarai Batch Simulasi Untuk Tahun: {{ $year }}</h2>
|
||||
|
||||
<div class="flex justify-end items-center mb-4">
|
||||
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||
<span id="total-baki" class="text-yellow-600">RM 0.00</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<form id="proses-wtd-form" method="POST" action="{{ route('wtd.simulasi.pengesahan') }}">
|
||||
@csrf
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Jumlah SAG</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||
<th class="border border-gray-200 px-4 py-2 text-center">
|
||||
<input id="select-all" type="checkbox" class="cursor-pointer">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- @dd($senaraiSimulasi); --}}
|
||||
@foreach ($senaraiSimulasi as $index => $item)
|
||||
<input type="hidden" name="tahun" value="{{ $year }}"/>
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||
|
||||
<td class="border border-gray-300 px-4 py-2">
|
||||
<a href="{{ route('wtd.simulasi.rekod', [
|
||||
'month' => $item['bulan'],
|
||||
'year' => $year,
|
||||
'kodcaw' => $item['kodcaw'],
|
||||
]) }}"
|
||||
class="text-yellow-600 hover:underline">
|
||||
{{ $item['bulan'] }}
|
||||
</a>
|
||||
<input type="hidden" name="data[{{ $index }}][kodcaw]"
|
||||
value="{{ $item['kodcaw'] }}">
|
||||
|
||||
<input type="hidden" name="data[{{ $index }}][bulan]"
|
||||
value="{{ $item['bulan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ $item['jumlah_norujukan'] ?? 0 }}
|
||||
<input type="hidden" name="data[{{ $index }}][jumlah_norujukan]"
|
||||
value="{{ $item['jumlah_norujukan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2">
|
||||
{{ number_format($item['pembiayaan'], 2) }}
|
||||
<input type="hidden" name="data[{{ $index }}][pembiayaan]"
|
||||
value="{{ $item['pembiayaan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2" data-baki="{{ $item['baki'] }}">
|
||||
{{ number_format($item['baki'], 2) }}
|
||||
<input type="hidden" name="data[{{ $index }}][baki]"
|
||||
value="{{ $item['baki'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
<input type="checkbox" class="row-checkbox" data-baki="{{ $item['baki'] }}"
|
||||
name="data[{{ $index }}][selected]">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<button type="submit" id="proses-wtd-btn"
|
||||
class="bg-yellow-600 text-white px-6 py-2 rounded cursor-pointer hover:bg-yellow-700">
|
||||
Jana Simulasi
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const selectAllCheckbox = document.getElementById('select-all');
|
||||
const rowCheckboxes = document.querySelectorAll('.row-checkbox');
|
||||
const totalBakiElement = document.getElementById('total-baki');
|
||||
|
||||
function formatCurrency(amount) {
|
||||
return `RM ${amount.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')}`;
|
||||
}
|
||||
|
||||
function calculateTotalBaki() {
|
||||
let total = 0;
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
if (checkbox.checked) {
|
||||
total += parseFloat(checkbox.dataset.baki);
|
||||
}
|
||||
});
|
||||
totalBakiElement.textContent = formatCurrency(total);
|
||||
}
|
||||
|
||||
selectAllCheckbox.addEventListener('change', function() {
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
checkbox.checked = this.checked;
|
||||
});
|
||||
calculateTotalBaki();
|
||||
});
|
||||
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
checkbox.addEventListener('change', function() {
|
||||
if (!this.checked) {
|
||||
selectAllCheckbox.checked = false;
|
||||
}
|
||||
if (Array.from(rowCheckboxes).every(cb => cb.checked)) {
|
||||
selectAllCheckbox.checked = true;
|
||||
}
|
||||
calculateTotalBaki();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user