tambah laporan gadai tebus masa
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||||
|
|
||||||
|
class GadaiTebusMasaExport implements WithMultipleSheets
|
||||||
|
{
|
||||||
|
public $cawangan_detail;
|
||||||
|
public $query;
|
||||||
|
public $gadaian;
|
||||||
|
public $summary_gadaian;
|
||||||
|
protected $gadaian_full_data;
|
||||||
|
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->cawangan_detail = $data['cawangan_detail'];
|
||||||
|
$this->query = $data['query'];
|
||||||
|
$this->gadaian = $data['gadaian'];
|
||||||
|
$this->summary_gadaian = $data['summary_gadaian'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function sheets(): array
|
||||||
|
{
|
||||||
|
// Sheet untuk senarai penuh gadaian (gabung semua teller)
|
||||||
|
$full_gadaian_data = [];
|
||||||
|
|
||||||
|
foreach ($this->gadaian as $teller => $data) {
|
||||||
|
if (isset($data['gadaian']) && is_array($data['gadaian'])) {
|
||||||
|
foreach ($data['gadaian'] as $item) {
|
||||||
|
$item['teller'] = $teller; // optional: simpan info teller
|
||||||
|
$full_gadaian_data[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sheets[] = new GadaiTebusMasaFullExport(
|
||||||
|
$this->cawangan_detail,
|
||||||
|
$this->query,
|
||||||
|
$this->gadaian,
|
||||||
|
$full_gadaian_data
|
||||||
|
);
|
||||||
|
|
||||||
|
return $sheets;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
|
||||||
|
class GadaiTebusMasaFullExport implements FromView, ShouldAutoSize, WithTitle, WithColumnFormatting
|
||||||
|
{
|
||||||
|
protected $cawangan_detail;
|
||||||
|
protected $query;
|
||||||
|
protected $gadaian_full_data;
|
||||||
|
|
||||||
|
public function __construct($cawangan_detail, $query, $gadaian_full_data)
|
||||||
|
{
|
||||||
|
$this->cawangan_detail = $cawangan_detail;
|
||||||
|
$this->query = $query;
|
||||||
|
$this->gadaian_full_data = $gadaian_full_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view(): View
|
||||||
|
{
|
||||||
|
return view('exports.gadaian.full', [
|
||||||
|
'cawangan_detail' => $this->cawangan_detail,
|
||||||
|
'query' => $this->query,
|
||||||
|
'gadaian_data' => $this->gadaian_full_data,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function title(): string
|
||||||
|
{
|
||||||
|
return 'SENARAI GADAI TEBUS PENUH';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnFormats(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Berat
|
||||||
|
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Nilai Marhun
|
||||||
|
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Pinjaman
|
||||||
|
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Keuntungan
|
||||||
|
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // caj lelong
|
||||||
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use App\Exports\LaporanKeseluruhan\GadaiTebusAllExportExcel;
|
use App\Exports\LaporanKeseluruhan\GadaiTebusAllExportExcel;
|
||||||
|
use App\Exports\GadaiTebusMasaExport;
|
||||||
|
|
||||||
class GadaianController extends Controller
|
class GadaianController extends Controller
|
||||||
{
|
{
|
||||||
@@ -99,4 +100,79 @@ class GadaianController extends Controller
|
|||||||
|
|
||||||
return view('reports.gadaitebus.index', compact('gadaian', 'startDate', 'endDate'));
|
return view('reports.gadaitebus.index', compact('gadaian', 'startDate', 'endDate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function gadaitebusmasa(Request $request)
|
||||||
|
{
|
||||||
|
$current = new Carbon();
|
||||||
|
$action = $request->input('action', 'search');
|
||||||
|
$kod_cawangan = $request->kod_cawangan;
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
if ($date_string == null) {
|
||||||
|
return $current->toDateString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $date_string;
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$gadaian = Http::get($request->hostname . '/api/reports/gadaitebus', [
|
||||||
|
'startDate' => $getReportDate($request->startDate),
|
||||||
|
'endDate' => $getReportDate($request->endDate),
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
if ($action === 'excel') {
|
||||||
|
$file_title = sprintf("LaporanGadaiTebusMasa %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||||
|
return Excel::download(new GadaiTebusMasaAllExportExcel($gadaian), $file_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('reports.gadaitebusmasa.index', compact('gadaian', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function downloadGadaiTebusMasaCawanganExcel(Request $request)
|
||||||
|
{
|
||||||
|
$api_url = $request->hostname;
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$current = Carbon::now();
|
||||||
|
$tarikh_cetak = $current->toDateString();
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ?? $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
$kod_cawangan = $request->kod_cawangan;
|
||||||
|
// dd($kod_cawangan);
|
||||||
|
|
||||||
|
$data = Http::get($request->hostname . '/api/reports/gadaitebusmasa/' . $kod_cawangan, [
|
||||||
|
'startDate' => $getReportDate($request->startDate),
|
||||||
|
'endDate' => $getReportDate($request->endDate),
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$byTeller = $request->input('by_teller', 1); // default ikut teller
|
||||||
|
|
||||||
|
if (!$byTeller) {
|
||||||
|
// Gabung semua data jadi satu baris
|
||||||
|
$gabung = [
|
||||||
|
'teller' => 'Keseluruhan',
|
||||||
|
'jumlah_lelongan' => 0,
|
||||||
|
'jumlah_baki' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($data as $item) {
|
||||||
|
$gabung['jumlah_lelongan'] += $item['jumlah_lelongan'] ?? 0;
|
||||||
|
$gabung['jumlah_baki'] += $item['jumlah_baki'] ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [$gabung];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$file_title = sprintf("LaporanGadaiTebusMasaCawangan %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||||
|
return Excel::download(new GadaiTebusMasaExport($data), $file_title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11" style="text-align: center; font-weight: bold; font-size: 16px;">
|
||||||
|
SENARAI GADAI TEBUS MASA
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11" style="text-align: center;">
|
||||||
|
Cawangan: {{ $cawangan_detail['nama'] ?? '-' }} |
|
||||||
|
Tarikh: {{ $query['tarikh'] ?? now()->format('d/m/Y') }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="11"> </td></tr> {{-- ruang kosong sebelum header kolum --}}
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Berat (g)</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pembiayaan (RM)</th>
|
||||||
|
<th>Tarikh Gadai</th>
|
||||||
|
<th>Masa Gadai</th>
|
||||||
|
<th>Masa Tebus</th>
|
||||||
|
<th>Beza Minit</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$total_berat = 0;
|
||||||
|
$total_nilaimarhun = 0;
|
||||||
|
$total_pinjaman = 0;
|
||||||
|
@endphp
|
||||||
|
@foreach ($gadaian_data as $index => $item)
|
||||||
|
@php
|
||||||
|
$total_berat += (float) $item['berat'];
|
||||||
|
$total_nilaimarhun += (float) $item['nilai_marhun'];
|
||||||
|
$total_pinjaman += (float) $item['pinjaman'];
|
||||||
|
@endphp
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $item['no_rujukan'] ?? '' }}</td>
|
||||||
|
<td>{{ $item['nama'] ?? '' }}</td>
|
||||||
|
<td>'{{ $item['no_kp'] ?? '' }}</td>
|
||||||
|
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['nilai_marhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['t_gadai'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['masa'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['masa_tebus'] ?? 0 }}</td>
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
$beza_str = $item['beza_minit'] ?? '00:00:00'; // contoh: "01:03:12", "-00:45:00"
|
||||||
|
|
||||||
|
try {
|
||||||
|
$sign = Str::startsWith($beza_str, '-') ? '-' : '';
|
||||||
|
$time = ltrim($beza_str, '-');
|
||||||
|
|
||||||
|
[$jam, $minit, $saat] = explode(':', $time);
|
||||||
|
|
||||||
|
// Pastikan jam & minit sebagai integer
|
||||||
|
$jam = (int) $jam;
|
||||||
|
$minit = (int) $minit;
|
||||||
|
|
||||||
|
echo $sign . $jam . ' jam ' . $minit . ' minit';
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
echo '-';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><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><strong></strong></td>
|
||||||
|
<td><strong></strong></td>
|
||||||
|
<td><strong></strong></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -98,6 +98,12 @@
|
|||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera</h2>
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera</h2>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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.gadaitebusmasa.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera(By Masa)</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,220 @@
|
|||||||
|
@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': 'GadaiTebusMasa', 'icon': 'fas fa-users' }]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-3/5 2xl:w-2/3 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">Laporan Transaksi Segera Gadai Tebus Masa</span></div>
|
||||||
|
<form method="get" id="formgadaitebus" action="{{ route('reports.gadaitebusmasa.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">
|
||||||
|
<!-- Hidden Input to Determine Action -->
|
||||||
|
<input type="hidden" name="action" id="formAction" value="search">
|
||||||
|
|
||||||
|
<button type="submit" onclick="setAction('search')" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5">
|
||||||
|
<i class="fas fa-magnifying-glass mr-2"></i> Search
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="submit" onclick="setAction('excel')" class="border border-yellow-600 text-yellow-600 py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-2">
|
||||||
|
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div kodcaw="operasi">
|
||||||
|
<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">
|
||||||
|
Bil SAG
|
||||||
|
</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">
|
||||||
|
Pembiayaan(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">
|
||||||
|
Muat Turun
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
@php
|
||||||
|
$totalbilgadai = 0;
|
||||||
|
$totalpinjaman = 0;
|
||||||
|
@endphp
|
||||||
|
<tbody>
|
||||||
|
@forelse ($gadaian as $gadai)
|
||||||
|
@php
|
||||||
|
$totalbilgadai += $gadai['total_gadai_tebus_samahari'];
|
||||||
|
$totalpinjaman += $gadai['jumlah_pinjaman'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<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">{{ $loop->iteration }}</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">{{ $gadai['kodcaw'] }}</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">{{ $gadai['details_caw'] }}</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">{{ $gadai['total_gadai_tebus_samahari'] }}
|
||||||
|
</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['jumlah_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">
|
||||||
|
<a href="{{ route('reports.gadaitebusmasa.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>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" 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">Data not available</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" 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">Jumlah Keseluruhan</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">{{ $totalbilgadai}}
|
||||||
|
</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($totalpinjaman,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">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function setAction(action) {
|
||||||
|
document.getElementById('formAction').value = action;
|
||||||
|
document.getElementById('formgadaitebus').submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -43,4 +43,6 @@ Route::middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter, null'])->gro
|
|||||||
Route::get('bayaran-online/view', BayaranOnlineController::class)->name('reports.bayaran-online.index');
|
Route::get('bayaran-online/view', BayaranOnlineController::class)->name('reports.bayaran-online.index');
|
||||||
Route::get('bayaran-online-details/view', BayaranOnlineDetailController::class)->name('reports.bayaran-online-detail.index');
|
Route::get('bayaran-online-details/view', BayaranOnlineDetailController::class)->name('reports.bayaran-online-detail.index');
|
||||||
Route::get('gadaitebus', [GadaianController::class, 'gadaitebus'])->name('reports.gadaitebus.index');
|
Route::get('gadaitebus', [GadaianController::class, 'gadaitebus'])->name('reports.gadaitebus.index');
|
||||||
|
Route::get('gadaitebusmasa', [GadaianController::class, 'gadaitebusmasa'])->name('reports.gadaitebusmasa.index');
|
||||||
|
Route::get('gadaitebusmasa/{kod_cawangan}', [GadaianController::class, 'downloadGadaiTebusMasaCawanganExcel'])->name('reports.gadaitebusmasa.cawangan.excel');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user