pukal
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<div class="input-group my-3">
|
||||
<input type="text" class="form-control" id="noic" name="noic" placeholder="No Kad Pengenalan Pelanggan" aria-label="No Kad Pengenalan Pelanggan" autocomplete="off" value="{{$search == false ? '' : $noic ?? ''}}" aria-describedby="button-addon2">
|
||||
<div class="input-group-append">
|
||||
<select class="form-select" id="customerIDType" name="customerIDType">
|
||||
<select class="form-select" id="customerIDType" name="customerIDType" class="form-control">
|
||||
<option value="nokp" {{ $idtype == 'nokp' ? 'selected' : ''}}>Kad Pengenalan</option>
|
||||
<option value="passport" {{ $idtype == 'passport' ? 'selected' : ''}}>Passport</option>
|
||||
</select>
|
||||
@@ -526,7 +526,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
if(customerphone.length < 8 && customerphone.length > 12){
|
||||
if(!(customerphone.length < 9 && customerphone.length >= 12)){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -653,7 +653,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
if(customerphone.length < 8 && customerphone.length > 12){
|
||||
if(customerphone.length <= 9 && customerphone.length >= 12){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -674,7 +674,7 @@
|
||||
}
|
||||
}
|
||||
if(customerphone_alternate != ''){
|
||||
if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){
|
||||
if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -821,11 +821,11 @@
|
||||
|
||||
return leapYearCount;
|
||||
}
|
||||
|
||||
var regex = /^[a-zA-Z0-9]+$/g;
|
||||
|
||||
function verifynokp(){
|
||||
var id_type = $('#customerIDType').val();
|
||||
var nokp = $('#noic').val();
|
||||
|
||||
if(id_type=='nokp'){
|
||||
if($.isNumeric(nokp) == false){
|
||||
Swal.fire({
|
||||
@@ -864,6 +864,15 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if(regex.test(nokp) == false){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa Passport Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -306,7 +306,6 @@
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Kos Keuntungan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -325,7 +324,6 @@
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Kos Keuntungan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -342,7 +340,6 @@
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Kos Keuntungan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -377,7 +374,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
if(Number(data['unit_komuditi']) < 5000){
|
||||
if(Number(data['unit_komuditi']) < 10000){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Unit Komuditi Berbaki Minumum',
|
||||
@@ -431,8 +428,7 @@
|
||||
'RM '+formatter.format(gadai_detail['pinjaman']),
|
||||
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
|
||||
gadai_detail['jbg'],
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg'])),
|
||||
'RM ' + formatter.format(((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['pinjaman'])).toFixed(2))
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg']))
|
||||
]).draw();
|
||||
}else if(jenistebus == "sudah_tebus"){
|
||||
|
||||
@@ -445,8 +441,7 @@
|
||||
'RM '+formatter.format(gadai_detail['pinjaman']),
|
||||
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
|
||||
gadai_detail['jbg'],
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg'])),
|
||||
'RM ' + formatter.format(((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['pinjaman'])).toFixed(2))
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg']))
|
||||
]).draw();
|
||||
}else if(jenistebus == "lelong"){
|
||||
|
||||
@@ -459,8 +454,7 @@
|
||||
'RM '+formatter.format(gadai_detail['pinjaman']),
|
||||
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
|
||||
gadai_detail['jbg'],
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg'])),
|
||||
'RM ' + formatter.format(((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['pinjaman'])).toFixed(2))
|
||||
'RM '+ formatter.format((Number(gadai_detail['kadarupah'])/100)*Number(gadai_detail['bakipjm'])*Number(gadai_detail['jbg']))
|
||||
]).draw();
|
||||
}
|
||||
counter = counter + 1;
|
||||
@@ -483,7 +477,6 @@
|
||||
method:"GET",
|
||||
url: api_url + "/api/customers/"+noic+"/gadai/belum_tebus/"+kodcaw,
|
||||
success: function(data){
|
||||
console.log(data);
|
||||
$('#myTable').parents('div.dataTables_wrapper').first().show();
|
||||
gadaiTable(data,"belum_tebus");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user