diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index f99c567..b27ebe8 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -4176,157 +4176,125 @@ class KhazanahController extends Controller
return view('print.laporan_imbangduga-akru',compact('tarikh_imbangan', 'tarikh_imbangan2','hartasemasa','tanggungansemasa','totalhartasemasa','totaltanggungansemasa','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail'));
}
- public function laporanStokAuditKhas(){
+
+
+ public function laporanGadaianUjrah (){
+
$auth_user = Auth::user();
$api_url = config('api.url');
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ return view('khazanah.laporanujrah.gadaianujrah', compact('auth_user','api_url','cawangan_info'));
- return view('khazanah.laporan.stokauditkhas',compact('cawangan_info','api_url'));
}
- public function cetakLaporanStokAuditKhas(Request $request){
+ public function cetakLaporanGadaiUjrah(Request $request){
+
$api_url = config('api.url');
$auth_user = Auth::user();
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
- $daritempoh = $request->daritempoh;
- $hinggatempoh = $request->hinggatempoh;
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- // if($request->datetimepicker1 == null){
- // $tebus_date = $current->toDateString();
- // }else{
- // $split_date = explode('-',$request->datetimepicker1);
- // $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
- // }
- $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
- $cawangan_detail=$cawangan[0];
-
- if($request->radaktif === 'aktif')
- {
- $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
- // dd($stokaudit);
- return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
+ if($request->datemula == null){
+ $mula_date = '2017-01-01';
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datehingga == null){
+ $hingga_date = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
}
- // else{
- // $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/takaktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
- // return view('print.laporan_stokauditkhasbelumaktif', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url'));
- // }
- // dd($gadai);
+ $gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/gadailaporanRangeDate/'. $auth_user['cawangan'] ,['mula' => $mula_date,'akhir' => $hingga_date])->json();
+ $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_gadaian_ujrah', compact('gadai','cawangan_detail','tarikh_cetak','mula_date','api_url','hingga_date'));
}
- public function cetakExportLaporanStokAuditKhas(Request $request){
- // dd($request->all());
+
+ public function laporanPenebusanUjrah(){
+
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ return view('khazanah.laporanujrah.tebusujrah',compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanPenebusanUjrah(Request $request){
+ // dd($request);
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datemula == null){
+ $mula_date = '2017-01-01';
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datehingga == null){
+ $hingga_date = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ $tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/tebusujrah/laporan/'. $auth_user['cawangan'] ,['mula' => $mula_date,'akhir' => $hingga_date])->json();
+ $tebuspengasingan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/tebus/laporanjenistawarruqujrah/'. $auth_user['cawangan'] ,['mula' => $mula_date,'akhir' => $hingga_date])->json();
+ $upahlama = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/advansurdetailsrange/'. $auth_user['cawangan'],['mula' => $mula_date,'akhir' => $hingga_date])->json();
+ $ansuran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/ansuransummaryrange/'. $auth_user['cawangan'],['mula' => $mula_date,'akhir' => $hingga_date])->json();
+
+ $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+ return view('print.laporan_tebus_ujrah', compact('tebus','cawangan_detail','tarikh_cetak','mula_date','hingga_date','tebuspengasingan','api_url','upahlama','ansuran'));
+ }
+
+ public function laporanAnsuranUjrah(){
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ return view('khazanah.laporanujrah.ansuranujrah',compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanAnsuranUjrah(Request $request){
+ // dd($request);
$api_url = config('api.url');
$auth_user = Auth::user();
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
- $daritempoh = $request->daritempoh;
- $hinggatempoh = $request->hinggatempoh;
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
- $cawangan_detail=$cawangan[0];
+ if($request->datemula == null){
+ $mula_date = '2017-01-01';
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
- $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
+ if($request->datehingga == null){
+ $hingga_date = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
- if($request->type == 'excel')
- {
- return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
- }
- elseif($request->type == 'whatsapp')
- {
-
- $blastwhatsapp = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/blastwasap/'.$auth_user['cawangan'],
- ['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh, 'namapengguna' => $auth_user['name'],])->json();
- // dd($blastwhatsapp);
- if($blastwhatsapp == 'success'){
- return redirect()->route('laporan.stokauditkhas')
- ->with('success','Blast Whatsapp Dalam Proses.');
- }
- elseif($blastwhatsapp == 'failed'){
- return redirect()->route('laporan.stokauditkhas')
- ->with('failed','Blast Whatsapp Tidak Berjaya, Sila Semak Semula Rekod Blasted.');
- }
-
- // return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
- }
- else
- {
- $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
- return view('pdf.pdf_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
-
- // $pdf = PDF::loadView('pdf.pdf_stokauditkhas',compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'))
- // ->setPaper('a4', 'potrait');
-
- // return $pdf->download('Stok Audit Khas.pdf');
-
- }
-
-
- // dd($gadai);
- }
-
- public function rekodblast(Request $request){
- $auth_user = Auth::user();
- $api_url = config('api.url');
-
-
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- $rekodblast = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/rekodblast/'. $auth_user['cawangan'])->json();
- return view('khazanah.laporan.rekodblast',compact('cawangan_info','api_url','rekodblast'));
- }
-
- public function rekodblastexport(Request $request){
- $auth_user = Auth::user();
- $api_url = config('api.url');
- $current = Carbon::now();
- $current = new Carbon();
- $tarikh_cetak = $current->toDateString();
-
+ $tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/ansuranujrah/laporan/'. $auth_user['cawangan'],['mula' => $mula_date,'akhir' => $hingga_date])->json();
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
-
- if($request->type == 'pdf')
- {
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- $rekodblast = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/rekodblast/'. $auth_user['cawangan'])->json();
- return view('pdf.pdf_rekodblast', compact('cawangan_info','api_url','rekodblast','cawangan_detail','tarikh_cetak'));
- }
- }
-
- public function rekodblastsms(Request $request){
- $auth_user = Auth::user();
- $api_url = config('api.url');
-
-
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- $rekodblastsms = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/rekodblastsms/'. $auth_user['cawangan'])->json();
- return view('khazanah.laporan.rekodblastsms',compact('cawangan_info','api_url','rekodblastsms'));
- }
-
- public function rekodblastsmsexport(Request $request){
- $auth_user = Auth::user();
- $api_url = config('api.url');
- $current = Carbon::now();
- $current = new Carbon();
- $tarikh_cetak = $current->toDateString();
-
- $cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
- $cawangan_detail=$cawangan[0];
-
- if($request->type == 'pdf')
- {
- $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- $rekodblastsms = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/rekodblastsms/'. $auth_user['cawangan'])->json();
- return view('pdf.pdf_rekodblastsms', compact('cawangan_info','api_url','rekodblastsms','cawangan_detail','tarikh_cetak'));
- }
- }
+ return view('print.laporan_ansuran_ujrah', compact('tebus','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
+ }
}
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php
index 608a0d5..56fee70 100644
--- a/resources/views/khazanah/laporan/index.blade.php
+++ b/resources/views/khazanah/laporan/index.blade.php
@@ -17,7 +17,8 @@
Stok Audit
diff --git a/resources/views/khazanah/laporanujrah/ansuranujrah.blade.php b/resources/views/khazanah/laporanujrah/ansuranujrah.blade.php
new file mode 100644
index 0000000..96f836c
--- /dev/null
+++ b/resources/views/khazanah/laporanujrah/ansuranujrah.blade.php
@@ -0,0 +1,254 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Nama |
+ No K/P |
+ Tempoh |
+ Baki Pembiayaan (RM) |
+ Bayaran (RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan (RM) |
+
+
+
+ TOTAL |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/khazanah/laporanujrah/gadaianujrah.blade.php b/resources/views/khazanah/laporanujrah/gadaianujrah.blade.php
new file mode 100644
index 0000000..8952ab7
--- /dev/null
+++ b/resources/views/khazanah/laporanujrah/gadaianujrah.blade.php
@@ -0,0 +1,251 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Nama |
+ No K/P |
+ Tarikh Gadai |
+ No Rujukan |
+ Pembiayaan (RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan Sebenar (RM) |
+ Nilai Marhun (RM) |
+ Berat (g) |
+
+
+
+ TOTAL |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/resources/views/khazanah/laporanujrah/tebusujrah.blade.php b/resources/views/khazanah/laporanujrah/tebusujrah.blade.php
new file mode 100644
index 0000000..b91c9cf
--- /dev/null
+++ b/resources/views/khazanah/laporanujrah/tebusujrah.blade.php
@@ -0,0 +1,248 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Nama |
+ No K/P |
+ Tarikh Tebus |
+ No Rujukan |
+ Pembiayaan (RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan (RM) |
+ Bayaran (RM) |
+
+
+
+ TOTAL |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/resources/views/print/laporan_ansuran_ujrah.blade.php b/resources/views/print/laporan_ansuran_ujrah.blade.php
new file mode 100644
index 0000000..43af1ec
--- /dev/null
+++ b/resources/views/print/laporan_ansuran_ujrah.blade.php
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN ANSURAN |
+
+
+ | Tarikh Mula:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+
+ |
+
+ Tarikh Hingga:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ Tarikh Cetak:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+
+
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Nama |
+ No K/P |
+ Tarikh Bayaran |
+ Tempoh |
+ Baki Pembiayaan (RM) |
+ Bayaran Pemb. (RM) |
+ Ujrah(RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan (RM) |
+ Bayaran (RM) |
+
+ @php
+ $counter = 1;
+ $totalduitmasuk = 0;
+ $totalkeuntungan = 0;
+ $totalpendahuluan = 0;
+ $totalujrah = 0;
+ $totalonepercent = 0;
+ @endphp
+ @foreach($tebus as $index=>$item)
+ @php
+ $totalduitmasuk += $item['duit_masuk'];
+ $totalkeuntungan += $item['bayaran_keuntungan'];
+ $totalpendahuluan += $item['bayaran_pembiayaan'];
+ $totalujrah += bcdiv(round($item['ansuranujrah'],2),1,1);
+ $totalonepercent += bcdiv(round($item['ansuranonepercent'],2),1,1);
+ @endphp
+
+ @if($index > 0)
+ @if($item['teller'] != $tebus[$index - 1]['teller'])
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totaldmteller = 0;
+ $totalupahteller = 0;
+ $totalpendhteller = 0;
+ $totalujrahteller = 0;
+ $totalonepercentteller = 0;
+ @endphp
+ @endif
+ @else
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totaldmteller = 0;
+ $totalupahteller = 0;
+ $totalpendhteller = 0;
+ $totalujrahteller = 0;
+ $totalonepercentteller = 0;
+ @endphp
+ @endif
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+ {{ $item['nama'] }} |
+ {{ $item['nokp'] }} |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d H:i:s', $item['tarikh_bayaran']);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+ {{ $item['tempoh'] }} |
+ {{ number_format($item['bakipjm'],2) }} |
+ {{ number_format($item['bayaran_pembiayaan'],2) }} |
+ {{ number_format(bcdiv(round($item['ansuranujrah'],2),1,1),2) }} |
+ {{ number_format(bcdiv(round($item['ansuranonepercent'],2),1,1),2) }} |
+ {{ number_format($item['bayaran_keuntungan'],2) }} |
+ {{ number_format($item['duit_masuk'],2) }} |
+
+ @php $counter++; @endphp
+ @php
+ $totaldmteller += $item['duit_masuk'];
+ $totalupahteller += $item['bayaran_keuntungan'];
+ $totalpendhteller += $item['bayaran_pembiayaan'];
+ $totalujrahteller += bcdiv(round($item['ansuranujrah'],2),1,1);
+ $totalonepercentteller += bcdiv(round($item['ansuranonepercent'],2),1,1);
+ @endphp
+
+ @if($index+1 < sizeof($tebus))
+ @if($item['teller'] != $tebus[$index + 1]['teller'])
+
+ | {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
+ {{ number_format($totalpendhteller,2) }} |
+ {{ number_format($totalujrahteller,2) }} |
+ {{ number_format($totalonepercentteller,2) }} |
+ {{ number_format($totalupahteller,2) }} |
+ {{ number_format($totaldmteller,2) }} |
+
+ @php
+ $counter = 1;
+ $totaldmteller = 0;
+ $totalupahteller = 0;
+ $totalpendhteller = 0;
+ @endphp
+ @endif
+ @else
+
+ | {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
+ {{ number_format($totalpendhteller,2) }} |
+ {{ number_format($totalujrahteller,2) }} |
+ {{ number_format($totalonepercentteller,2) }} |
+ {{ number_format($totalupahteller,2) }} |
+ {{ number_format($totaldmteller,2) }} |
+
+ @endif
+ @endforeach
+
+
+
+
+
+ |
+ Bayaran Pemb. (RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan (RM) |
+ Bayaran (RM) |
+
+
+ | JUMLAH KESELURUHAN |
+ {{ number_format($totalpendahuluan,2) }} |
+ {{ number_format($totalujrah,2) }} |
+ {{ number_format($totalonepercent,2) }} |
+ {{ number_format($totalkeuntungan,2) }} |
+ {{ number_format($totalduitmasuk,2) }} |
+
+
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/print/laporan_gadaian_ujrah.blade.php b/resources/views/print/laporan_gadaian_ujrah.blade.php
new file mode 100644
index 0000000..5156ff3
--- /dev/null
+++ b/resources/views/print/laporan_gadaian_ujrah.blade.php
@@ -0,0 +1,404 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN GADAIAN |
+ |
+ |
+
+ |
+ |
+
+
+ | Tarikh Mula:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+
+ |
+
+ Tarikh Hingga:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ Tarikh Cetak:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ Nama |
+ Alamat |
+ No K/P |
+ Tarikh Gadai |
+ Masa |
+ Berat |
+ N Marhun |
+ Pembiayaan |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan |
+ Peratus (%) |
+
+ @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
+ $totalpinjaman += $item['pinjaman'];
+ $totalberat += $item['berat'];
+ $totalnm += $item['nilaimarhun'];
+ $totalupah += $item['upah12'];
+ $full_total_ujrah += $item['ujrah']*12;
+ $full_total_onepercent += $item['onepercent']*12;
+
+ @endphp
+ @if($index > 0)
+ @if($item['teller'] != $gadai[$index - 1]['teller'])
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totalpinjamanteller = 0;
+ $totalnmteller = 0;
+ $totalberatteller = 0;
+ $totalujrah = 0;
+ $totalonepercent = 0;
+
+ @endphp
+ @endif
+ @else
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totalpinjamanteller = 0;
+ $totalnmteller = 0;
+ $totalberatteller = 0;
+ $totalupah12 = 0;
+ $totalujrah = 0;
+ $totalonepercent= 0;
+ @endphp
+
+ @endif
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+
+ {{ $item['nama'] }}
+ |
+ {{ $item['alamat1'] }} |
+ {{ $item['nokp'] }} |
+ @php
+ $dt = new DateTime($item['t_gadai']);
+ $time = $dt->format('d-m-Y');
+ echo date($time);
+ @endphp |
+ {{ $item['masa'] }} |
+ {{ number_format($item['berat'],2) }} |
+ {{ number_format($item['nilaimarhun'],2) }} |
+ {{ number_format($item['pinjaman'],2) }} |
+ {{ number_format($item['ujrah']*12,2) }} |
+ {{ number_format($item['onepercent']*12,2) }} |
+ {{ number_format($item['upah12'],2) }} |
+ {{ $item['percentpinj'] }} |
+
+ @php $counter++; @endphp
+ @php
+ $totalpinjamanteller += $item['pinjaman'];
+ $totalnmteller += $item['nilaimarhun'];
+ $totalberatteller += $item['berat'];
+ $totalupah12 += $item['upah12'];
+ $totalujrah += $item['ujrah']*12;
+ $totalonepercent += $item['onepercent']*12;
+
+
+ @endphp
+ @if($index+1 < sizeof($gadai))
+ @if($item['teller'] != $gadai[$index + 1]['teller'])
+ @php if($item['teller'] != '')$bil += ($counter-1); @endphp
+
+ | {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
+ {{ number_format($totalberatteller,2) }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
+ {{ number_format($totalujrah,2) }} |
+ {{ number_format($totalonepercent,2) }} |
+ {{ number_format($totalupah12,2) }} |
+
+
+
+ @php
+ $counter = 1;
+ $totalupah12 = 0;
+ $totalpinjamanteller = 0;
+ $totalnmteller = 0;
+ $totalujrah = 0;
+ $totalonepercent = 0;
+
+ @endphp
+ @endif
+ @else
+ @php $bil += ($counter-1); @endphp
+
+ | {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
+ {{ number_format($totalberatteller,2) }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
+ {{ number_format($totalujrah,2) }} |
+ {{ number_format($totalonepercent,2) }} |
+ {{ number_format($totalupah12,2) }} |
+
+
+ @endif
+ @endforeach
+
+
+
+
+ | JUMLAH BILANGAN = {{ $bil }} |
+ Berat (g/m) |
+ Nilai Marhun (RM) |
+ Pembiayaan (RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Upah/Keuntungan (RM) |
+
+
+ | JUMLAH KESELURUHAN |
+ {{ number_format($totalberat,2) }} |
+ {{ number_format($totalnm,2) }} |
+ {{ number_format($totalpinjaman,2) }} |
+ {{ number_format($full_total_ujrah,2) }} |
+ {{ number_format($full_total_onepercent,2) }} |
+ {{ number_format($totalupah,2) }} |
+
+
+
+ {{--
JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/print/laporan_tebus_ujrah.blade.php b/resources/views/print/laporan_tebus_ujrah.blade.php
new file mode 100644
index 0000000..a16a810
--- /dev/null
+++ b/resources/views/print/laporan_tebus_ujrah.blade.php
@@ -0,0 +1,503 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN PENEBUSAN |
+
+
+
+ | Tarikh Mula:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+
+ |
+
+ Tarikh Hingga:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ Tarikh Cetak:
+
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ Nama |
+ No KP |
+ Tarikh Tebus |
+ Masa |
+ JBG |
+ J Tebus |
+ Nilai Marhun(RM) |
+ P. Asal(RM) |
+ B.Pembiayaan(RM) |
+ Ujrah(RM) |
+ Keuntungan 1%(RM) |
+ Keuntungan(RM) |
+ Bayaran(RM) |
+ Jumlah(RM) |
+
+ @php
+ $counter = 1;
+ $totalnm = 0;
+ $totalbayaran = 0;
+ $totalpinjamanasal = 0;
+ $totalpinjaman = 0;
+ $totalupah = 0;
+ $totalujrah = 0;
+ $totalonepercent = 0;
+ @endphp
+
+ @foreach($tebus as $index=>$item)
+ @php
+ $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['gadaibakipjm']+$item['bakiupah']) : $item['bakipjm'];
+ $totalpinjaman += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman'];
+ $totalupah += $item['bakiupah'];
+ $totalpinjamanasal += $item['pinjaman'];
+ $totalnm += $item['nilaimarhun'];
+ $totalujrah += $item['ujrah'];
+ $totalonepercent += $item['onepercent'];
+
+ @endphp
+
+ @if($index > 0)
+ @if($item['teller'] != $tebus[$index - 1]['teller'])
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totalnmteller = 0;
+ $totalpinjamanasalteller = 0;
+ $totalpinjamanteller = 0;
+ $totalupahteller = 0;
+ $totalbayaranteller = 0;
+ $totalujrahteller = 0;
+ $totalonepercentteller = 0;
+ @endphp
+ @endif
+ @else
+
+ | Teller : {{ $item['teller'] }} |
+
+ @php
+ $totalnmteller = 0;
+ $totalpinjamanasalteller = 0;
+ $totalpinjamanteller = 0;
+ $totalupahteller = 0;
+ $totalbayaranteller = 0;
+ $totaljumlahteller = 0;
+ $totalujrahteller = 0;
+ $totalonepercentteller = 0;
+ @endphp
+ @endif
+
+
+ | {{ $counter }} |
+ {{ $item['norujukan'] }} |
+ {{ $item['nama'] }} |
+ {{ $item['nokp'] }} |
+
+ @php
+ $dt = new DateTime($item['tarikh_bayaran']);
+ $time = $dt->format('d-m-Y');
+ echo date($time);
+ @endphp
+ |
+
+ @php
+ $dt = new DateTime($item['tarikh_bayaran']);
+ $time = $dt->format('h:i:s');
+ echo date($time);
+ @endphp
+ |
+ {{ $item['jbg'] }} |
+ {{$item['jenistebus']}} |
+
+ {{ number_format($item['nilaimarhun'],2) }}
+ |
+ {{ number_format($item['pinjaman'],2) }} |
+
+ @php
+ if($item['hargajualan'] !== $item['bakihargajualan'])
+ echo number_format($item['gadaibakipjm'],2);
+ else
+ echo number_format($item['pinjaman'],2);
+ @endphp
+ |
+ {{ number_format($item['ujrah'],2) }} |
+ {{ number_format($item['onepercent'],2) }} |
+ {{ number_format($item['bakiupah'],2) }} |
+ {{ number_format($item['bakipjm'],2) }} |
+ @php if($item['jenistebus'] == 'S'){ $total=($item['gadaibakipjm']+$item['bakiupah']);echo number_format($total,2);} else echo number_format($item['bakipjm'],2); @endphp |
+
+
+
+ @php $counter++; @endphp
+ @php
+ $totalnmteller += $item['nilaimarhun'];
+ $totalpinjamanasalteller += $item['pinjaman'];
+ $totalpinjamanteller += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman'];
+ $totalupahteller += $item['bakiupah'];$totalbayaranteller += $item['bakipjm'];
+ $totalujrahteller += $item['ujrah'];
+ $totalonepercentteller += $item['onepercent'];
+ @endphp
+
+ @php
+ $totaljumlahteller += ($item['jenistebus'] === 'S') ? ($item['gadaibakipjm']+$item['bakiupah']) : $item['bakipjm'];
+ @endphp
+
+ @if($index+1 < sizeof($tebus))
+ @if($item['teller'] != $tebus[$index + 1]['teller'])
+
+ | {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanasalteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
+ {{ number_format($totalujrahteller,2) }} |
+ {{ number_format($totalonepercentteller,2) }} |
+ {{ number_format($totalupahteller,2) }} |
+ {{ number_format($totalbayaranteller,2) }} |
+ {{ number_format($totaljumlahteller,2) }} |
+
+
+ @php
+ $counter = 1;
+ $totalpinjamanasalteller = 0;
+ $totalpinjamanteller = 0;
+ $totalupahteller = 0;
+ $totalbayaranteller = 0;
+ $totaljumlahteller = 0;
+ $totalujrahteller = 0;
+ $totalonepercentteller = 0;
+ @endphp
+ @endif
+ @else
+
+ | {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanasalteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
+ {{ number_format($totalujrahteller,2) }} |
+ {{ number_format($totalonepercentteller,2) }} |
+ {{ number_format($totalupahteller,2) }} |
+ {{ number_format($totalbayaranteller,2) }} |
+ {{ number_format($totaljumlahteller,2) }} |
+
+ @endif
+ @endforeach
+
+
+
+
+
+ | JUMLAH BILANGAN = {{ $tebuspengasingan['biltawarruq'] + $tebuspengasingan['bilarrahn'] }} |
+ Nilai Marhun (RM) |
+ Pembiayaan Asal(RM) |
+ B. Pembiayaan (RM) |
+ Keuntungan Rebet(RM) |
+ Ujrah (RM) |
+ Keuntungan 1% (RM) |
+ Upah/Keuntungan (RM) |
+ Keuntungan Sebenar(RM) |
+ Jumlah (RM) |
+
+
+ | JUMLAH KESELURUHAN |
+ {{ number_format($totalnm,2) }} |
+ {{ number_format($totalpinjamanasal,2) }} |
+ {{ number_format($totalpinjaman,2) }} |
+ @php $totalkeuntunganrebet = ($totalpinjaman + $totalupah) - $totalbayaran;
+ echo number_format($totalkeuntunganrebet,2);
+ @endphp |
+ {{ number_format($totalujrah,2) }} |
+ {{ number_format($totalonepercent,2) }} |
+ {{ number_format($totalupah,2) }} |
+ {{ number_format($totalupah - $totalkeuntunganrebet,2) }} |
+ {{ number_format($totalbayaran,2) }} |
+
+
+
+
+
Laporan Transaksi Penebusan
+
+
+
+
+ | Bil |
+ Jenis |
+ Penebusan(RM) |
+ Ujrah(RM) |
+ Keuntungan 1% (RM) |
+ Keuntungan(RM) |
+ Rebate(RM) |
+
+
+ | {{ $tebuspengasingan['biltawarruq'] }} |
+ Tawarruq |
+ {{ number_format($tebuspengasingan['totaltawarruq'],2) }} |
+ {{ number_format($tebuspengasingan['ujrahtawarruq'],2) }} |
+ {{ number_format($tebuspengasingan['onepercenttawarruq'],2) }} |
+ {{ number_format($tebuspengasingan['keuntungantawarruq'],2) }} |
+ {{ number_format($tebuspengasingan['totalrebate'],2) }} |
+
+
+ | {{ $tebuspengasingan['bilarrahn'] }} |
+ Ar-Rahn |
+ {{ number_format($tebuspengasingan['totalarrahn'],2) }} |
+ {{ number_format($tebuspengasingan['ujraharrahn'],2) }} |
+ {{ number_format($tebuspengasingan['onepercentarrahn'],2) }} |
+ {{ number_format($tebuspengasingan['keuntunganarrahn'],2) }} |
+ Not Applicable |
+
+
+ | {{ $upahlama['bilkaunter'] }} |
+ Bayaran Upah |
+ Not Applicable |
+ Not Applicable |
+ Not Applicable |
+ {{ number_format($upahlama['totalkaunter'],2) }} |
+ Not Applicable |
+
+
+ | {{ $upahlama['bilonline'] }} |
+ Bayaran Upah Online |
+ Not Applicable |
+ Not Applicable |
+ Not Applicable |
+ {{ number_format($upahlama['totalonline'],2) }} |
+ Not Applicable |
+
+
+ | {{ $ansuran['bilangankaunter'] }} |
+ Ansuran Pembiayaan |
+ {{ number_format($ansuran['totalpendahuluankaunter'],2) }} |
+ {{ number_format($ansuran['totalujrahkaunter'],2) }} |
+ {{ number_format($ansuran['totalonepercentkaunter'],2) }} |
+ {{ number_format($ansuran['totalkeuntungankaunter'],2) }} |
+ Not Applicable |
+
+
+ | {{ $ansuran['bilanganonline'] }} |
+ Ansuran Pembiayaan Online |
+ {{ number_format($ansuran['totalpendahuluanonline'],2) }} |
+ {{ number_format($ansuran['totalujrahonline'],2) }} |
+ {{ number_format($ansuran['totalonepercentonline'],2) }} |
+ {{ number_format($ansuran['totalkeuntunganonline'],2) }} |
+ Not Applicable |
+
+
+
+
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index bbc8224..27eb0fe 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -386,6 +386,19 @@ Route::get('admin/poskod',['as'=>'admin.poskod','uses'=>'HomeController@poskod']
Route::get('pembeliannotifykomuditi',['as'=>'beli.notifyKomoditi','uses'=>'OperasiController@notifyKomoditi'])->middleware('auth','operasi');
+//LAPORAN UJRAH ROLE KHAZANAH
+
+Route::get('/laporan/gadaianujrah',['as'=>'laporan.gadaianujrah','uses'=>'KhazanahController@laporanGadaianUjrah'])->middleware('auth','khazanah');
+Route::post('laporan/gadaianujrah/cetak',['as'=>'gadaianujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanGadaiUjrah'])->middleware('auth','khazanah');
+
+Route::get('/laporan/tebusujrah',['as'=>'laporan.tebusujrah','uses'=>'KhazanahController@laporanPenebusanUjrah'])->middleware('auth','khazanah');
+Route::post('laporan/tebusujrah/cetak',['as'=>'tebusujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanPenebusanUjrah'])->middleware('auth','khazanah');
+
+Route::get('/laporan/ansuranujrah',['as'=>'laporan.ansuranujrah','uses'=>'KhazanahController@laporanAnsuranUjrah'])->middleware('auth','khazanah');
+Route::post('laporan/ansuranujrah/cetak',['as'=>'ansuranujrah.laporancetak','uses'=>'KhazanahController@cetakLaporanAnsuranUjrah'])->middleware('auth','khazanah');
+
+
+
Route::get('supports/driver/mykad-reader',['as'=>'mykadreader.driver', function(){
return view('supports.driver.mykad-reader.download');
}])->middleware('auth','teller');