Fix conflict
This commit is contained in:
@@ -797,6 +797,27 @@
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
|
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({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
confirmButton: 'btn btn-success',
|
confirmButton: 'btn btn-success',
|
||||||
@@ -919,7 +940,34 @@
|
|||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
//end insert code asal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
}else if(pinjaman > Number(pembiayaan_max_teller)){
|
}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({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
confirmButton: 'btn btn-success',
|
confirmButton: 'btn btn-success',
|
||||||
@@ -1038,8 +1086,34 @@
|
|||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
//end insert code asal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
|
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({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Berjaya!',
|
title: 'Berjaya!',
|
||||||
@@ -1049,6 +1123,14 @@
|
|||||||
$(func).attr("onSubmit","return true;");
|
$(func).attr("onSubmit","return true;");
|
||||||
$(func).submit();
|
$(func).submit();
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1169,6 +1169,26 @@
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
|
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({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
confirmButton: 'btn btn-success',
|
confirmButton: 'btn btn-success',
|
||||||
@@ -1291,7 +1311,34 @@
|
|||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
//end insert code asal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
}else if(pinjaman > Number(pembiayaan_max_teller)){
|
}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({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
confirmButton: 'btn btn-success',
|
confirmButton: 'btn btn-success',
|
||||||
@@ -1410,8 +1457,35 @@
|
|||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
//end insert code asal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
|
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({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Berjaya!',
|
title: 'Berjaya!',
|
||||||
@@ -1421,6 +1495,15 @@
|
|||||||
$(func).attr("onSubmit","return true;");
|
$(func).attr("onSubmit","return true;");
|
||||||
$(func).submit();
|
$(func).submit();
|
||||||
return true;
|
return true;
|
||||||
|
//end insert code asal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//end new added
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user