Merged in izzati-hotfix-lastbayar-arcc (pull request #196)

tambah column tarikh pembayaran terakhir di arcc
This commit is contained in:
izzati zulkifli
2024-10-22 02:39:25 +00:00
+17 -8
View File
@@ -9,7 +9,7 @@
@section('content') @section('content')
@include('modal.historytebus') @include('modal.historytebus')
@include('modal.wakil') @include('modal.wakil')
<div class="container"> <div class="container-fluid">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12 col-lg-12"> <div class="col-md-12 col-lg-12">
@@ -175,6 +175,7 @@
<th>Tempoh</th> <th>Tempoh</th>
<th>Keuntungan</th> <th>Keuntungan</th>
<th>Lelong</th> <th>Lelong</th>
<th>Pembayaran Terakhir</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -203,6 +204,7 @@
<th>Tempoh</th> <th>Tempoh</th>
<th>Keuntungan</th> <th>Keuntungan</th>
<th>Lelong</th> <th>Lelong</th>
<th>Pembayaran Terakhir</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -758,6 +760,7 @@
if(gadai_detail["tagbaru"] == 0){ if(gadai_detail["tagbaru"] == 0){
$('#textnavsag').addClass('text-danger'); $('#textnavsag').addClass('text-danger');
var taglel = ''; var taglel = '';
var lastbayar = '';
if(gadai_detail['taglel'] == 1){ if(gadai_detail['taglel'] == 1){
if(tagarrahnbid == 1){ if(tagarrahnbid == 1){
$.ajax({ $.ajax({
@@ -767,6 +770,8 @@
success: function(data){ success: function(data){
taglel = data.lelong.t_lelong; taglel = data.lelong.t_lelong;
console(taglel);
lastbayar = data.lelong.lastbayar;
} }
}); });
} else { } else {
@@ -791,18 +796,20 @@
if(gadai_detail["percentpinj"] != 0) if(gadai_detail["percentpinj"] != 0)
xtawarruq.row.add([ xtawarruq.row.add([
'<input type="radio" value='+ gadai_detail["norujukan"] + ' ' + radio_action +' name="belum"/>', '<input type="radio" value='+ gadai_detail["norujukan"] + ' ' + radio_action +' name="belum"/>',
'<a data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>', '<a data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
gadai_detail['t_gadai'], gadai_detail['t_gadai'],
tarikh_matang, tarikh_matang,
'RM '+ formatter.format(gadai_detail['bakihargajualan']), 'RM'+ formatter.format(gadai_detail['bakihargajualan']),
'RM '+formatter.format(gadai_detail['bakipjm']), 'RM'+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%', (((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['tempoh'], gadai_detail['tempoh'],
'RM '+ upahsemasa, 'RM'+ upahsemasa,
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>', '<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + lastbayar + '</div>',
]).draw(); ]).draw();
}else{ }else{
var taglel = ''; var taglel = '';
var lastbayar = '';
if(gadai_detail['taglel'] == 1){ if(gadai_detail['taglel'] == 1){
if(tagarrahnbid == 1){ if(tagarrahnbid == 1){
$.ajax({ $.ajax({
@@ -812,6 +819,7 @@
success: function(data){ success: function(data){
taglel = data.lelong.t_lelong; taglel = data.lelong.t_lelong;
lastbayar = data.lelong.lastbayar;
} }
}); });
} else { } else {
@@ -837,12 +845,13 @@
'<a href="#" onclick="checkserah(this)" data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>', '<a href="#" onclick="checkserah(this)" data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
gadai_detail['t_gadai'], gadai_detail['t_gadai'],
tarikh_matang, tarikh_matang,
'RM '+ formatter.format(gadai_detail['bakihargajualan']), 'RM'+ formatter.format(gadai_detail['bakihargajualan']),
'RM '+formatter.format(gadai_detail['bakipjm']), 'RM'+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%', (((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['tempoh'], gadai_detail['tempoh'],
'RM '+ formatter.format(upahsemasa['pendapatan']), 'RM'+ formatter.format(upahsemasa['pendapatan']),
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>', '<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + lastbayar + '</div>',
]).draw(); ]).draw();
} }
}else if(jenistebus == "sudah_tebus"){ }else if(jenistebus == "sudah_tebus"){