diff --git a/app/Events/PendahuluanSerahan.php b/app/Events/PendahuluanSerahan.php index b82908e..ab97a35 100644 --- a/app/Events/PendahuluanSerahan.php +++ b/app/Events/PendahuluanSerahan.php @@ -12,10 +12,12 @@ class PendahuluanSerahan implements ShouldBroadcast use Dispatchable, InteractsWithSockets, SerializesModels; public $pengesahan; + public $cawangan; - public function __construct($pengesahan) + public function __construct($pengesahan,$cawangan) { $this->pengesahan = $pengesahan; + $this->cawangan = $cawangan; } public function broadcastOn() diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 0a44f6c..b7d3a6a 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -1118,7 +1118,7 @@ class KhazanahController extends Controller ]); - event(new PendahuluanSerahan("Lulus")); + event(new PendahuluanSerahan("Lulus",$auth_user['cawangan'])); $updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[ 'kodlaluan' => $request->teller, @@ -1198,7 +1198,7 @@ class KhazanahController extends Controller ]); - event(new PendahuluanSerahan("Lulus")); + event(new PendahuluanSerahan("Lulus",$auth_user['cawangan'])); $updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[ 'kodlaluan' => $request->teller, @@ -2941,7 +2941,7 @@ class KhazanahController extends Controller 'kodlaluan'=>$kodlaluan ]); - event(new PendahuluanSerahan("Batal")); + event(new PendahuluanSerahan("Batal",$auth_user['cawangan'])); return response('Berjaya'); } @@ -3352,6 +3352,78 @@ class KhazanahController extends Controller return view('print.laporan_audittrail', compact('audittrail','cawangan_detail','tarikh_cetak','date','api_url')); } + + public function laporanWakil() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $lookwakil = Http::get(config('api.url') . '/api/lookupwakil/')->json(); + + return view('khazanah.laporan.wakil', compact('cawangan_info','api_url','lookwakil')); + } + + public function cetakLaporanWakil(Request $request) + { + + $api_url = config('api.url'); + $auth_user = Auth::user(); + $current = Carbon::now(); + $current = new Carbon(); + $tarikh_cetak = $current->toDateString(); + + // if($request->dateaudit == null){ + // $date = $current->toDateString(); + // }else{ + // $split_date = explode('-', $request->dateaudit); + // $date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + // } + + + $wakil = Http::get(config('api.url'). '/api/getwakil/' . Auth::user()->cawangan . '/status/hubungan/',['hubungan' => $request->slthubungan])->json(); + + $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + + return view('print.laporan_wakil', compact('wakil','cawangan_detail','tarikh_cetak','api_url')); + } + + public function laporanSAGHilang() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $loopalasan = Http::get(config('api.url') . '/api/lookupalasan/')->json(); + + return view('khazanah.laporan.saghilang', compact('cawangan_info','api_url','loopalasan')); + } + + public function cetakLaporanSAGHilang(Request $request) + { + + $api_url = config('api.url'); + $auth_user = Auth::user(); + $current = Carbon::now(); + $current = new Carbon(); + $tarikh_cetak = $current->toDateString(); + + if($request->datesaghilang == null){ + $date = $current->toDateString(); + }else{ + $split_date = explode('-', $request->datesaghilang); + $date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + } + + + $polis = Http::get(config('api.url'). '/api/polis/laporan/',['kodcaw' => $auth_user['cawangan'], 'alasan' => $request->sltalasan, 'tarikh' => $date])->json(); + + $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + + return view('print.laporan_saghilang', compact('polis','cawangan_detail','date','tarikh_cetak','api_url')); + } diff --git a/public/js/main.js b/public/js/main.js index 64d4313..dc37820 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -465,8 +465,8 @@ async function openuptambahdanserah(e) var channel = pusher.subscribe('pendahuluanserahan-notice'); channel.bind('penserahan-event', function(data) { - - if(data.pengesahan === 'Lulus') + console.log(data); + if(data.pengesahan === 'Lulus' && data.cawangan == kodcaw) { Swal.fire({ icon: 'success', @@ -630,8 +630,9 @@ function tambahdanserahanfunc(e) var channel = pusher.subscribe('pendahuluanserahan-notice'); channel.bind('penserahan-event', function(data) { // let message = JSON.stringify(data); + console.log(data); - if(data.pengesahan === 'Lulus') + if(data.pengesahan === 'Lulus' && data.cawangan == kodcaw) { Swal.fire({ icon: 'success', diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php index cec33f1..d2252af 100644 --- a/resources/views/homepage/khazanah/home.blade.php +++ b/resources/views/homepage/khazanah/home.blade.php @@ -25,7 +25,7 @@ - @@ -194,7 +194,7 @@ Pendahuluan - Serahan
- Denominasi + Denominasi
@@ -558,8 +558,6 @@ confirmButtonText: 'Simpan' }).then((result) => { - //console.log(result); - //return false; if (result.isConfirmed) { saveData(); diff --git a/resources/views/homepage/penilai/home.blade.php b/resources/views/homepage/penilai/home.blade.php index 35a925e..80b4be8 100644 --- a/resources/views/homepage/penilai/home.blade.php +++ b/resources/views/homepage/penilai/home.blade.php @@ -281,10 +281,11 @@ var channel = pusher.subscribe('gadai-notify'); channel.bind('trigger-gadai', function(data) { - if(cawangan == data.cawangan) + if(cawangan == data.cawangan) { - fetchGadaianEverytime(); - } + fetchGadaianEverytime(); + } + }); var table_gadaian_semasa = $('#table-gadaian-semasa').DataTable({ @@ -344,8 +345,6 @@ // this.checked = true; $(this).prop('checked', true); } - - } }); @@ -631,33 +630,20 @@ }); - //TIME INTERVAL - let timerInterval; + var channel = pusher.subscribe('status-liked'); + channel.bind('my-event', function(data) { - timerInterval = setInterval(function(){ - $.ajax({ - method:'get', - url: "{{ route('teller.getkelulusan') }}", - data: { - "norujukan" : norujukan - }, - success:function(data){ - if(data != 0){ - clearInterval(timerInterval); - Swal.fire({ - icon: 'success', - title: 'Telah Disahkan' - }).then(function(){ - $("#print_submit_belum_serah").submit(); - }); - } - },error: function(xhr, status, error) { - var err = eval("(" + xhr.responseText + ")"); - alert(xhr.responseText); - } - }); - }, 3000); - + if(cawangan == data.cawangan) + { + Swal.fire({ + icon: 'success', + title: 'Telah Disahkan' + }).then(function(){ + $("#print_submit_belum_serah").submit(); + }); + } + + }); }else if (result.dismiss === Swal.DismissReason.cancel) { swalWithBootstrapButtons.fire( diff --git a/resources/views/khazanah/gadaian.blade.php b/resources/views/khazanah/gadaian.blade.php index 62cc714..d2bea38 100644 --- a/resources/views/khazanah/gadaian.blade.php +++ b/resources/views/khazanah/gadaian.blade.php @@ -219,9 +219,10 @@ var channel = pusher.subscribe('serahanpenilai-notify'); channel.bind('trigger-serahanpenilai', function(data) { - if(cawangan == data.kodcaw){ - fetchGadaianEverytime(); - } + if(cawangan == data.kodcaw) + { + fetchGadaianEverytime(); + } }); $(document).ready(function(){ diff --git a/resources/views/khazanah/laporan/agingbulanan.blade.php b/resources/views/khazanah/laporan/agingbulanan.blade.php index 227dddd..1d5bc1f 100644 --- a/resources/views/khazanah/laporan/agingbulanan.blade.php +++ b/resources/views/khazanah/laporan/agingbulanan.blade.php @@ -5,20 +5,16 @@
-
{{ __('Laporan Aging Bulanan') }}
- -
-
-
- -
-
-

Laporan Aging Bulanan

-
-
- + + -
+
@csrf @@ -48,28 +44,7 @@
-
-
- - - - - - - - - - - -
BilBil GadaianJumlah Pinjaman (RM)Peratusan %
-
-
-
-
- Bilangan Surat : 3 - Jumlah Pinjaman : RM 3,000.00 -
-
+
diff --git a/resources/views/khazanah/laporan/audittrail.blade.php b/resources/views/khazanah/laporan/audittrail.blade.php index 37a1c4e..b4436d5 100644 --- a/resources/views/khazanah/laporan/audittrail.blade.php +++ b/resources/views/khazanah/laporan/audittrail.blade.php @@ -1,63 +1,4 @@ @extends('layouts.app') - @section('content')
@@ -80,6 +21,12 @@
+ @if(session()->has('errormessage')) +
+ {{ session()->get('errormessage') }} +
+ @endif +
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index bfef71c..b8234b8 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -15,7 +15,7 @@
-
+
@@ -25,11 +25,11 @@ -
@@ -55,9 +57,6 @@ - @@ -67,7 +66,12 @@ - + {{-- --}} +
@@ -102,80 +106,4 @@
- - @endsection diff --git a/resources/views/khazanah/laporan/pelangganbaru.blade.php b/resources/views/khazanah/laporan/pelangganbaru.blade.php index dd3c930..1f58559 100644 --- a/resources/views/khazanah/laporan/pelangganbaru.blade.php +++ b/resources/views/khazanah/laporan/pelangganbaru.blade.php @@ -41,21 +41,13 @@ Bil - No Pelanggan No K/P Nama - Yuran Ahli
-
-
- Bilangan Surat : 3 - Jumlah Pinjaman : RM 3,000.00 -
-
@@ -107,10 +99,8 @@ $.each(data,function(index,customers){ tablecustomers.row.add([ counter, - customers['nopelanggan'], customers['kpbaru'], - customers['nama'], - customers['yuranahli'] + customers['nama'] ]).draw(); }); diff --git a/resources/views/khazanah/laporan/saghilang.blade.php b/resources/views/khazanah/laporan/saghilang.blade.php new file mode 100644 index 0000000..5b2ccf4 --- /dev/null +++ b/resources/views/khazanah/laporan/saghilang.blade.php @@ -0,0 +1,74 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+
+ @csrf +
+
+
+
+ Tarikh +
+ + {{-- --}} +
+ +
+
+
+
+ Alasan +
+ +
+
+
+ +
+
+
+
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/laporan/wakil.blade.php b/resources/views/khazanah/laporan/wakil.blade.php new file mode 100644 index 0000000..d4a00dc --- /dev/null +++ b/resources/views/khazanah/laporan/wakil.blade.php @@ -0,0 +1,64 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ @csrf +
+
+ Hubungan +
+ + {{-- --}} + +
+
+
+
+ +
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/tebus.blade.php b/resources/views/khazanah/tebus.blade.php index 1ab49a1..8dba38a 100644 --- a/resources/views/khazanah/tebus.blade.php +++ b/resources/views/khazanah/tebus.blade.php @@ -190,9 +190,11 @@ var channel = pusher.subscribe('tebus-notify'); channel.bind('trigger-tebus', function(data) { - if(cawangan == data.cawangan){ - fetchTebusEverytime(); - } + if(cawangan == data.cawangan) + { + fetchTebusEverytime(); + } + }); $(document).ready(function(){ diff --git a/resources/views/modal/wakil.blade.php b/resources/views/modal/wakil.blade.php index f40b640..57b0632 100644 --- a/resources/views/modal/wakil.blade.php +++ b/resources/views/modal/wakil.blade.php @@ -94,7 +94,7 @@ - +
diff --git a/resources/views/print/laporan_pelangganbaru.blade.php b/resources/views/print/laporan_pelangganbaru.blade.php index c6e8ccd..7bb29aa 100644 --- a/resources/views/print/laporan_pelangganbaru.blade.php +++ b/resources/views/print/laporan_pelangganbaru.blade.php @@ -166,9 +166,8 @@ - - - + + - - - - @@ -200,30 +193,21 @@
SENARAI PELANGGAN BARU SENARAI PELANGGAN BARU Tarikh Cetak: @php $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak); @@ -185,12 +184,6 @@ $formattedweddingdate = $myDateTime->format('d-m-Y'); echo($formattedweddingdate) @endphp - -
- - - @php $counter = 1;$totalyuran = 0; @endphp + @php $counter = 1; @endphp @foreach($senaraipelanggan as $index=>$item) - - - @php $counter++; $totalyuran += $item['yuranahli'];@endphp + @php $counter++;@endphp @endforeach - - - - -
BilNo Pelanggan No KP NamaYuran Ahli
{{ $counter }}{{$item['nopelanggan']}} {{$item['kpbaru']}} {{$item['nama']}}{{$item['yuranahli']}}
JUMLAH KESELURUHAN : RM {{ number_format($totalyuran,2) }}

diff --git a/resources/views/print/laporan_saghilang.blade.php b/resources/views/print/laporan_saghilang.blade.php new file mode 100644 index 0000000..e5d07c8 --- /dev/null +++ b/resources/views/print/laporan_saghilang.blade.php @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + {{-- --}} + {{-- --}} + + + + + + {{-- + + + + + + + --}} + +
+ + + + + + + + + + + + + + + + + + + + + {{-- + --}} + + + + + + + +
LAPORAN SAG HILANG
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', $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
+ +
+ + + + + + + + + + @foreach($polis as $index=>$sh) + + + + @endforeach +
BilNorujukanAlasanPC/PPCDaerahNegeri
{{ $loop->iteration}} {{ $sh['norujukan'] }} + {{ $sh['komen1'] }} + {{ $sh['teller'] }} + @php + $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$sh['koddaerah'] )->json(); + $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$sh['kodnegeri'] )->json(); + @endphp + {{ $koddaerah['namadaerah'] }} + {{ $kodnegeri['negeri'] }} +
+

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


+ + + + + + + + + + + + + + + + + + + +
.................................................................. .................................................................. ..................................................................
Disediakan Disemak Disahkan
+ + + + + + diff --git a/resources/views/print/laporan_wakil.blade.php b/resources/views/print/laporan_wakil.blade.php new file mode 100644 index 0000000..468d339 --- /dev/null +++ b/resources/views/print/laporan_wakil.blade.php @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + {{-- --}} + {{-- --}} + + + + + + {{-- + + + + + + + --}} + +
+ + + + + + + + + + + + + + + + + + {{-- + + --}} + {{-- + --}} + {{-- + + + + + + --}} +
LAPORAN WAKIL
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', $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
+ +
+ + + + + + + + + + + @foreach($wakil as $index=>$lw) + + + + + + + + + + @endforeach +
Bilnamanokpnowakilhubunganalamat1telefon
{{ $loop->iteration}}{{ $lw['nama'] }}{{ $lw['nokp'] }}{{ $lw['nowakil'] }}{{ $lw['hubungan'] }}{{ $lw['alamat1'] }}{{ $lw['telefon'] }}
+

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


+ + + + + + + + + + + + + + + + + + + +
.................................................................. .................................................................. ..................................................................
Disediakan Disemak Disahkan
+ + + + + + diff --git a/routes/web.php b/routes/web.php index 28def0a..266da13 100644 --- a/routes/web.php +++ b/routes/web.php @@ -228,6 +228,12 @@ Route::get('laporan/hargaemas/',['as'=>'laporan.hargaemas','uses'=>'KhazanahCont 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::post('laporan/audittrail/cetak',['as'=>'audittrail.laporancetak','uses'=>'KhazanahController@cetakLaporanAuditTrail'])->middleware('auth','khazanah'); +Route::get('laporan/wakil/',['as'=>'laporan.wakil','uses'=>'KhazanahController@laporanWakil'])->middleware('auth','khazanah'); +Route::post('laporan/wakil/cetak',['as'=>'wakil.laporancetak','uses'=>'KhazanahController@cetakLaporanWakil'])->middleware('auth','khazanah'); +// Route::get('laporan/hapushq/',['as'=>'laporan.hapushq','uses'=>'KhazanahController@laporanHapusHQ'])->middleware('auth','khazanah'); +// Route::post('laporan/hapushq/cetak',['as'=>'hapushq.laporancetak','uses'=>'KhazanahController@cetakLaporanHapusHQ'])->middleware('auth','khazanah'); +Route::get('laporan/saghilang/',['as'=>'laporan.saghilang','uses'=>'KhazanahController@laporanSAGHilang'])->middleware('auth','khazanah'); +Route::post('laporan/saghilang/cetak',['as'=>'saghilang.laporancetak','uses'=>'KhazanahController@cetakLaporanSAGHilang'])->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');