fix skit2

This commit is contained in:
hafifierahman
2021-02-28 10:03:26 +08:00
parent c3b2c027cc
commit dfcf7c2e4a
10 changed files with 214 additions and 17 deletions
+3 -1
View File
@@ -155,8 +155,9 @@
</tr>
</thead>
<tbody>
<tr>
@if(is_object($gadai_tebus) && is_array($gadai_tebus))
@foreach($gadai_tebus as $gt)
<tr>
<td> {{ $loop->iteration }} </td>
<td> {{ $gt['norujukan'] }} </td>
<td> {{ $gt['pinjaman'] }} </td>
@@ -169,6 +170,7 @@
@endphp </td>
</tr>
@endforeach
@endif
</tbody>
</table>
+3
View File
@@ -611,6 +611,8 @@
var counter = 1;
historytebusbayaran.clear().draw();
console.table(data);
$.each(data,function(index,tebusaz){
switch(tebusaz['jenistebus']) {
@@ -637,6 +639,7 @@
counter,
tebusaz['norujukan'],
tebusaz['jenistebus'],
tebusaz['pinjaman'],
tebusaz['jbg'],
tebusaz['t_tebus'],
'<a class="btn btn-info" target="_blank" href='+ urlroute +'>Cetak</a>'
+56
View File
@@ -802,6 +802,25 @@
title: 'Telah Disahkan',
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;
@@ -918,6 +937,24 @@
icon: 'success',
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();
@@ -961,6 +998,25 @@
title: 'Berjaya!',
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;
@@ -54,6 +54,7 @@
<th>Bil</th>
<th>No Rujukan</th>
<th>Jenis Tebus</th>
<th>Pembiayaan Asal</th>
<th>JBG</th>
<th>Tarikh Tebus</th>
<th>Action</th>
+53 -4
View File
@@ -803,11 +803,26 @@
},
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);
}
});
Swal.fire({
icon: 'success',
title: 'Berjaya!',
text: 'Penebusan Berjaya',
}).then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ url()->previous() }}");
@@ -1118,6 +1133,23 @@
},
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);
}
});
var urlroute = '{{ route("resit.tebusseparuh", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
@@ -1227,9 +1259,9 @@
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan',
text: `Komen : ${data.komen}`
icon: 'success',
title: 'Telah Disahkan',
text: `Komen : ${data.komen}`
}).then(function(){
tambahpinjamanfunc();
});
@@ -1386,6 +1418,7 @@
return false;
}
tambahpinjamanfunc();
}
}
@@ -1460,6 +1493,22 @@
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!',