ggwp
This commit is contained in:
@@ -607,6 +607,7 @@
|
||||
});
|
||||
|
||||
function verifyGadai(func){
|
||||
$("#terima_gadai").prop('disabled', true);
|
||||
event.preventDefault();
|
||||
var kodcaw = $('#kodcaw').val();
|
||||
var nokp = $('#nokp').val();
|
||||
@@ -624,6 +625,7 @@
|
||||
var max_pinjaman = nilai_marhun_total * 0.80;
|
||||
|
||||
if($.isNumeric(pinjaman) == false){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -633,6 +635,7 @@
|
||||
return false;
|
||||
}
|
||||
if(pinjaman < min_pinjaman){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -641,6 +644,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else if(pinjaman > max_pinjaman){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -655,6 +659,7 @@
|
||||
success:function(data){
|
||||
var check_komuditi = Object.keys(data).length;
|
||||
if(check_komuditi == 0){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Unit Komuditi Berbaki Minumum',
|
||||
@@ -664,6 +669,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if(Number(data['unit_komuditi']) < pinjaman){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Baki Unit Komuditi Tidak Mencukupi',
|
||||
@@ -690,11 +696,11 @@
|
||||
}
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Daripada Operasi?',
|
||||
title: 'Dapatkan Pengesahan Operasi',
|
||||
text: errortext,
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Setuju!',
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
@@ -754,7 +760,7 @@
|
||||
clearInterval(timerInterval);
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Menerima Pengesahan'
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
$(func).attr("onSubmit","return true;");
|
||||
$(func).submit();
|
||||
@@ -769,6 +775,7 @@
|
||||
});
|
||||
}, 3000);
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Batal',
|
||||
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
||||
@@ -788,11 +795,11 @@
|
||||
});
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Daripada Khazanah?',
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Setuju!',
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
@@ -853,7 +860,7 @@
|
||||
clearInterval(timerInterval);
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Menerima Pengesahan'
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
|
||||
$(func).attr("onSubmit","return true;");
|
||||
@@ -870,6 +877,7 @@
|
||||
});
|
||||
}, 3000);
|
||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Batal',
|
||||
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
||||
|
||||
Reference in New Issue
Block a user