fix aliran tunai

This commit is contained in:
MUHD HAFIFIE
2021-05-06 14:01:49 +08:00
parent 771a2b3356
commit 2542ad3ef3
5 changed files with 52 additions and 112 deletions
-53
View File
@@ -854,24 +854,6 @@
text: `Komen : ${data.komen}`
}).then(function(){
$.ajax({
method: 'put',
url: "{{ route('alirantunai.gadai') }}",
async:false,
data:{
'norujukan' : norujukan,
'teller' : teller,
'pinjaman' : pinjaman,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
$(func).attr("onSubmit","return true;");
$(func).submit();
return true;
@@ -989,23 +971,6 @@
title: 'Telah Disahkan'
}).then(function(){
$.ajax({
method: 'put',
url: "{{ route('alirantunai.gadai') }}",
async:false,
data:{
'norujukan' : norujukan,
'teller' : teller,
'pinjaman' : pinjaman,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
$(func).attr("onSubmit","return true;");
$(func).submit();
@@ -1050,24 +1015,6 @@
text: 'Gadaian Berjaya Disimpan'
});
$.ajax({
method: 'put',
url: "{{ route('alirantunai.gadai') }}",
async:false,
data:{
'norujukan' : norujukan,
'teller' : teller,
'pinjaman' : pinjaman,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
$(func).attr("onSubmit","return true;");
$(func).submit();
return true;
+35 -54
View File
@@ -948,33 +948,45 @@
},
success:function(success_data){
$.ajax({
method: 'put',
url: "{{ route('alirantunai.tebus') }}",
async:false,
data:{
'norujukan' : norujukan,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
if(success_data == 1)
{
$.ajax({
method: 'put',
url: "{{ route('alirantunai.tebus') }}",
async:false,
data:{
'norujukan' : norujukan,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
Swal.fire({
icon: 'success',
title: 'Berjaya!',
text: 'Penebusan Berjaya',
}).then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
Swal.fire({
icon: 'success',
title: 'Berjaya!',
text: 'Penebusan Berjaya',
}).then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
}
else{
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'norujukan Sudah Ditebus Di Dalam Table Gadai!',
});
}
}
});
/////////////
//End File//
///////////
@@ -1899,21 +1911,6 @@
},
success:function(success_data){
$.ajax({
method: 'put',
url: "{{ route('alirantunai.tebus') }}",
async:false,
data:{
'norujukan' : norujukan,
"_token": "{{ csrf_token() }}"
},
success:function(data){
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
var urlroute = '{{ route("resit.tebusseparuh", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
@@ -2004,22 +2001,6 @@
var urlroute = '{{ route("resit.tambahpinjam", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
$.ajax({
method: 'put',
url: "{{ route('alirantunai.tebus') }}",
async:false,
data:{
'norujukan' : norujukan,
"_token": "{{ csrf_token() }}"
},
success:function(data){
console.log(data);
}, error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
Swal.fire(
'Berjaya!',
'Tambah Pinjaman Berjaya!',