fix hapus auto tawarruq and add 2 decimal places in customer info

This commit is contained in:
Hafifie PKB
2023-12-30 14:29:36 +08:00
parent 10f2f4c6cd
commit bca4a13ac7
2 changed files with 44 additions and 34 deletions
+28 -19
View File
@@ -852,7 +852,7 @@
'RM '+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['tempoh'],
'RM '+ upahsemasa,
'RM '+ formatter.format(upahsemasa),
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
]).draw();
}else{
@@ -895,7 +895,7 @@
'RM '+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['tempoh'],
'RM '+ upahsemasa['pendapatan'],
'RM '+ formatter.format(upahsemasa['pendapatan']),
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
]).draw();
}
@@ -2217,23 +2217,32 @@
url: api_url + '/api/gadai/hapus/' + kodcaw + '/' + id,
data: { 'kodlaluan' : teller },
success:function(data){
$.ajax({
method:'put',
url: api_url + '/api/komuditi/batal',
dataType:'json',
data:{
norujukan: hapusid
},
success:function(batalkomuditi){
swalWithBootstrapButtons.fire(
'Hapus!',
'Maklumat gadaian telah dihapuskan.',
'success'
).then(function(){
location.reload();
});
}
})
swalWithBootstrapButtons.fire(
'Hapus!',
'Maklumat gadaian telah dihapuskan.',
'success'
).then(function(){
location.reload();
});
// $.ajax({
// method:'put',
// url: api_url + '/api/komuditi/batal',
// dataType:'json',
// data:{
// norujukan: hapusid
// },
// success:function(batalkomuditi){
// swalWithBootstrapButtons.fire(
// 'Hapus!',
// 'Maklumat gadaian telah dihapuskan.',
// 'success'
// ).then(function(){
// location.reload();
// });
// }
// })
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);