diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 350c705..93e4500 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -1846,6 +1846,13 @@ class KhazanahController extends Controller $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } $petibesi = Http::get(config('api.url'). '/api/laporanpetibesi/'. $auth_user['cawangan'] .'/'. $tebus_date)->json(); + + if(!$petibesi) + { + 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]; @@ -3130,4 +3137,86 @@ class KhazanahController extends Controller return view('lelongan.index-khazanah',compact('cawangan_info','api_url','gadai','nama','lelong')); } + public function laporan_pendserahan() + { + $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.pendahuluanserahan', compact('cawangan_info','api_url')); + } + + public function cetaklaporan_laporan_pendserahan(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]; + } + + $pendser = Http::get(config('api.url'). '/api/SenaraiPendSer/range/' . $auth_user['cawangan'],['mula' => $mula_date,'hingga' => $hingga_date,'jenis' => $request->radpendser])->json(); + + $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + + return view('print.laporan_pendahuluanserahan', compact('pendser','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url')); + } + + public function laporanDenominasi() + { + $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.denominasi', compact('cawangan_info','api_url')); + } + + public function cetakLaporanDenominasi(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_denominasi', compact('denominasi','cawangan_detail','tarikh_cetak','date','api_url')); + } + } diff --git a/resources/views/khazanah/laporan/denominasi.blade.php b/resources/views/khazanah/laporan/denominasi.blade.php new file mode 100644 index 0000000..10f9beb --- /dev/null +++ b/resources/views/khazanah/laporan/denominasi.blade.php @@ -0,0 +1,70 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + + @if(session()->has('errormessage')) +
+ {{ session()->get('errormessage') }} +
+ @endif + +
+
+
+
+
+
+
+
+
+
+ @csrf +
+
+ Tarikh +
+ + +
+
+
+
+ +
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index 91eef50..dae0e23 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -31,9 +31,9 @@
Aging Bulan
- {{--
- Aging Pemodal -
--}} +
+ Laporan HQ +
Tuntut Baki
@@ -64,6 +64,9 @@
Lejer Am
+
+ Denominasi +
diff --git a/resources/views/khazanah/laporan/pendahuluanserahan.blade.php b/resources/views/khazanah/laporan/pendahuluanserahan.blade.php new file mode 100644 index 0000000..383c264 --- /dev/null +++ b/resources/views/khazanah/laporan/pendahuluanserahan.blade.php @@ -0,0 +1,161 @@ +@extends('layouts.app') + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+ @csrf +
+
+ Mula +
+ +
+ Hingga +
+ + +
+ +
+
+

+
+ +
+ + +
+ +
+ +
+ +
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/laporan/petibesi.blade.php b/resources/views/khazanah/laporan/petibesi.blade.php index 0d53d0e..3c8a4d6 100644 --- a/resources/views/khazanah/laporan/petibesi.blade.php +++ b/resources/views/khazanah/laporan/petibesi.blade.php @@ -13,6 +13,12 @@ + @if(session()->has('errormessage')) +
+ {{ session()->get('errormessage') }} +
+ @endif +
@@ -22,7 +28,7 @@
-
+ @csrf
diff --git a/resources/views/khazanah/pendahuluanserahanmain.blade.php b/resources/views/khazanah/pendahuluanserahanmain.blade.php index 8c7d40f..69f23c0 100644 --- a/resources/views/khazanah/pendahuluanserahanmain.blade.php +++ b/resources/views/khazanah/pendahuluanserahanmain.blade.php @@ -43,6 +43,7 @@ Tindakan + @foreach ($listgldetail as $gldetail) @@ -50,7 +51,7 @@ {{ $gldetail['descpt'] }} {{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }} {{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }} - @if($date === $gldetail['tarikh']) @else @endif + @if($date === $gldetail['tarikh'] && !fnmatch('SERAHAN BAYAR ONLINE*',$gldetail['descpt'])) @else @endif @endforeach diff --git a/resources/views/print/laporan_denominasi.blade.php b/resources/views/print/laporan_denominasi.blade.php new file mode 100644 index 0000000..8ce9303 --- /dev/null +++ b/resources/views/print/laporan_denominasi.blade.php @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- + + + + + + + + + + + + + + + + + --}} +
LAPORAN DENOMINASI - {{ $cawangan_detail['namacaw'] }}
+ + + + + + + +
ID {{ (Auth::user()->name) ? Auth::user()->name : ''}}
+ + + + + + + +
Tarikh Laporan {{ $date }} Tarikh Cetak {{ $tarikh_cetak }}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RMKUANTITIJUMLAH (RM)
RM100{{ $denominasi[0]['txtring100'] }}{{ number_format($denominasi[0]['k100'],2) }}
RM 50{{ $denominasi[0]['txtring50'] }}{{ number_format($denominasi[0]['k50'],2) }}
RM 20{{ $denominasi[0]['txtring20'] }}{{ number_format($denominasi[0]['k20'],2) }}
RM 10{{ $denominasi[0]['txtring10'] }}{{ number_format($denominasi[0]['k10'],2) }}
RM 5{{ $denominasi[0]['txtring5'] }}{{ number_format($denominasi[0]['k5'],2) }}
RM 1.00{{ $denominasi[0]['txtring1'] }}{{ number_format($denominasi[0]['k1'],2) }}
RM 0.50{{ $denominasi[0]['txtsen50'] }}{{ number_format($denominasi[0]['k050'],2) }}
RM 0.20{{ $denominasi[0]['txtsen20'] }}{{ number_format($denominasi[0]['k020'],2) }}
RM0.10{{ $denominasi[0]['txtsen10'] }}{{ number_format($denominasi[0]['k010'],2) }}
RM 0.05{{ $denominasi[0]['txtsen5'] }}{{ number_format($denominasi[0]['k05'],2) }}
RM 0.01{{ $denominasi[0]['txtsen1'] }}{{ number_format($denominasi[0]['k01'],2) }}
JUMLAH (RM){{ number_format($denominasi[0]['txtjumlah'],2) }}
+
+
+ + + + + + + + + + + + + + + + +
.................................................................. ..................................................................
DI SEMAK DI SAHKAN
+ \ No newline at end of file diff --git a/resources/views/print/laporan_pendahuluanserahan.blade.php b/resources/views/print/laporan_pendahuluanserahan.blade.php new file mode 100644 index 0000000..6448688 --- /dev/null +++ b/resources/views/print/laporan_pendahuluanserahan.blade.php @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + {{-- --}} + {{-- --}} + + + + + + {{-- + + + + + + + --}} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LAPORAN PENDAHULUAN/SERAHAN HQ
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
+ +
+ + + + + + + + + @php $counter = 1; $totalamaun = 0; $jenis = ''; @endphp + @foreach($pendser as $index=>$item) + + + + + + + @php $counter++;$totalamaun += ($item['pendahuluan'] > 0) ? $item['pendahuluan'] : $item['serahan']; + if($index == 0) + if($item['pendahuluan'] > 0) + $jenis = 'PENDAHULUAN'; + else + $jenis = 'SERAHAN'; + @endphp + @endforeach +
BilTarikhKeteranganNamaAmaun (RM)
{{ $counter }}{{ $item['tarikh'] }}{{ $item['descpt'] }}{{ $item['teller'] }}{{ ($item['pendahuluan'] > 0) ? number_format($item['pendahuluan'],2) : number_format($item['serahan'],2) }}
+

+ + + + + +
JUMLAH {{ $jenis }}{{ 'RM ' . number_format($totalamaun,2) }}
+ +
+


+ + + + + + + + + + + + + + + + + + + +
.................................................................. .................................................................. ..................................................................
Disediakan Disemak Disahkan
+ + + + + + diff --git a/routes/web.php b/routes/web.php index 3baf11a..07e4dc6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -213,6 +213,10 @@ Route::post('/laporan/perbelanjaan/cetak', ['as'=>'perbelanjaan.cetaklaporan', ' Route::get('/laporan/perbelanjaan/cetak/{baucer}', ['as'=>'perbelanjaan.cetaklaporanbaucer', 'uses'=>'KhazanahController@cetaklaporan_Perbelanjaan_Baucer'])->middleware('auth','khazanah'); Route::get('/laporan/tuntutbaki', [ 'as'=>'laporan.tuntutbaki', 'uses'=>'KhazanahController@laporan_tuntutbaki'])->middleware('auth','khazanah'); Route::post('/laporan/tuntutbaki/cetak', ['as'=>'tuntutbaki.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporan_tuntutbaki'])->middleware('auth','khazanah'); +Route::get('/laporan/pendserahan', [ 'as'=>'laporan.pendserahan', 'uses'=>'KhazanahController@laporan_pendserahan'])->middleware('auth','khazanah'); +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/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');