fix hapus auto tawarruq and add 2 decimal places in customer info
This commit is contained in:
@@ -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,14 +2217,7 @@
|
||||
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.',
|
||||
@@ -2232,8 +2225,24 @@
|
||||
).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);
|
||||
|
||||
@@ -2273,7 +2273,8 @@
|
||||
var marginsemasa = (jenisAT == 'hargalama') ? pinjaman_baru/nm * 100 : pinjaman_baru/nmsemasa * 100;
|
||||
|
||||
let texting = (jenisAT != 'hargalama') ? 'Bayaran harus melebihi keuntungan dan jumlah lebihan margin' : 'Bayaran harus melebihi keuntungan';
|
||||
if(parseFloat($('#perludibayarAT').val()) < parseFloat(total.toFixed(2))){
|
||||
|
||||
if(parseFloat($('#perludibayarAT').val().replace(/[^0-9.-]+/g,"")) < parseFloat(total.toFixed(2))){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Ralat Bayaran!',
|
||||
|
||||
Reference in New Issue
Block a user