tambah excel untuk laporan keseluruhan
This commit is contained in:
@@ -0,0 +1,178 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports\LaporanKeseluruhan;
|
||||||
|
|
||||||
|
use Maatwebsite\Excel\Concerns\FromArray;
|
||||||
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStrictNullComparison;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
|
|
||||||
|
class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, WithStrictNullComparison, WithMapping, WithHeadings, ShouldAutoSize, WithCustomValueBinder, WithColumnFormatting
|
||||||
|
{
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
public function __construct($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'Cawangan',
|
||||||
|
'Bilangan Pembiayaan',
|
||||||
|
'Berat',
|
||||||
|
'Nilai Marhun',
|
||||||
|
'Pembiayaan (RM)',
|
||||||
|
'Baki Pembiayaan (RM)',
|
||||||
|
'Keuntungan (RM)',
|
||||||
|
'Caj Lelong (RM)',
|
||||||
|
'Harga Jual (RM)',
|
||||||
|
'Baki (RM)',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function array(): array
|
||||||
|
{
|
||||||
|
// dd($this->data);
|
||||||
|
if (empty($this->data)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize an array to store formatted data
|
||||||
|
$formattedData = [];
|
||||||
|
|
||||||
|
// Initialize totals
|
||||||
|
$total_lelongan = 0;
|
||||||
|
$sum_berat = 0;
|
||||||
|
$sum_nilai_marhun = 0;
|
||||||
|
$sum_bakipjm = 0;
|
||||||
|
$sum_pinjaman = 0;
|
||||||
|
$sum_bakiupah = 0;
|
||||||
|
$sum_cajlelong = 0;
|
||||||
|
$sum_hargajual = 0;
|
||||||
|
$sum_baki = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Process data
|
||||||
|
foreach ($this->data as $index => $data) {
|
||||||
|
// Make sure all expected keys exist before accessing them
|
||||||
|
$formattedData[] = [
|
||||||
|
$data['details_caw'] ?? 'N/A',
|
||||||
|
$data['total_lelongan'] ?? 0,
|
||||||
|
number_format((float) ($data['sum_berat'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_nilai_marhun'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_pinjaman'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_bakipjm'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_bakiupah'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_cajlelong'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_hargajual'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_baki'] ?? 0), 2),
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
// Update totals
|
||||||
|
$total_lelongan += (int) $data['total_lelongan'];
|
||||||
|
$sum_berat += (float) $data['sum_berat'];
|
||||||
|
$sum_nilai_marhun += (float) $data['sum_nilai_marhun'];
|
||||||
|
$sum_pinjaman += (float) $data['sum_pinjaman'];
|
||||||
|
$sum_bakipjm += (float) $data['sum_bakipjm'];
|
||||||
|
$sum_bakiupah += (float) $data['sum_bakiupah'];
|
||||||
|
$sum_cajlelong += (float) $data['sum_cajlelong'];
|
||||||
|
$sum_hargajual += (float) $data['sum_hargajual'];
|
||||||
|
$sum_baki += (float) $data['sum_baki'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append total row
|
||||||
|
$formattedData[] = [
|
||||||
|
'Jumlah Keseluruhan',
|
||||||
|
$total_lelongan,
|
||||||
|
number_format($sum_berat, 2),
|
||||||
|
number_format($sum_nilai_marhun, 2),
|
||||||
|
number_format($sum_pinjaman, 2),
|
||||||
|
number_format($sum_bakipjm, 2),
|
||||||
|
number_format($sum_bakiupah, 2),
|
||||||
|
number_format($sum_cajlelong, 2),
|
||||||
|
number_format($sum_hargajual, 2),
|
||||||
|
number_format($sum_baki, 2),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
return $formattedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function startCell(): string
|
||||||
|
{
|
||||||
|
return 'B2';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function map($data): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$data[0] ?? 'N/A', // Cawangan
|
||||||
|
(int) ($data[1] ?? 0), // Bilangan Pembiayaan
|
||||||
|
(float) str_replace(',', '', $data[2] ?? 0), // Berat (remove commas)
|
||||||
|
(float) str_replace(',', '', $data[3] ?? 0), // Nilai Marhun
|
||||||
|
(float) str_replace(',', '', $data[4] ?? 0), // Baki Pembiayaan
|
||||||
|
(float) str_replace(',', '', $data[5] ?? 0), // Pembiayaan
|
||||||
|
(float) str_replace(',', '', $data[6] ?? 0), // Upah Belum Bayar
|
||||||
|
(float) str_replace(',', '', $data[7] ?? 0), // Total Untung 1%
|
||||||
|
(float) str_replace(',', '', $data[8] ?? 0), // Total Ujrah
|
||||||
|
(float) str_replace(',', '', $data[9] ?? 0), // Total Ujrah
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function columnWidths(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'A' => 20.5,
|
||||||
|
'B' => 42,
|
||||||
|
'C' => 14.18,
|
||||||
|
'D' => 14.18,
|
||||||
|
'E' => 9.19,
|
||||||
|
'F' => 27.5,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnFormats(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'M' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function bindValue(Cell $cell, $value)
|
||||||
|
{
|
||||||
|
if (is_numeric($value) && !is_string($value)) {
|
||||||
|
// Ensure value is treated as a number
|
||||||
|
$cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::bindValue($cell, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,12 +10,16 @@ use Illuminate\Support\Facades\Http;
|
|||||||
use App\Exports\LelonganExport;
|
use App\Exports\LelonganExport;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use App\Exports\LaporanKeseluruhan\LelonganAllExportExcel;
|
||||||
|
|
||||||
class LelonganController extends Controller
|
class LelonganController extends Controller
|
||||||
{
|
{
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$current = new Carbon();
|
$current = new Carbon();
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
$kod_cawangan = $request->kod_cawangan;
|
||||||
|
$action = $request->input('action', 'search');
|
||||||
|
|
||||||
$getReportDate = function ($date_string) use ($current) {
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
if ($date_string == null) {
|
if ($date_string == null) {
|
||||||
@@ -36,48 +40,49 @@ class LelonganController extends Controller
|
|||||||
$startDate = $getReportDate($request->startDate);
|
$startDate = $getReportDate($request->startDate);
|
||||||
$endDate = $getReportDate($request->endDate);
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
if ($action === 'excel') {
|
||||||
|
$file_title = sprintf("LaporanLelongan %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||||
|
return Excel::download(new LelonganAllExportExcel($data), $file_title);
|
||||||
|
}
|
||||||
|
|
||||||
return view('reports.laporan-lelong.index', compact('lelongan', 'startDate', 'endDate'));
|
return view('reports.laporan-lelong.index', compact('lelongan', 'startDate', 'endDate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show(Request $request)
|
public function show(Request $request)
|
||||||
{
|
{
|
||||||
$validated = $request->validate(
|
$current = Carbon::now();
|
||||||
['monthYear' => 'required'],
|
$action = $request->input('action', 'search');
|
||||||
['monthYear.required' => 'Sila isi tarikh sebelum hantar',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$current = Carbon::now();
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
$tarikh_cetak = $current->toDateString();
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
$tokens = explode('-', $validated['monthYear']);
|
};
|
||||||
$month = ltrim($tokens[0], '0');
|
|
||||||
$year = $tokens[1];
|
|
||||||
|
|
||||||
// Set the locale to Malaysian
|
$hostname = config('api.url');
|
||||||
App::setLocale('ms');
|
|
||||||
|
|
||||||
// Create a Carbon instance representing the date
|
$response = Http::get("$hostname/api/reports/lelongan", [
|
||||||
$date = Carbon::createFromDate($year, $month, 1); // Set the day to 1st of the month
|
'startDate' => $getReportDate($request->startDate),
|
||||||
|
'endDate' => $getReportDate($request->endDate),
|
||||||
|
]);
|
||||||
|
|
||||||
// Get the name of the month in Malaysian local
|
$lelongan = $response->json() ?? []; // Ensure it's an array
|
||||||
$monthName = $date->translatedFormat('F');
|
|
||||||
|
|
||||||
$request->hostname = config('api.url');
|
|
||||||
|
|
||||||
$stokAudit = Http::get($request->hostname . '/api/reports/stok-audit', [
|
|
||||||
'month' => $month,
|
|
||||||
'year' => $year,
|
|
||||||
])->json();
|
|
||||||
|
|
||||||
$tebus_date = $monthName . ' ' . $year;
|
|
||||||
$file_title = sprintf("Laporan-StokAudit %s (%s - %s).xlsx", 'Semua cawanangan', $monthName, $year);
|
|
||||||
|
|
||||||
if ($request->generateType === 'pdf') {
|
|
||||||
return view('reports.stok-audit.show', compact('tebus_date', 'tarikh_cetak', 'stokAudit', 'month', 'year'));
|
|
||||||
} else {
|
|
||||||
return Excel::download(new StokAuditExport($stokAudit), $file_title);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Debugging: Check the response before using it
|
||||||
|
if (empty($lelongan)) {
|
||||||
|
return back()->with('error', 'Failed to fetch data from API.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
if ($action === 'excel') {
|
||||||
|
// Ensure $kod_cawangan is defined (Modify as per your data structure)
|
||||||
|
$kod_cawangan = $request->input('kod_cawangan', 'DEFAULT');
|
||||||
|
|
||||||
|
$file_title = sprintf("LaporanLelongan %s (%s - %s).xlsx", $kod_cawangan, $startDate, $endDate);
|
||||||
|
return Excel::download(new LelonganAllExportExcel($lelongan), $file_title);
|
||||||
|
}
|
||||||
|
return view('reports.laporan-lelong.index', compact('lelongan', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
public function downloadLelonganCawanganExcel(Request $request)
|
public function downloadLelonganCawanganExcel(Request $request)
|
||||||
{
|
{
|
||||||
$api_url = $request->hostname;
|
$api_url = $request->hostname;
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg"><a href="/reports"
|
<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="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||||
class="text-center mx-auto text-white font-bold">Laporan Lelongan</span></div>
|
class="text-center mx-auto text-white font-bold">Laporan Lelongan</span></div>
|
||||||
<form method="get" id="formlelongan" action="{{ route('reports.lelongan.index') }}">
|
<form id="formLelongan" method="GET" action="{{ route('reports.lelongan.show') }}">
|
||||||
|
|
||||||
<div class="rounded bg-white shadow p-6">
|
<div class="rounded bg-white shadow p-6">
|
||||||
<div class="pb-6"><label for="username"
|
<div class="pb-6"><label for="username"
|
||||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||||
@@ -34,10 +35,16 @@
|
|||||||
<input id="tarikhhingga" name="endDate" type="date"
|
<input id="tarikhhingga" name="endDate" type="date"
|
||||||
value="{{ request()->endDate ?? $endDate }}"
|
value="{{ request()->endDate ?? $endDate }}"
|
||||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
<button
|
<!-- Hidden Input to Determine Action -->
|
||||||
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">
|
<input type="hidden" name="action" id="formAction" value="search">
|
||||||
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
|
||||||
</button>
|
<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>
|
</div>
|
||||||
@@ -46,6 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div kodcaw="operasi">
|
<div kodcaw="operasi">
|
||||||
<div>
|
<div>
|
||||||
<!---->
|
<!---->
|
||||||
@@ -356,4 +364,12 @@
|
|||||||
@include('layouts.footer')
|
@include('layouts.footer')
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
<!-- JavaScript to Change Action -->
|
||||||
|
<script>
|
||||||
|
function setAction(action) {
|
||||||
|
document.getElementById('formAction').value = action;
|
||||||
|
document.getElementById('formLelongan').submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
<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 ="5"><b>Laporan Stok Audit</b></th>
|
||||||
|
<th> </th>
|
||||||
|
<th> </th>
|
||||||
|
<th><b> Tarikh Cetak:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate)
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px"> <b>TARIKH</b></td>
|
||||||
|
<td>{{ $tebus_date }}</td>
|
||||||
|
<td style="width:50px">
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<table id="details">
|
||||||
|
<thead>
|
||||||
|
<th>Cawangan</th>
|
||||||
|
<th>Bilangan Pembiayaan</th>
|
||||||
|
<th>Berat</th>
|
||||||
|
<th>Nilai Marhun</th>
|
||||||
|
<th>Baki Pembiayaan</th>
|
||||||
|
<th>Pembiayaan</th>
|
||||||
|
<th>Keuntungan Belum Bayar</th>
|
||||||
|
<th>Jumlah Untung 1% Percent</th>
|
||||||
|
<th>Jumlah Lain-lain Caj</th>
|
||||||
|
</thead>
|
||||||
|
@foreach($stokAudit as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{$item['cawangan']}}</td>
|
||||||
|
<td>{{ $item['bilangan_pembiayaan'] }}</td>
|
||||||
|
<td>{{ number_format($item['berat'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['nilai_marhun'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['baki_pembiayaan'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['pembiayaan'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['upah_belum_bayar'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['total_utg_onepercent'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['total_ujrah'],2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</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>
|
||||||
@@ -22,4 +22,5 @@ Route::middleware(['roleChecker:admin,akaun,operasi,kpo, null'])->group(function
|
|||||||
Route::get('stok-audit/view', [StokAuditController::class, 'show'])->name('reports.stok-audit.show');
|
Route::get('stok-audit/view', [StokAuditController::class, 'show'])->name('reports.stok-audit.show');
|
||||||
Route::get('laporan-lelong', [LelonganController::class, 'index'])->name('reports.lelongan.index');
|
Route::get('laporan-lelong', [LelonganController::class, 'index'])->name('reports.lelongan.index');
|
||||||
Route::get('lelongan/{kod_cawangan}', [LelonganController::class, 'downloadLelonganCawanganExcel'])->name('reports.lelongan.cawangan.excel');
|
Route::get('lelongan/{kod_cawangan}', [LelonganController::class, 'downloadLelonganCawanganExcel'])->name('reports.lelongan.cawangan.excel');
|
||||||
|
Route::get('laporan-lelong/view', [LelonganController::class, 'show'])->name('reports.lelongan.show');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user