diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 817244a..63d8f50 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -863,11 +863,101 @@ function cetaktuntutbaki(e) { let norujukan = $(e).data('norujukan'); - let urlroute = '{{ route("resit.tuntutbaki", ":id") }}'; - urlroute = urlroute.replace(':id', norujukan); - window.open(urlroute, '_blank'); + const swalWithBootstrapButtons = Swal.mixin({ + customClass: { + confirmButton: 'btn btn-success ml-1', + cancelButton: 'btn btn-danger' + }, + buttonsStyling: false + }); + swalWithBootstrapButtons.fire({ + title: 'Dapatkan Pengesahan PC/PPC', + text: "Kelulusan Ulang Cetak Tuntut Baki Lelong", + icon: 'info', + showCancelButton: true, + confirmButtonText: 'Hantar', + cancelButtonText: 'Batal', + reverseButtons: true + }).then((result) => { + if(result.isConfirmed) { + Swal.fire({ + title: 'Tunggu Pengesahan Daripada PC/PPC.', + icon: 'info', + width: 600, + padding: '3em', + background: '#fffff', + showCancelButton: false, + showConfirmButton: false, + allowOutsideClick: false, + allowEscapeKey: false, + allowEnterKey: false + }) + + let mohon = "Ulang Cetak Tuntut Baki"; + + $.ajax({ + method:'post', + url: '{{ route("teller.createkelulusan") }}', + data: { + "_token": "{{ csrf_token() }}", + "norujukan" : norujukan, + "mohon" : mohon + }, + success:function(data){ + },error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); + + let teller = "{{ Auth::user()->name }}"; + + var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { + cluster: 'ap1', + encrypted: true + }); + + var channel = pusher.subscribe('notice-ubahhapus'); + channel.bind('my-ubahhapus', function(data) { + + if(data.norujukan == norujukan && data.teller == teller) + { + if(data.kelulusan == 'lulus') + { + Swal.fire({ + icon: 'success', + title: 'Telah Disahkan' + }).then(function(){ + let urlroute = '{{ route("resit.tuntutbaki", ":id") }}'; + urlroute = urlroute.replace(':id', norujukan); + window.open(urlroute, '_blank'); + }); + + } + else if(data.kelulusan == 'batal') + { + Swal.fire({ + icon: 'warning', + title: 'Telah Dibatalkan', + text: `Komen : ${data.komen}` + }).then(function(){ + location.reload(); + return false; + }); + } + } + }); + }else if (result.dismiss === Swal.DismissReason.cancel){ + swalWithBootstrapButtons.fire( + 'Batal', + 'Tidak Berjaya Mendapatkan Pengesahan Khazanah', + 'error' + ) + } + + }); return; } @@ -905,7 +995,7 @@ }); swalWithBootstrapButtons.fire({ - title: 'Dapatkan Pengesahan Khazanah', + title: 'Dapatkan Pengesahan PC/PPC', text: "Kelulusan Tuntut Baki Lelong", icon: 'info', showCancelButton: true, @@ -915,7 +1005,7 @@ }).then((result) => { if(result.isConfirmed) { Swal.fire({ - title: 'Tunggu Pengesahan Daripada Khazanah.', + title: 'Tunggu Pengesahan Daripada PC/PPC.', icon: 'info', width: 600, padding: '3em', @@ -995,7 +1085,7 @@ Swal.fire({ icon: 'error', title: 'Amaran', - text: 'Lelongan telah dibayar!' + text: 'Lelongan telah Dituntut!' }); } @@ -1285,7 +1375,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/edit.blade.php index d110758..5e5dd51 100644 --- a/resources/views/gadaian/edit.blade.php +++ b/resources/views/gadaian/edit.blade.php @@ -795,7 +795,7 @@ var pembiyaan_max_pelulus = $('#pembiyaan_max_pelulus').val(); var pembiyaan_max_pelulus = Number(pembiyaan_max_pelulus.replace(/[^0-9.-]+/g,"")); var min_pinjaman = nilai_marhun_total * 0.10; - var max_pinjaman = nilai_marhun_total * 0.80; + var max_pinjaman = pembiyaan_max_pelulus; let teller = "{{ Auth::user()->name }}"; let bakiakhir = 0; @@ -857,7 +857,7 @@ return false; } else{ - if(pinjaman >=10000){ + if(pinjaman >=10000 && pinjaman <= Number(pembiyaan_max_pelulus)){ const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', @@ -975,7 +975,7 @@ event.preventDefault(); return false; - }else if(pinjaman > Number(pembiayaan_max_teller)+10){ + }else if(pinjaman > Number(pembiayaan_max_teller)){ const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', @@ -1091,7 +1091,7 @@ event.preventDefault(); return false; } - else if(pinjaman < 10000){ + else if(pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){ Swal.fire({ icon: 'success', title: 'Berjaya!', diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index ed2d5a4..073d246 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -690,7 +690,7 @@ var pembiyaan_max_pelulus = $('#pembiyaan_max_pelulus').val(); var pembiyaan_max_pelulus = Number(pembiyaan_max_pelulus.replace(/[^0-9.-]+/g,"")); var min_pinjaman = nilai_marhun_total * 0.10; - var max_pinjaman = nilai_marhun_total * 0.80; + var max_pinjaman = pembiyaan_max_pelulus; var outstanding_semasa = Number("{{ $outstanding_semasa }}"); let teller = "{{ Auth::user()->name }}"; @@ -796,7 +796,7 @@ return false; } else{ - if(pinjaman >= 10000){ + if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){ const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', @@ -1039,7 +1039,7 @@ event.preventDefault(); return false; } - else if( pinjaman < 10000){ + else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){ Swal.fire({ icon: 'success', title: 'Berjaya!', diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php index ed4f42c..b56e6e6 100644 --- a/resources/views/homepage/khazanah/home.blade.php +++ b/resources/views/homepage/khazanah/home.blade.php @@ -233,9 +233,6 @@ class="btn btn-info btn-lg btn-block mb-3">Kelulusan {{--
- Bajet -
--}} - {{--
Permohonan
--}}
@@ -275,6 +272,9 @@ Aliran Tunai
+ {{--
+ Bajet +
--}} diff --git a/resources/views/khazanah/bajet.blade.php b/resources/views/khazanah/bajet.blade.php index 1704c1b..60b5e82 100644 --- a/resources/views/khazanah/bajet.blade.php +++ b/resources/views/khazanah/bajet.blade.php @@ -16,9 +16,9 @@
-
+
-
+
Pembiayaan
@@ -47,7 +47,7 @@
-
+
Penebusan
@@ -108,8 +108,8 @@
-
-
+
+
Pembiayaan Bulanan
@@ -117,7 +117,7 @@
-
+
Penebusan Bulanan
diff --git a/resources/views/khazanah/info.blade.php b/resources/views/khazanah/info.blade.php index 753a83f..a13eb6e 100644 --- a/resources/views/khazanah/info.blade.php +++ b/resources/views/khazanah/info.blade.php @@ -1007,7 +1007,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/lelongan/index-khazanah.blade.php b/resources/views/lelongan/index-khazanah.blade.php index 3a63cbe..71c4f23 100644 --- a/resources/views/lelongan/index-khazanah.blade.php +++ b/resources/views/lelongan/index-khazanah.blade.php @@ -250,7 +250,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Maklumat Anda Berjaya Direkodkan!', html: '' + data.nama + '
' + data.nokp + '' @@ -403,7 +403,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/lelongan/index.blade.php b/resources/views/lelongan/index.blade.php index d4c7ee7..aa5b71f 100644 --- a/resources/views/lelongan/index.blade.php +++ b/resources/views/lelongan/index.blade.php @@ -250,7 +250,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Maklumat Anda Berjaya Direkodkan!', html: '' + data.nama + '
' + data.nokp + '' @@ -403,7 +403,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/penebusan/index-khazanah.blade.php b/resources/views/penebusan/index-khazanah.blade.php index 285270d..d920f52 100644 --- a/resources/views/penebusan/index-khazanah.blade.php +++ b/resources/views/penebusan/index-khazanah.blade.php @@ -923,7 +923,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Maklumat Anda Berjaya Direkodkan!', html: '' + data.nama + '
' + data.nokp + '' @@ -988,7 +988,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 543af0b..5f5892b 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -2689,7 +2689,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Maklumat Anda Berjaya Direkodkan!', html: '' + data.nama + '
' + data.nokp + '' @@ -2842,7 +2842,7 @@ allowOutsideClick: false, allowEscapeKey: false, allowEnterKey: false, - confirmButtonText: ' Baik Boss!', + confirmButtonText: ' OK!!', icon: 'success', title: 'Berjaya Mendaftar Wakil Pelanggan!' }).then(function(){ diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index 5082370..2500006 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -272,7 +272,7 @@ @php $counter = 1;$totalpinjamanasalteller = 0;$totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0;$totaljumlahteller = 0; @endphp @endif @else - + {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalnmteller,2) }} {{ number_format($totalpinjamanasalteller,2) }}