diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index 93e4500..9da73c3 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -3219,4 +3219,130 @@ class KhazanahController extends Controller
return view('print.laporan_denominasi', compact('denominasi','cawangan_detail','tarikh_cetak','date','api_url'));
}
+ public function laporan_senaraipetibesi()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+
+
+ return view('khazanah.laporan.senaraipetibesi', compact('cawangan_info','api_url'));
+ }
+
+ public function cetaklaporan_senaraipetibesi(Request $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];
+ }
+
+ $petibesi = Http::get(config('api.url'). '/api/laporanpetibesirange/' . $auth_user['cawangan'],['mula' => $mula_date,'hingga' => $hingga_date])->json();
+
+ $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_senaraipetibesi', compact('petibesi','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
+ }
+
+ public function laporanhargaemas()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+
+ return view('khazanah.laporan.hargaemas', compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanhargaemas(Request $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];
+ }
+
+ $petibesi = Http::get(config('api.url'). '/api/harga_emas/laporan/sandaran/',['mula' => $mula_date,'hingga' => $hingga_date])->json();
+
+ $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_hargaemas', compact('petibesi','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
+ }
+
+
+ public function laporanAuditTrail()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+
+
+ return view('khazanah.laporan.audittrail', compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanAuditTrail(Request $request)
+ {
+
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datedenominasi == null){
+ $date = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datedenominasi);
+ $date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ $denominasi = Http::get(config('api.url'). '/api/DenominasiLaporan/' . $auth_user['cawangan'],['tarikh' => $date])->json();
+
+ if(!$denominasi)
+ {
+ return redirect()->back()->with('errormessage', 'Tiada data pada tarikh tersebut.');
+ }
+
+ $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_audittrail', compact('denominasi','cawangan_detail','tarikh_cetak','date','api_url'));
+ }
+
+
+
}
diff --git a/resources/views/khazanah/laporan/audittrail.blade.php b/resources/views/khazanah/laporan/audittrail.blade.php
new file mode 100644
index 0000000..ab108aa
--- /dev/null
+++ b/resources/views/khazanah/laporan/audittrail.blade.php
@@ -0,0 +1,147 @@
+@extends('layouts.app')
+
+
+@section('content')
+
+
+@endsection
+
diff --git a/resources/views/khazanah/laporan/hargaemas.blade.php b/resources/views/khazanah/laporan/hargaemas.blade.php
new file mode 100644
index 0000000..4190d3d
--- /dev/null
+++ b/resources/views/khazanah/laporan/hargaemas.blade.php
@@ -0,0 +1,147 @@
+@extends('layouts.app')
+
+
+@section('content')
+
+
+@endsection
+
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php
index dae0e23..bfef71c 100644
--- a/resources/views/khazanah/laporan/index.blade.php
+++ b/resources/views/khazanah/laporan/index.blade.php
@@ -39,7 +39,7 @@
Imbang Duga
diff --git a/resources/views/khazanah/laporan/senaraipetibesi.blade.php b/resources/views/khazanah/laporan/senaraipetibesi.blade.php
new file mode 100644
index 0000000..5f80a0c
--- /dev/null
+++ b/resources/views/khazanah/laporan/senaraipetibesi.blade.php
@@ -0,0 +1,147 @@
+@extends('layouts.app')
+
+
+@section('content')
+
+
+@endsection
+
diff --git a/resources/views/print/laporan_audittrail.blade.php b/resources/views/print/laporan_audittrail.blade.php
new file mode 100644
index 0000000..0f84edd
--- /dev/null
+++ b/resources/views/print/laporan_audittrail.blade.php
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN SENARAI HARGA EMAS |
+ |
+ |
+ |
+
+
+ | TARIKH CETAK:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ | MULA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ HINGGA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Tarikh |
+ Teller |
+ Pelulus |
+ Act |
+ Transaksi |
+ Norujukan |
+ Ping Lama |
+ Pinjaman |
+ Upah |
+ Nota |
+ Nokp |
+ Norujukan Asal |
+
+ @php $counter = 1; $totalamaun = 0; $jenis = ''; @endphp
+ @foreach($petibesi as $index=>$item)
+
+ | {{ $counter }} |
+ {{ $item['t_efektif'] }} |
+ {{ $item['m_efektif'] }} |
+ {{ $item['karat'] }} |
+ {{ number_format($item['harga'],2) }} |
+
+ @php $counter++;@endphp
+ @endforeach
+
+
+{{--
+
+ | JUMLAH {{ $jenis }} |
+ {{ 'RM ' . number_format($totalamaun,2) }} |
+
+
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ Disediakan |
+ |
+ Disemak |
+ |
+ Disahkan |
+ |
+
+
+
+
+
+
+
+
diff --git a/resources/views/print/laporan_hargaemas.blade.php b/resources/views/print/laporan_hargaemas.blade.php
new file mode 100644
index 0000000..96b47b4
--- /dev/null
+++ b/resources/views/print/laporan_hargaemas.blade.php
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN SENARAI HARGA EMAS |
+ |
+ |
+ |
+
+
+ | TARIKH CETAK:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ | MULA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ HINGGA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Tarikh |
+ Masa |
+ Mutu/Karat |
+ Harga (RM) |
+
+ @php $counter = 1; $totalamaun = 0; $jenis = ''; @endphp
+ @foreach($petibesi as $index=>$item)
+
+ | {{ $counter }} |
+ {{ $item['t_efektif'] }} |
+ {{ $item['m_efektif'] }} |
+ {{ $item['karat'] }} |
+ {{ number_format($item['harga'],2) }} |
+
+ @php $counter++;@endphp
+ @endforeach
+
+
+{{--
+
+ | JUMLAH {{ $jenis }} |
+ {{ 'RM ' . number_format($totalamaun,2) }} |
+
+
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ Disediakan |
+ |
+ Disemak |
+ |
+ Disahkan |
+ |
+
+
+
+
+
+
+
+
diff --git a/resources/views/print/laporan_senaraipetibesi.blade.php b/resources/views/print/laporan_senaraipetibesi.blade.php
new file mode 100644
index 0000000..49d7e2f
--- /dev/null
+++ b/resources/views/print/laporan_senaraipetibesi.blade.php
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN SENARAI PETI BESI |
+ |
+ |
+ |
+
+
+ | TARIKH CETAK:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ | MULA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ HINGGA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Tarikh |
+ C/F (RM) |
+ Keluar (RM) |
+ Masuk (RM) |
+ Pendahuluan (RM) |
+ Serahan (RM) |
+ Panjar (RM) |
+ B/F (RM) |
+
+ @php $counter = 1; $totalamaun = 0; $jenis = ''; @endphp
+ @foreach($petibesi as $index=>$item)
+
+ | {{ $counter }} |
+ {{ $item['tarikh'] }} |
+ {{ number_format($item['bakiawal'],2) }} |
+ {{ number_format($item['keluar'],2) }} |
+ {{ number_format($item['masuk'],2) }} |
+ {{ number_format($item['pendahuluan'],2) }} |
+ {{ number_format($item['serahan'],2) }} |
+ {{ number_format($item['totpanjar'],2) }} |
+ {{ number_format($item['bakiakhir'],2) }} |
+
+ @php $counter++;@endphp
+ @endforeach
+
+
+{{--
+
+ | JUMLAH {{ $jenis }} |
+ {{ 'RM ' . number_format($totalamaun,2) }} |
+
+
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ Disediakan |
+ |
+ Disemak |
+ |
+ Disahkan |
+ |
+
+
+
+
+
+
+
+
diff --git a/routes/web.php b/routes/web.php
index 07e4dc6..cdf8f45 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -217,6 +217,12 @@ Route::get('/laporan/pendserahan', [ 'as'=>'laporan.pendserahan', 'uses'=>'Khaza
Route::post('/laporan/pendserahan/cetak', ['as'=>'pendserahan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_laporan_pendserahan'])->middleware('auth','khazanah');
Route::get('laporan/denominasi/',['as'=>'laporan.denominasi','uses'=>'KhazanahController@laporanDenominasi'])->middleware('auth','khazanah');
Route::get('laporan/denominasi/cetak',['as'=>'denominasi.laporancetak','uses'=>'KhazanahController@cetakLaporanDenominasi'])->middleware('auth','khazanah');
+Route::get('/laporan/senaraipetibesi', [ 'as'=>'laporan.senaraipetibesi', 'uses'=>'KhazanahController@laporan_senaraipetibesi'])->middleware('auth','khazanah');
+Route::post('/laporan/senaraipetibesi/cetak', ['as'=>'senaraipetibesi.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_senaraipetibesi'])->middleware('auth','khazanah');
+Route::get('laporan/hargaemas/',['as'=>'laporan.hargaemas','uses'=>'KhazanahController@laporanhargaemas'])->middleware('auth','khazanah');
+Route::post('laporan/hargaemas/cetak',['as'=>'hargaemas.laporancetak','uses'=>'KhazanahController@cetakLaporanhargaemas'])->middleware('auth','khazanah');
+Route::get('laporan/audittrail/',['as'=>'laporan.audittrail','uses'=>'KhazanahController@laporanAuditTrail'])->middleware('auth','khazanah');
+Route::get('laporan/audittrail/cetak',['as'=>'audittrail.laporancetak','uses'=>'KhazanahController@cetakLaporanAuditTrail'])->middleware('auth','khazanah');
// Route::get('/laporan/agingbulanan', [ 'as'=>'laporan.agingbulanan', 'uses'=>'KhazanahController@laporanAging_Bulanan'])->middleware('auth','khazanah');
// Route::post('/laporan/agingbulanan/cetak', ['as'=>'agingbulan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporang_Aging'])->middleware('auth','khazanah');