diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index f628884..383ad87 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -4287,7 +4287,41 @@ 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 laporanStokAuditCombine(){
+ $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();
+ $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/gadai/cawangan/'. $auth_user['cawangan'])->json();
+
+ return view('khazanah.laporan.stokauditcombine',compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanStokAuditCombine(Request $request){
+
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datetimepicker1 == null){
+ $stokaudit_date = $current->toDateString();
+ }else{
+ $split_date = explode('-',$request->datetimepicker1);
+ $stokaudit_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];
+
+ $stokaudit_aktif = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokaudit/aktif/'. $auth_user['cawangan'],['tarikh' => $stokaudit_date])->json();
+ $stokaudit_takaktif = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokaudit/takaktif/'. $auth_user['cawangan'],['tarikh' => $stokaudit_date])->json();
+
+ // return view('print.laporan_stokauditbelumaktif', compact('stokaudit','cawangan_detail','tarikh_cetak','stokaudit_date','api_url'));
+
+ return view('print.laporan_stokauditcombine', compact('stokaudit_aktif','stokaudit_takaktif','cawangan_detail','tarikh_cetak','stokaudit_date','api_url'));
+ }
public function laporanGadaianUjrah (){
@@ -4601,9 +4635,4 @@ class KhazanahController extends Controller
return view('callcenter.khazanah.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid','api_url'));
}
-
-
-
-
-
}
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php
index 8038c4d..06e7c08 100644
--- a/resources/views/khazanah/laporan/index.blade.php
+++ b/resources/views/khazanah/laporan/index.blade.php
@@ -108,8 +108,11 @@
-
+ {{--
--}}
+
Ringkasan Harian
diff --git a/resources/views/khazanah/laporan/stokauditcombine.blade.php b/resources/views/khazanah/laporan/stokauditcombine.blade.php
new file mode 100644
index 0000000..8ae09bb
--- /dev/null
+++ b/resources/views/khazanah/laporan/stokauditcombine.blade.php
@@ -0,0 +1,120 @@
+@extends('layouts.app')
+
+
+@section('content')
+
+
+@endsection
+
diff --git a/resources/views/print/laporan_stokauditcombine.blade.php b/resources/views/print/laporan_stokauditcombine.blade.php
new file mode 100644
index 0000000..4afced2
--- /dev/null
+++ b/resources/views/print/laporan_stokauditcombine.blade.php
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+ | Laporan Stok Audit Aktif |
+ |
+ |
+ Tarikh Cetak:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+ |
+ |
+
+
+ | TARIKH |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $stokaudit_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ JBG |
+ No. KP |
+ Berat |
+ Nilai Marhun (RM) |
+ Pembiayaan Asal (RM) |
+ Baki Pembiayaan (RM) |
+ Kadar Upah |
+ Tempoh Belum Bayar |
+ Keuntungan Belum Bayar (RM) |
+ Lanjutan |
+
+ @php $counter = 1;$totalpinjaman = 0; @endphp
+ @foreach($stokaudit_aktif['rekod'] as $index=>$item)
+ @php if($item['hargajualan'] == null) $totalpinjaman += $item['pinjaman']; else $totalpinjaman +=
+ $item['bakipjm'];
+ @endphp
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+ {{ $item['tempoh'] }} |
+ {{$item['nokp']}} |
+ {{ number_format($item['berat'],2) }} |
+ {{ number_format($item['nilaimarhun'],2) }} |
+ {{ number_format($item['pinjaman'],2) }} |
+ {{ number_format($item['bakipjm'],2) }} |
+ {{ number_format($item['kadarupah'],2) }} |
+ {{ number_format($item['tempoh'] - $item['tempohbayar'],2) }} |
+ {{ number_format($item['tunggakan'],2) }} |
+ {{-- {{ number_format($item['pinjaman'],2) }} | --}}
+ {{$item['lelong_tawarruq']}} |
+
+ @php $counter++; @endphp
+ @endforeach
+
+ Jumlah |
+ {{ number_format($stokaudit_aktif['totalberat'],2) }} |
+ {{ number_format($stokaudit_aktif['totalnilaimarhun'],2) }} |
+ {{ number_format($stokaudit_aktif['totalpinjaman'],2) }} |
+ {{ number_format($stokaudit_aktif['totalbakipjm'],2) }} |
+ |
+ |
+ {{ number_format($stokaudit_aktif['totaltunggakan'],2) }} |
+ |
+
+
+
+
+
+ {{--
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
--}}
+
+
+
+
+
+
+
+ | Laporan Stok Audit Tidak Aktif |
+ |
+ |
+ Tarikh Cetak:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+ |
+ |
+
+
+ | TARIKH |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $stokaudit_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ JBG |
+ No. KP |
+ Berat |
+ Nilai Marhun (RM) |
+ Pembiayaan |
+ Lanjutan |
+
+ @php $counter = 1;$totalpinjaman = 0; @endphp
+ @foreach($stokaudit_takaktif['rekod'] as $index=>$item)
+ @php if($item['hargajualan'] == null) $totalpinjaman += $item['pinjaman']; else $totalpinjaman +=
+ $item['bakipjm'];
+ @endphp
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+ {{ $item['jbg'] }} |
+ {{$item['nokp']}} |
+ {{ number_format($item['berat'],2) }} |
+ {{ number_format($item['nilaimarhun'],2) }} |
+ @php if($item['hargajualan'] == null) echo number_format($item['pinjaman'],2); else echo
+ number_format($item['bakipjm'],2); @endphp |
+ {{$item['lelong_tawarruq']}} |
+
+ @php $counter++; @endphp
+ @endforeach
+
+ Jumlah |
+ {{ number_format($stokaudit_takaktif['totalberat'],2) }} |
+ {{ number_format($stokaudit_takaktif['totalnilaimarhun'],2) }} |
+ {{ number_format($totalpinjaman,2) }} |
+ |
+
+
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index fd22465..dd2e39b 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -293,6 +293,9 @@ Route::post('laporan/rekodblastexport',['as'=>'stokaudit.rekodblastexport','uses
Route::get('laporan/rekodblastsms',['as'=>'stokaudit.rekodblastsms','uses'=>'KhazanahController@rekodblastsms'])->middleware('auth','khazanah');
Route::post('laporan/rekodblastsmsexport',['as'=>'stokaudit.rekodblastsmsexport','uses'=>'KhazanahController@rekodblastsmsexport'])->middleware('auth','khazanah');
+Route::get('/laporan/stokauditcombine',['as'=>'laporan.stokauditcombine','uses'=>'KhazanahController@laporanStokAuditCombine'])->middleware('auth','khazanah');
+Route::get('laporan/stokauditcombine/cetak',['as'=>'stokauditcombine.laporancetak','uses'=>'KhazanahController@cetakLaporanStokAuditCombine'])->middleware('auth','khazanah');
+
//Resit Ansurans
Route::get('/resit/{id}',['as'=>'resit.ansuran','uses'=>'GadaianController@resit'])->middleware('auth','teller');
Route::get('/resitansurans/{id}',['as'=>'resit.ansurans','uses'=>'GadaianController@resitansurans'])->middleware('auth','teller');