diff --git a/resources/views/aliran_tunai/index.blade.php b/resources/views/aliran_tunai/index.blade.php index fc2b555..8feb5d6 100644 --- a/resources/views/aliran_tunai/index.blade.php +++ b/resources/views/aliran_tunai/index.blade.php @@ -142,15 +142,15 @@ - - + + @@ -438,7 +438,7 @@ diff --git a/resources/views/gadaian/v2/index.blade.php b/resources/views/gadaian/v2/index.blade.php index 7cfb189..92ab7cb 100644 --- a/resources/views/gadaian/v2/index.blade.php +++ b/resources/views/gadaian/v2/index.blade.php @@ -96,7 +96,7 @@
- Pembiayaan Max + Pembiayaan Maks
@@ -166,7 +166,7 @@
- Pembiayaan Max Pelulus + Pembiayaan Maks Pelulus
diff --git a/resources/views/harga_emas/index.blade.php b/resources/views/harga_emas/index.blade.php index 592ca22..26fcfaa 100644 --- a/resources/views/harga_emas/index.blade.php +++ b/resources/views/harga_emas/index.blade.php @@ -18,7 +18,7 @@ - + {{-- --}} @@ -27,7 +27,7 @@ @foreach($harga_emas as $harga) - + {{-- --}} diff --git a/resources/views/penebusan/v2/index.blade.php b/resources/views/penebusan/v2/index.blade.php index eefeece..7741f73 100644 --- a/resources/views/penebusan/v2/index.blade.php +++ b/resources/views/penebusan/v2/index.blade.php @@ -310,7 +310,7 @@ DUIT PELANGGAN (RM)
- +
@@ -3545,6 +3545,44 @@ function validateFloatKeyPressAT(el, evt) { return true; } +function validateFloatKeyPressDuitPelanggan(el, evt) { + + var charCode = (evt.which) ? evt.which : event.keyCode; + var number = el.value; + let keypress = evt.key; + + // Split the current value by dot to check the number of decimal places + var numberParts = number.split('.'); + + // Check if the pressed key is a valid character for a floating-point number + if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) { + return false; + } + + // Check if there is already a dot, and the pressed key is another dot + if (numberParts.length > 1 && charCode == 46) { + return false; + } + + // Get the caret position in the input field + var caratPos = getSelectionStart(el); + + // Get the position of the existing dot + var dotPos = el.value.indexOf("."); + + // Check if the caret is after the existing dot, and there are more than 2 digits after the dot + if (caratPos > dotPos && dotPos > -1 && (numberParts[1] && numberParts[1].length > 1)) { + return false; + } + + // If the last digit is not 5 or 0, disallow the input + if (numberParts[1] && numberParts[1].length === 1 && !['0', '5'].includes(keypress)) { + return false; + } + + return true; + } + function getSelectionStart(o) { if (o.createTextRange) { var r = document.selection.createRange().duplicate()
BilBilMutu Emas Karat Harga/Gram
{{ $harga['recno'] }}{{ $harga['recno'] }}{{ $harga['keterangan'] }} {{ $harga['karat'] }} {{ number_format($harga['harga'],2) }}