From a595ed0b82af07dcbd516b9fc197086c1d5dda54 Mon Sep 17 00:00:00 2001 From: Amir Hamzan <62345746+amirhamzan@users.noreply.github.com> Date: Mon, 29 Nov 2021 17:03:20 +0800 Subject: [PATCH] update pembayaran --- app/Http/Controllers/BayaranController.php | 6 +- public/css/material-kit.css | 2 +- .../includes/bayaran/pembayaransag.blade.php | 576 ++++++++----- .../bayaran/senaraibayaransag.blade.php | 356 ++++++-- .../views/includes/main/footerdark.blade.php | 22 +- .../views/includes/main/footerwhite.blade.php | 2 +- resources/views/includes/main/head.blade.php | 3 +- resources/views/pembayaran/checkout.blade.php | 774 +++++++++--------- 8 files changed, 1065 insertions(+), 676 deletions(-) diff --git a/app/Http/Controllers/BayaranController.php b/app/Http/Controllers/BayaranController.php index e7d5c86..8c6ab7b 100644 --- a/app/Http/Controllers/BayaranController.php +++ b/app/Http/Controllers/BayaranController.php @@ -47,7 +47,8 @@ class BayaranController extends Controller } - return view('pembayaran.senaraibayaran', compact('belum_tebus')); + // return view('pembayaran.senaraibayaran', compact('belum_tebus')); + return view('includes.bayaran.senaraibayaransag', compact('belum_tebus')); } public function PembayaranAction(Request $request) @@ -68,7 +69,8 @@ class BayaranController extends Controller } - return view('pembayaran.checkout',compact('arraybayar')); + // return view('pembayaran.checkout',compact('arraybayar')); + return view('includes.bayaran.pembayaransag',compact('arraybayar')); } public function PembayaranEngine(Request $request) diff --git a/public/css/material-kit.css b/public/css/material-kit.css index fae701a..248f055 100644 --- a/public/css/material-kit.css +++ b/public/css/material-kit.css @@ -6089,7 +6089,7 @@ fieldset:disabled .btn { } .alert-danger { - color: #922820; + color: #fff; background-color: #fdd9d7; border-color: #fcc7c2; } diff --git a/resources/views/includes/bayaran/pembayaransag.blade.php b/resources/views/includes/bayaran/pembayaransag.blade.php index fc4a369..22f5bec 100644 --- a/resources/views/includes/bayaran/pembayaransag.blade.php +++ b/resources/views/includes/bayaran/pembayaransag.blade.php @@ -4,225 +4,229 @@ Bayar SAG | Customer Portal
-
- -
-
-
-
-
-
-
-

Senarai Surat Gadaian

-
- -
-
+
+ @csrf +
+ +
+ +
+
+
+
+
+
+

Senarai Surat Gadaian

+
- - -
-
-
- - - - - - - - - - - - - - {{-- @php $counter = 1;$jenisbayaran = 'arrahn'; @endphp + + +
+ +
+ +
+
No.No RujukanPembiayaanTempoh SimpanUpah telah bayarUpah semasaBayaran
+ + + + + + + + + + + + + @php $counter = 1;$jenisbayaran = 'arrahn'; @endphp + @foreach($arraybayar as $index=>$bayar) + @if($bayar['hargajualan'] == '') + @php + $koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); + @endphp + + + + + + + + + + @php $counter++; @endphp + @endif + @endforeach + +
No.No RujukanPembiayaanTempoh SimpanUpah telah bayarUpah semasaBayaran
+ {{ $counter }} + + {{ $bayar['norujukan'] }} + + {{ number_format($bayar['pinjaman'],2) }} + + {{ number_format($bayar['tempoh'],2) }} + + {{ number_format($bayar['telahbayar'],2) }} + + {{ number_format($koskeuntungan,2) }} + + + + + + + + + + + +
+
+
+ +
+ +
+ + + + + + + + + + + + + @php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp @foreach($arraybayar as $index=>$bayar) - @if($bayar['hargajualan'] == '') - @php - $koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); - @endphp - - - - - - - - + + + + + + + + - - {{-- @php $counter++; @endphp - @endif --}} - {{-- @endforeach --}} - -
NoNo RujukanPembiayaan AsalB. PembiayaanTempohKeuntunganBayaran
- {{ $counter }} - - {{ $bayar['norujukan'] }} - - {{ number_format($bayar['pinjaman'],2) }} - - {{ number_format($bayar['tempoh'],2) }} - - {{ number_format($bayar['telahbayar'],2) }} - - {{ number_format($koskeuntungan,2) }} - - + @if($bayar['hargajualan'] != '') +
+ {{ $counter }} + + {{ $bayar['norujukan'] }} + + {{ number_format($bayar['pinjaman'],2) }} + + {{ number_format($bayar['bakipjm'],2) }} + + {{ $bayar['tempoh'] }} + + @php + $upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); + @endphp + {{ $upahtawarruq }} + - {{-- + - - - - - - --}} -
-
-
+ -
+ + + + + + + + @php $counter++; @endphp + @endif + @endforeach + +
-
- - - - - - - - - - - - - {{-- @php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp - @foreach($arraybayar as $index=>$bayar) - @if($bayar['hargajualan'] != '') - - - - - - - - - - - - @php $counter++; @endphp - @endif - @endforeach --}} -
NoNo RujukanPembiayaan AsalB. PembiayaanTempohKeuntunganBayaran
- {{ $counter }} - - {{ $bayar['norujukan'] }} - - {{ number_format($bayar['pinjaman'],2) }} - - {{ number_format($bayar['bakipjm'],2) }} - - {{ $bayar['tempoh'] }} - - @php - $upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); - @endphp - {{ $upahtawarruq }} - - - - - - - - - -
-
-
-
-
-
-
-
-
-

Ringkasan Pembayaran

+
+
+
+
+
+

Ringkasan Pembayaran

+
+
+ +
+
-
- +
+ +
+ +
+
+ +
+ +
+ RM 0.00 +

-
-
-
+
+
+ +
-
-
- +
+ RM 0.00 +
- -
- RM 0.00 -
-
-
- -
-
- -
- -
- RM 0.00 -
-
-
+
- {{--
+ {{--
@@ -234,27 +238,189 @@
--}} -
-
- -
+
+
+ +
-
- RM 0.00 +
+ RM 0.00 +
+
-
- -
- +
+ +
-
+
+ @endsection \ No newline at end of file diff --git a/resources/views/includes/bayaran/senaraibayaransag.blade.php b/resources/views/includes/bayaran/senaraibayaransag.blade.php index f1e2154..7e37c83 100644 --- a/resources/views/includes/bayaran/senaraibayaransag.blade.php +++ b/resources/views/includes/bayaran/senaraibayaransag.blade.php @@ -3,6 +3,28 @@ @section('content') @include('modal.marhun') +@error('chkboxsag') + +@enderror + Pembayaran | Customer Portal
@@ -20,12 +42,12 @@ + + +@endsection + +@push('js') + + +@endpush \ No newline at end of file diff --git a/resources/views/includes/main/footerdark.blade.php b/resources/views/includes/main/footerdark.blade.php index 8b1c06c..04c35f7 100644 --- a/resources/views/includes/main/footerdark.blade.php +++ b/resources/views/includes/main/footerdark.blade.php @@ -157,7 +157,25 @@ \ No newline at end of file diff --git a/resources/views/includes/main/footerwhite.blade.php b/resources/views/includes/main/footerwhite.blade.php index 19f9adf..f027c6e 100644 --- a/resources/views/includes/main/footerwhite.blade.php +++ b/resources/views/includes/main/footerwhite.blade.php @@ -164,7 +164,7 @@ var scrollPosition = window.pageYOffset; var bgParallax = document.querySelector('.page-header'); var oVal = (window.scrollY / 3); - bgParallax.style.transform = 'translate3d(0,' + oVal + 'px,0)'; + // bgParallax.style.transform = 'translate3d(0,' + oVal + 'px,0)'; }, 6); } \ No newline at end of file diff --git a/resources/views/includes/main/head.blade.php b/resources/views/includes/main/head.blade.php index 0e962ee..15d0f25 100644 --- a/resources/views/includes/main/head.blade.php +++ b/resources/views/includes/main/head.blade.php @@ -24,4 +24,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/resources/views/pembayaran/checkout.blade.php b/resources/views/pembayaran/checkout.blade.php index 5df2622..5afc01c 100644 --- a/resources/views/pembayaran/checkout.blade.php +++ b/resources/views/pembayaran/checkout.blade.php @@ -1,238 +1,238 @@ @extends('layouts.app') @section('content') - @include('layouts.headers.cards') +@include('layouts.headers.cards') - -
-
-
-
-
+ +
+
+
+
+
- -
-
+
- -
+
+
+ +
-
- @csrf + + @csrf -
-
-
-
-
-
-

Senarai Surat Gadaian

-
-
- -
-
-
- - - -
-
- -
- - - - - - - - - - - - - - @php $counter = 1;$jenisbayaran = 'arrahn'; @endphp - @foreach($arraybayar as $index=>$bayar) - @if($bayar['hargajualan'] == '') - @php - $koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); - @endphp - - - - - - - - - - @php $counter++; @endphp - @endif - @endforeach - -
No.No RujukanPembiayaanTempoh SimpanUpah telah bayarUpah semasaBayaran
- {{ $counter }} - - {{ $bayar['norujukan'] }} - - {{ number_format($bayar['pinjaman'],2) }} - - {{ number_format($bayar['tempoh'],2) }} - - {{ number_format($bayar['telahbayar'],2) }} - - {{ number_format($koskeuntungan,2) }} - - - - - - - - - - - -
-
-
- -
- -
- - - - - - - - - - - - - @php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp - @foreach($arraybayar as $index=>$bayar) - @if($bayar['hargajualan'] != '') - - - - - - - - - - - - @php $counter++; @endphp - @endif - @endforeach -
NoNo RujukanPembiayaan AsalB. PembiayaanTempohKeuntunganBayaran
- {{ $counter }} - - {{ $bayar['norujukan'] }} - - {{ number_format($bayar['pinjaman'],2) }} - - {{ number_format($bayar['bakipjm'],2) }} - - {{ $bayar['tempoh'] }} - - @php - $upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); - @endphp - {{ $upahtawarruq }} - - - - - - - - - - -
-
- - -
- -
+
+
+
+
+
+
+

Senarai Surat Gadaian

+
+ +
+
- -
-
-
-
-
-

Ringkasan Pembayaran

-
-
- -
-
-
-
- -
+ -
-
- -
+
+
-
- RM 0.00 -
-
-
+
+ + + + + + + + + + + + + + @php $counter = 1;$jenisbayaran = 'arrahn'; @endphp + @foreach($arraybayar as $index=>$bayar) + @if($bayar['hargajualan'] == '') + @php + $koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); + @endphp + + + + + + + + + + @php $counter++; @endphp + @endif + @endforeach + +
No.No RujukanPembiayaanTempoh SimpanUpah telah bayarUpah semasaBayaran
+ {{ $counter }} + + {{ $bayar['norujukan'] }} + + {{ number_format($bayar['pinjaman'],2) }} + + {{ number_format($bayar['tempoh'],2) }} + + {{ number_format($bayar['telahbayar'],2) }} + + {{ number_format($koskeuntungan,2) }} + + -
-
- -
+ -
- RM 0.00 -
-
-
+ + + + + + +
+
+
+ +
+ +
+ + + + + + + + + + + + + @php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp + @foreach($arraybayar as $index=>$bayar) + @if($bayar['hargajualan'] != '') + + + + + + + + + + + + @php $counter++; @endphp + @endif + @endforeach +
NoNo RujukanPembiayaan AsalB. PembiayaanTempohKeuntunganBayaran
+ {{ $counter }} + + {{ $bayar['norujukan'] }} + + {{ number_format($bayar['pinjaman'],2) }} + + {{ number_format($bayar['bakipjm'],2) }} + + {{ $bayar['tempoh'] }} + + @php + $upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json(); + @endphp + {{ $upahtawarruq }} + + + + + + + + + + +
+
- {{--
+
+ +
+
+
+ + +
+
+
+
+
+

Ringkasan Pembayaran

+
+
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+ RM 0.00 +
+
+
+ +
+
+ +
+ +
+ RM 0.00 +
+
+
+ + + {{--
@@ -244,198 +244,192 @@
--}} -
-
- -
- -
- RM 0.00 -
-
-
- +
+
+
- -
- +
+ RM 0.00
+
- + +
+ +
+
+
+ +
- + sum = sumarrahn + sumtawarruq; -@endsection + if (counterrorbayar > 0) { + $("#bayarsbmt").prop('disabled', true); + } else { + $("#bayarsbmt").prop('disabled', false); + } + + $("#spanbayaranarrahn").text(sumarrahn.toFixed(2)); + $("#spanbayarantawarruq").text(sumtawarruq.toFixed(2)); + $('#spanjumlah').text(formatter.format(sum)); + } + + if (document.addEventListener) { + window.addEventListener('pageshow', function(event) { + if (event.persisted || window.performance && window.performance.navigation.type == 2) { + $('#logout-form').submit(); + // location.reload(); + } + }, + false); + } + + +@endsection \ No newline at end of file