Fix conflict
This commit is contained in:
@@ -797,6 +797,27 @@
|
||||
}
|
||||
else{
|
||||
if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
|
||||
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
//insert code asal
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
@@ -919,7 +940,34 @@
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
//end insert code asal
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
}else if(pinjaman > Number(pembiayaan_max_teller)){
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
//insert code asal
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
@@ -1038,8 +1086,34 @@
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
//end insert code asal
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
}
|
||||
else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Berjaya!',
|
||||
@@ -1049,6 +1123,14 @@
|
||||
$(func).attr("onSubmit","return true;");
|
||||
$(func).submit();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1169,6 +1169,26 @@
|
||||
}
|
||||
else{
|
||||
if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
//insert code asal
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
@@ -1291,7 +1311,34 @@
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
//end insert code asal
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
}else if(pinjaman > Number(pembiayaan_max_teller)){
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
//insert code asal
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
@@ -1410,8 +1457,35 @@
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
//end insert code asal
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
}
|
||||
else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
|
||||
//new added
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + kodcaw + '/' + norujukan,
|
||||
|
||||
success:function(data)
|
||||
{
|
||||
var checking = Object.keys(data[0]).length;
|
||||
|
||||
if (data[0]['pinjaman'] > 0) {
|
||||
$("#terima_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Tidak Berjaya',
|
||||
text: 'Maklumat Gadaian Telah Wujud. Sila Tekan Batal.'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
//insert code asal
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Berjaya!',
|
||||
@@ -1421,6 +1495,15 @@
|
||||
$(func).attr("onSubmit","return true;");
|
||||
$(func).submit();
|
||||
return true;
|
||||
//end insert code asal
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//end new added
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user