From 826c7e19c222dbf1e5d821bedff2e8b572b4b85b Mon Sep 17 00:00:00 2001 From: BTMS2 Date: Wed, 11 Jun 2025 12:31:24 +0800 Subject: [PATCH] tambah laporan baki lelong belum tuntut --- app/Exports/BakiLelongBelumTuntutExport.php | 79 ++++ app/Exports/BakiLelongFullExport.php | 53 +++ app/Exports/BakiLelongPerTellerExport.php | 122 ++++++ app/Exports/BakiLelongSummaryExport.php | 134 +++++++ .../Reports/BakiLelongController.php | 132 ++++++ .../exports/bakilelong/cawangan.blade.php | 95 +++++ .../views/exports/bakilelong/full.blade.php | 82 ++++ .../exports/bakilelong/summary.blade.php | 72 ++++ .../bakilelongbelumtuntut/index.blade.php | 375 ++++++++++++++++++ .../bakilelongbelumtuntut/show.blade.php | 232 +++++++++++ 10 files changed, 1376 insertions(+) create mode 100644 app/Exports/BakiLelongBelumTuntutExport.php create mode 100644 app/Exports/BakiLelongFullExport.php create mode 100644 app/Exports/BakiLelongPerTellerExport.php create mode 100644 app/Exports/BakiLelongSummaryExport.php create mode 100644 app/Http/Controllers/Reports/BakiLelongController.php create mode 100644 resources/views/exports/bakilelong/cawangan.blade.php create mode 100644 resources/views/exports/bakilelong/full.blade.php create mode 100644 resources/views/exports/bakilelong/summary.blade.php create mode 100644 resources/views/reports/bakilelongbelumtuntut/index.blade.php create mode 100644 resources/views/reports/bakilelongbelumtuntut/show.blade.php diff --git a/app/Exports/BakiLelongBelumTuntutExport.php b/app/Exports/BakiLelongBelumTuntutExport.php new file mode 100644 index 0000000..60f2aff --- /dev/null +++ b/app/Exports/BakiLelongBelumTuntutExport.php @@ -0,0 +1,79 @@ +cawangan_detail = $data['cawangan_detail']; + $this->query = $data['query']; + $this->lelongan = $data['lelongan']; + $this->summary_lelongan = $data['summary_lelongan']; + } + + public function sheets(): array + { + $sheets = []; + + // Sheet summary (group by teller) + $data = $this->lelongan; + $teller_with_lelongan_summary_data = array_reduce(array_keys($data), function ($accumulator, $key) use ($data) { + $accumulator[] = [ + 'teller' => $key, + 'summary_lelongan_teller' => $data[$key]['summary_lelongan_teller'], + ]; + return $accumulator; + }, []); + + $sheets[] = new BakiLelongSummaryExport( + $this->cawangan_detail, + $this->query, + $teller_with_lelongan_summary_data, + $this->summary_lelongan + ); + + // Sheet untuk setiap teller + foreach ($this->lelongan as $teller => $data) { + $teller_with_lelongan_data = [ + 'teller' => $teller, + 'data' => $data, + ]; + + $sheets[] = new BakiLelongPerTellerExport( + $this->cawangan_detail, + $this->query, + $teller_with_lelongan_data + ); + } + + // Sheet untuk senarai penuh lelongan (gabung semua teller) + $full_lelongan_data = []; + + foreach ($this->lelongan as $teller => $data) { + if (isset($data['lelongan']) && is_array($data['lelongan'])) { + foreach ($data['lelongan'] as $item) { + $item['teller'] = $teller; // optional: simpan info teller + $full_lelongan_data[] = $item; + } + } + } + + $sheets[] = new BakiLelongFullExport( + $this->cawangan_detail, + $this->query, + $full_lelongan_data + ); + + return $sheets; + } + +} diff --git a/app/Exports/BakiLelongFullExport.php b/app/Exports/BakiLelongFullExport.php new file mode 100644 index 0000000..81f0cb6 --- /dev/null +++ b/app/Exports/BakiLelongFullExport.php @@ -0,0 +1,53 @@ +cawangan_detail = $cawangan_detail; + $this->query = $query; + $this->lelongan_full_data = $lelongan_full_data; + } + + public function view(): View + { + return view('exports.bakilelong.full', [ + 'cawangan_detail' => $this->cawangan_detail, + 'query' => $this->query, + 'lelongan_data' => $this->lelongan_full_data, + ]); + } + + public function title(): string + { + return 'SENARAI LELONGAN 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 + + + + ]; + } +} diff --git a/app/Exports/BakiLelongPerTellerExport.php b/app/Exports/BakiLelongPerTellerExport.php new file mode 100644 index 0000000..6ae4f95 --- /dev/null +++ b/app/Exports/BakiLelongPerTellerExport.php @@ -0,0 +1,122 @@ +cawangan_detail = $cawangan_detail; + $this->query = $query; + $this->teller_with_lelongan_data = $teller_with_lelongan_data; + } + + public function title(): string + { + return sprintf("TELLER %s", $this->teller_with_lelongan_data['teller']); + } + + public function bindValue(Cell $cell, $value) + { + if (is_numeric($value)) { + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + + return true; + } + + // else return default behavior + return parent::bindValue($cell, $value); + } + + 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 [ + '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, + ]; + } + + public function registerEvents(): array + { + $table_style = [ + 'borders' => [ + 'allBorders' => [ + 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, + 'color' => ['argb' => '#000000'], + ], + ], + ]; + + $main_table_row_count = count($this->teller_with_lelongan_data) + 1; + $main_table_start_at_row = 9; + + $main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row); + + $summary_table_row_count = 1; + $summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5; + + $summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row); + + $summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row; + + // return [ + // AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) { + + // $event->sheet->getStyle($main_table_range)->applyFromArray($table_style); + // $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style); + + // $event->sheet->mergeCells($summary_table_column_head); + + // }, + + // ]; + + return []; + } + + public function view(): View + { + return view('exports.bakilelong.cawangan', [ + 'cawangan_detail' => $this->cawangan_detail, + 'query' => $this->query, + 'teller_with_lelongan_data' => $this->teller_with_lelongan_data, + ]); + } +} diff --git a/app/Exports/BakiLelongSummaryExport.php b/app/Exports/BakiLelongSummaryExport.php new file mode 100644 index 0000000..1d6a15d --- /dev/null +++ b/app/Exports/BakiLelongSummaryExport.php @@ -0,0 +1,134 @@ +cawangan_detail = $cawangan_detail; + $this->query = $query; + $this->teller_with_lelongan_summary_data = $teller_with_lelongan_data; + $this->summary_lelongan = $summary_lelongan; + $this->isByTeller = $isByTeller; + } + + + public function title(): string + { + return 'SUMMARY LELONGAN'; + } + + public function bindValue(Cell $cell, $value) + { + if (is_numeric($value)) { + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + + return true; + } + + // else return default behavior + return parent::bindValue($cell, $value); + } + + public function columnWidths(): array + { + return [ + 'A' => 28, + 'B' => 14.67, + 'C' => 16.00, + 'D' => 14.18, + ]; + } + + public function columnFormats(): array + { + return [ + '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, + 'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, + 'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, + ]; + } + + public function registerEvents(): array + { + $table_style = [ + 'borders' => [ + 'allBorders' => [ + 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, + 'color' => ['argb' => '#000000'], + ], + ], + ]; + + $main_table_row_count = count($this->teller_with_lelongan_summary_data) + 1; + $main_table_start_at_row = 9; + + $main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row); + + $summary_table_row_count = 1; + $summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5; + + $summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row); + + $summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row; + + return []; + } + + public function view(): View + { + $data = $this->teller_with_lelongan_summary_data; + + if (!$this->isByTeller) { + // Gabung semua teller jadi 1 baris jumlah + $total = [ + 'jumlah_lelongan' => 0, + 'jumlah_harga' => 0, + 'jumlah_baki' => 0, + // ... fields lain + ]; + + foreach ($data as $row) { + $total['jumlah_lelongan'] += $row['jumlah_lelongan']; + $total['jumlah_harga'] += $row['jumlah_harga']; + $total['jumlah_baki'] += $row['jumlah_baki']; + // ... jumlahkan field lain + } + + $data = [$total]; // Gantikan data kepada 1 baris gabungan + } + + return view('exports.bakilelong.summary', [ + 'cawangan_detail' => $this->cawangan_detail, + 'query' => $this->query, + 'teller_with_lelongan_data' => $data, + 'summary_lelongan' => $this->summary_lelongan, + ]); + } + +} diff --git a/app/Http/Controllers/Reports/BakiLelongController.php b/app/Http/Controllers/Reports/BakiLelongController.php new file mode 100644 index 0000000..f66396a --- /dev/null +++ b/app/Http/Controllers/Reports/BakiLelongController.php @@ -0,0 +1,132 @@ +hostname = config('api.url'); + $kod_cawangan = $request->kod_cawangan; + $action = $request->input('action', 'search'); + + $getReportDate = function ($date_string) use ($current) { + if ($date_string == null) { + return $current->toDateString(); + } + + return $date_string; + }; + + $request->hostname = config('api.url'); + + $lelongan = Http::get($request->hostname . '/api/reports/bakilelongbelumtuntut', [ + 'startDate' => $getReportDate($request->startDate), + 'endDate' => $getReportDate($request->endDate), + ])->json(); + + $startDate = $getReportDate($request->startDate); + $endDate = $getReportDate($request->endDate); + + if ($action === 'excel') { + $file_title = sprintf("LaporanBakiLelongBelumTuntut %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate); + return Excel::download(new BakiLelongBelumTuntutAllExportExcel($data), $file_title); + } + + return view('reports.bakilelongbelumtuntut.index', compact('lelongan', 'startDate', 'endDate')); + } + + public function show(Request $request) +{ + $current = Carbon::now(); + $action = $request->input('action', 'search'); + + $getReportDate = function ($date_string) use ($current) { + return $date_string ? $date_string : $current->toDateString(); + }; + + $hostname = config('api.url'); + + $response = Http::get("$hostname/api/reports/bakilelongbelumtuntut", [ + 'startDate' => $getReportDate($request->startDate), + 'endDate' => $getReportDate($request->endDate), + ]); + + $lelongan = $response->json() ?? []; // Ensure it's an array + + // 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("LaporanBakiLelongan %s (%s - %s).xlsx", $kod_cawangan, $startDate, $endDate); + return Excel::download(new BakiLelonganAllExportExcel($lelongan), $file_title); + } + return view('reports.bakilelongbelumtuntut.index', compact('lelongan', 'startDate', 'endDate')); +} + public function downloadBakiLelongBelumTuntutCawanganExcel(Request $request) + { + $api_url = $request->hostname; + $auth_user = Auth::user(); + $current = Carbon::now(); + $current = new Carbon(); + $tarikh_cetak = $current->toDateString(); + + $getReportDate = function ($date_string) use ($current) { + if ($date_string == null) { + return $current->toDateString(); + } + + return $date_string; + }; + + $request->hostname = config('api.url'); + $kod_cawangan = $request->kod_cawangan; + // dd($kod_cawangan); + + $data = Http::get($request->hostname . '/api/reports/bakilelongbelumtuntut/' . $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("LaporanBakiLelongBelumTuntutCawangan %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate); + return Excel::download(new BakiLelongBelumTuntutExport($data), $file_title); + } +} diff --git a/resources/views/exports/bakilelong/cawangan.blade.php b/resources/views/exports/bakilelong/cawangan.blade.php new file mode 100644 index 0000000..c236a5d --- /dev/null +++ b/resources/views/exports/bakilelong/cawangan.blade.php @@ -0,0 +1,95 @@ + + + + + + + + + + + + + +
{{ $cawangan_detail['nama'] }}
{{ $cawangan_detail['code'] }}
{{ $cawangan_detail['alamat'] }}
{{ $cawangan_detail['waktu_operasi'] }}
+ + + + + + + + +
+ LAPORAN BAKI LELONG BELUM TUNTUT +
+ TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }} +
+ + + +
+ TELLER : {{ $teller_with_lelongan_data['teller'] }} +
+ + + + + + + + + + + + + + + + + + + + + + + @foreach ($teller_with_lelongan_data['data']['lelongan'] as $lelongan_detail) + + + + + + + + + + + + + + + + + + + + + @endforeach + + + + + + + + + + + + + + + + + +
No rujukanNamaNo KPMarhunBeratNilai Marhun (RM)Pembiayaan (RM)%Baki Pembiayaan (RM)Keuntungan (RM)Caj Lelong (RM)Harga Jual (RM)Baki(RM)
{{ $lelongan_detail['no_rujukan'] }}{{ $lelongan_detail['nama'] }}'{{ $lelongan_detail['no_kp'] }}{{ $lelongan_detail['marhun'] }}{{ $lelongan_detail['berat'] }}{{ $lelongan_detail['nilai_marhun'] }}{{ $lelongan_detail['pinjaman'] }}{{ $lelongan_detail['peratusan_margin_pinjaman'] }}{{ $lelongan_detail['bakipjm'] }}{{ $lelongan_detail['keuntungan'] }}{{ $lelongan_detail['cajlelong'] }}{{ $lelongan_detail['hargajual'] }}{{ $lelongan_detail['baki'] }}
Jumlah{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_berat'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_nilai_marhun'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_pembiayaan'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_bakipjm'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_keuntungan'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_cajlelong'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargajual'] }}{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_baki'] }}
diff --git a/resources/views/exports/bakilelong/full.blade.php b/resources/views/exports/bakilelong/full.blade.php new file mode 100644 index 0000000..0f258b9 --- /dev/null +++ b/resources/views/exports/bakilelong/full.blade.php @@ -0,0 +1,82 @@ + + + + + + + + + {{-- ruang kosong sebelum header kolum --}} + + + + + + + + + + + + + + + + + + + @php + $total_berat = 0; + $total_nilaimarhun = 0; + $total_pinjaman = 0; + $total_hargajual = 0; + $total_keuntungan = 0; + $total_cajlelong = 0; + $total_baki = 0; + @endphp + + @foreach ($lelongan_data as $index => $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); + @endphp + + + + + + + + + + + + + + + + @endforeach + + + + + + + + + + + + + +
+ SENARAI BAKI LELONG BELUM TUNTUT +
+ Cawangan: {{ $cawangan_detail['nama'] ?? '-' }} | + Tarikh: {{ $query['tarikh'] ?? now()->format('d/m/Y') }} +
 
#No RujukanNamaNo KPBerat (g)Nilai Marhun (RM)Tarikh LelongHarga Jual (RM)Pembiayaan (RM)Keuntungan (RM)Caj Lelong (RM)Baki (RM)
{{ $index + 1 }}{{ $item['no_rujukan'] ?? '' }}{{ $item['nama'] ?? '' }}'{{ $item['no_kp'] ?? '' }}{{ $item['berat'] ?? 0 }}{{ $item['nilai_marhun'] ?? 0 }}{{ $item['t_lelong'] ?? 0 }}{{ $item['hargajual'] ?? 0 }}{{ $item['pinjaman'] ?? 0 }}{{ $item['keuntungan'] ?? 0 }}{{ $item['cajlelong'] ?? 0 }}{{ $item['baki'] ?? 0 }}
Jumlah{{ number_format($total_berat, 2) }}{{ number_format($total_nilaimarhun, 2) }}{{ number_format($total_hargajual, 2) }}{{ number_format($total_pinjaman, 2) }}{{ number_format($total_keuntungan, 2) }}{{ number_format($total_cajlelong, 2) }}{{ number_format($total_baki, 2) }}
diff --git a/resources/views/exports/bakilelong/summary.blade.php b/resources/views/exports/bakilelong/summary.blade.php new file mode 100644 index 0000000..d5aa0aa --- /dev/null +++ b/resources/views/exports/bakilelong/summary.blade.php @@ -0,0 +1,72 @@ + + + + + + + + + + + + + +
{{ $cawangan_detail['nama'] }}
{{ $cawangan_detail['code'] }}
{{ $cawangan_detail['alamat'] }}
{{ $cawangan_detail['waktu_operasi'] }}
+ + + + + + + + +
+ LAPORAN BAKI LELONG BELUM TUNTUT +
+ TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }} +
+ + + + + + + + + + + + + + + @foreach ($teller_with_lelongan_data as $data) + + + + + + + + + + + + + + + @endforeach + + + + + + + + + + + + + + +
TellerBilBeratN.MarhunPembiayaan(RM)Baki Pembiayaan(RM)Keuntungan(RM)Caj Lelong(RM)Harga Jual(RM)Baki(RM)
{{ $data['teller'] }}{{ $data['summary_lelongan_teller']['total_lelongan'] }}{{ $data['summary_lelongan_teller']['total_berat'] }}{{ $data['summary_lelongan_teller']['total_nilai_marhun'] }}{{ $data['summary_lelongan_teller']['total_pembiayaan'] }}{{ $data['summary_lelongan_teller']['total_bakipjm'] }}{{ $data['summary_lelongan_teller']['total_keuntungan'] }}{{ $data['summary_lelongan_teller']['total_cajlelong'] }}{{ $data['summary_lelongan_teller']['total_hargajual'] }}{{ $data['summary_lelongan_teller']['total_baki'] }}
{{ $summary_lelongan['total_lelongan'] }}{{ $summary_lelongan['total_berat'] }}{{ $summary_lelongan['total_nilai_marhun'] }}{{ $summary_lelongan['total_pembiayaan'] }}{{ $summary_lelongan['total_bakipjm'] }}{{ $summary_lelongan['total_keuntungan'] }}{{ $summary_lelongan['total_cajlelong'] }}{{ $summary_lelongan['total_hargajual'] }}{{ $summary_lelongan['total_baki'] }}
diff --git a/resources/views/reports/bakilelongbelumtuntut/index.blade.php b/resources/views/reports/bakilelongbelumtuntut/index.blade.php new file mode 100644 index 0000000..fbe04ed --- /dev/null +++ b/resources/views/reports/bakilelongbelumtuntut/index.blade.php @@ -0,0 +1,375 @@ +@extends('layouts.app') + +@section('content') + +
+
+ +
+ + + + +
+
+
+
Laporan Baki Lelong Belum Tuntut
+
+ +
+
+
+ Mula + + Hingga + + + + + + + +
+ +
+
+
+
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + @php + $totalbillelong = 0; + $totalberat = 0; + $totalnm = 0; + $totalpinjaman = 0; + $totalbakipjm = 0; + $totalkeuntungan = 0; + $totalcajlelong = 0; + $totalhargajual= 0; + $totalbaki= 0; + @endphp + + @forelse ($lelongan as $lelong) + @php + $totalbillelong += $lelong['total_lelongan']; + $totalberat += $lelong['sum_berat']; + $totalnm += $lelong['sum_nilai_marhun']; + $totalpinjaman += $lelong['sum_pinjaman']; + $totalbakipjm += $lelong['sum_bakipjm']; + $totalkeuntungan += $lelong['sum_bakiupah']; + $totalcajlelong+= $lelong['sum_cajlelong']; + $totalhargajual+= $lelong['sum_hargajual']; + $totalbaki+= $lelong['sum_baki']; + @endphp + + + + + + + + + + + + + + + + + @empty + + + + @endforelse + + + + + + + + + + + + + + + +
+ No + + Kod Cawangan + + Cawangan + + Bil + + Berat (g) + + Nilai Marhun(RM) + + Pembiayaan(RM) + + Baki Pembiayaan(RM) + + Keuntungan(RM) + + Caj Lelong(RM) + + Harga Jual(RM) + + Baki(RM) + + Action +
+
+
+

{{ $loop->iteration }}

+
+
+
+
+
+

{{ $lelong['kodcaw'] }}

+
+
+
+
+
+

{{ $lelong['details_caw'] }}

+
+
+
+
+
+

{{ $lelong['total_lelongan'] }} +

+
+
+
+
+
+

+ {{ number_format($lelong['sum_berat'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_nilai_marhun'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_pinjaman'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_bakipjm'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_bakiupah'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_cajlelong'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_hargajual'], 2) }}

+
+
+
+
+
+

+ {{ number_format($lelong['sum_baki'], 2) }}

+
+
+
+
+
+ + + +
+
+
+
+
+

Data not available

+
+
+
+
+
+

Jumlah Keseluruhan

+
+
+
+
+
+

{{ $totalbillelong}} +

+
+
+
+
+
+

+ {{ number_format($totalberat,2) }}

+
+
+
+
+
+

+ {{ number_format($totalnm,2) }}

+
+
+
+
+
+

+ {{ number_format($totalpinjaman,2) }}

+
+
+
+
+
+

+ {{ number_format($totalbakipjm,2) }}

+
+
+
+
+
+

+ {{ number_format($totalkeuntungan,2) }}

+
+
+
+
+
+

+ {{ number_format($totalcajlelong,2) }}

+
+
+
+
+
+

+ {{ number_format($totalhargajual,2) }}

+
+
+
+
+
+

+ {{ number_format($totalbaki,2) }}

+
+
+
+
+
+

+

+
+
+
+
+
+
+ @include('layouts.footer') + +
+@endsection + + + \ No newline at end of file diff --git a/resources/views/reports/bakilelongbelumtuntut/show.blade.php b/resources/views/reports/bakilelongbelumtuntut/show.blade.php new file mode 100644 index 0000000..b804704 --- /dev/null +++ b/resources/views/reports/bakilelongbelumtuntut/show.blade.php @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Laporan Stok Audit Tarikh Cetak: + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate) + @endphp +
TARIKH{{ $tebus_date }} +
+ +
+ + + + + + + + + + + + + @foreach($stokAudit as $item) + + + + + + + + + + + + @endforeach +
CawanganBilangan PembiayaanBeratNilai MarhunBaki PembiayaanPembiayaanKeuntungan Belum BayarJumlah Untung 1% PercentJumlah Lain-lain Caj
{{$item['cawangan']}}{{ $item['bilangan_pembiayaan'] }}{{ number_format($item['berat'],2) }}{{ number_format($item['nilai_marhun'],2) }}{{ number_format($item['baki_pembiayaan'],2) }}{{ number_format($item['pembiayaan'],2) }}{{ number_format($item['upah_belum_bayar'],2) }}{{ number_format($item['total_utg_onepercent'],2) }}{{ number_format($item['total_ujrah'],2) }}
+ +
+
+ + + + + + + + + + + + + + + +
.................................................................. ..................................................................
DI SEMAK DI SAHKAN