disabled maklumat keuntungan and hapus ansuran dan fixed bug nokp more than 13 have special characters.
This commit is contained in:
@@ -1220,22 +1220,29 @@
|
||||
var nokp = $('#noic').val();
|
||||
if(id_type=='nokp'){
|
||||
if($.isNumeric(nokp) == false){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
if(nokp.substr(-1) != '*')
|
||||
{
|
||||
console.log('ada special characters');
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(nokp.length != 12){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa No KP Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
if(nokp.substr(-1) != '*')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa No KP Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}else if(id_type=='passport'){
|
||||
// if(nokp.length < 5){
|
||||
@@ -1282,4 +1289,4 @@
|
||||
<script src="{{ asset('js/postcode-concerns.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@endsection
|
||||
@endsection
|
||||
@@ -246,7 +246,7 @@
|
||||
<button class="btn btn-primary" onclick="ubahfunc(this)" id="button-edit-gadaian">Ubah</button>
|
||||
<button class="btn btn-primary" onclick="hapusfunc()">Hapus</button>
|
||||
<button class="btn btn-primary" onclick="histfunc()">Rekod Gadaian</button>
|
||||
<button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button>
|
||||
{{-- <button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button> --}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -70,14 +70,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{-- <div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
<button class="btn btn-primary" onclick="funcTU()">Tanya Upah</button>
|
||||
<button class="btn btn-primary" onclick="funcTU()">Maklumat Keuntungan</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -90,11 +90,11 @@
|
||||
<div class="col-8">
|
||||
<select class="form-control" id="sltjenistebus">
|
||||
<option value="T">T = Tebus</option>
|
||||
@if($gadai['tagbaru'] == 1)
|
||||
<option value="A" {{ $gadai['tempoh'] >= 12 ? 'disabled' : '' }}>A = Ansuran</option>
|
||||
@if($gadai['tagbaru'] == 1)
|
||||
<option value="S">S = Sebahagian</option>
|
||||
<option value="P">P = Tambah Pembiayaan</option>
|
||||
@endif
|
||||
{{-- <option value="S">S = Separuh</option> --}}
|
||||
{{-- <option value="P">P = Tambah Pembiayaan</option> --}}
|
||||
<option value="AT">PS = Pembiayaan Semula</option>
|
||||
<option value="" disabled hidden>Pilih Jenis Tebus</option>
|
||||
</select>
|
||||
@@ -935,7 +935,7 @@
|
||||
</div>
|
||||
|
||||
<div id="jenisTU" class="col-12 form-group row">
|
||||
<div class="col-12 mb-4"> <h2 class="center m-auto text-center text-primary">Tanya Upah</h2></div>
|
||||
<div class="col-12 mb-4"> <h2 class="center m-auto text-center text-primary">MAKLUMAT KEUNTUNGAN</h2></div>
|
||||
<div class="col-6" id="date">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
@@ -947,7 +947,7 @@
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
TEMPOH JANAAN
|
||||
TEMPOH GADAIAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="tempohjanaan" name="tempohjanaan" class="form-control" readonly/>
|
||||
@@ -3546,7 +3546,7 @@ var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
wakil = wakil.replace(patternregex,"").toUpperCase();
|
||||
|
||||
if(wakil.length <= 12)
|
||||
if(wakil.length <= 12 || (wakil.substr(-1) == '*' && wakil.length == 13))
|
||||
{
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
@@ -3595,7 +3595,7 @@ else
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
titleText: 'Kad Pengenalan dan Passport',
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan'
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 13 patah perkataan termasuk (*)'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4373,4 +4373,4 @@ return true;
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@endsection
|
||||
@@ -249,13 +249,12 @@
|
||||
<td>{{ number_format($item['kadarupah'],2) }}</td>
|
||||
<td>{{ number_format($item['tempohblmbyar'],2) }}</td>
|
||||
<td>{{ number_format($item['upahblmbyar'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman']* 0.01,2) }}</td>
|
||||
|
||||
@if($item['ujrah'] ='0.00')
|
||||
<td>{{ number_format($item['utgonepercent'],2) }}</td>
|
||||
{{-- @if($item['ujrah'] != '0.00') --}}
|
||||
|
||||
<td> {{ number_format($item['ujrah'],2) }} </td>
|
||||
|
||||
@endif
|
||||
{{-- @endif --}}
|
||||
|
||||
<td>{{$item['lanjutan']}}</td>
|
||||
</tr>
|
||||
@@ -268,8 +267,10 @@
|
||||
<th>{{ number_format($stokaudit['totalpinjaman'],2) }}</th>
|
||||
<th>{{ number_format($stokaudit['totalbakipjm'],2) }}</th>
|
||||
<th></th>
|
||||
|
||||
<th></th>
|
||||
<th>{{ number_format($stokaudit['totaltunggakan'],2) }}</th>
|
||||
<th>{{ number_format($stokaudit['totalonepercent'],2) }}</th>
|
||||
<th>{{ number_format($stokaudit['totalujrah'],2) }}</th>
|
||||
<th></th>
|
||||
|
||||
</tfoot>
|
||||
@@ -297,4 +298,4 @@
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
@@ -225,6 +225,8 @@
|
||||
<th>Kadar Upah</th>
|
||||
<th>Tempoh Belum Bayar</th>
|
||||
<th>Keuntungan Belum Bayar (RM)</th>
|
||||
<th>Ujrah (RM)</th>
|
||||
<th>Keuntungan 1% (RM)</th>
|
||||
<th>Lanjutan</th>
|
||||
</thead>
|
||||
@php $counter = 1;$totalpinjaman = 0; @endphp
|
||||
@@ -244,6 +246,8 @@
|
||||
<td>{{ number_format($item['kadarupah'],2) }}</td>
|
||||
<td>{{ number_format($item['tempoh'] - $item['tempohbayar'],2) }}</td>
|
||||
<td>{{ number_format($item['tunggakan'],2) }}</td>
|
||||
<td>{{ number_format($item['tunggakanujrah'],2) }}</td>
|
||||
<td>{{ number_format($item['tunggakanonepercent'],2) }}</td>
|
||||
{{-- <td>{{ number_format($item['pinjaman'],2) }}</td> --}}
|
||||
<td>{{$item['lelong_tawarruq']}}</td>
|
||||
</tr>
|
||||
@@ -258,6 +262,8 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>{{ number_format($stokaudit_aktif['totaltunggakan'],2) }}</th>
|
||||
<th>{{ number_format($stokaudit_aktif['totalujrah'],2) }}</th>
|
||||
<th>{{ number_format($stokaudit_aktif['totalonepercent'],2) }}</th>
|
||||
<th></th>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user