fix rounded method two decimal places
This commit is contained in:
@@ -261,6 +261,7 @@
|
||||
header("Refresh:0");
|
||||
@endphp
|
||||
@endif
|
||||
<script src="{{ asset('js/rounded-methods.js') }}"></script>
|
||||
<script>
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var kodcaw_ujrah = "<?php echo $cawangan_info['kodcaw'] ?>";
|
||||
@@ -491,14 +492,14 @@
|
||||
}
|
||||
});
|
||||
|
||||
var keuntungan_sebulan = array_keuntungan['keuntungan'];
|
||||
var keuntungan_6bln = keuntungan_sebulan * 6;
|
||||
var keuntungan_sebulan = getRoundedMethod(array_keuntungan['keuntungan']);
|
||||
var keuntungan_6bln = getRoundedMethod(keuntungan_sebulan * 6);
|
||||
|
||||
$('.span-pinjaman').text(formatter.format(percent_pinjaman.toFixed(2)) + ' %');
|
||||
$('#keuntungan_sebulan').val(formatter.format(keuntungan_sebulan.toFixed(2)));
|
||||
$('#keuntungan_6bln').val(formatter.format(keuntungan_6bln.toFixed(2)));
|
||||
$('#ujrah').val(formatter.format(array_keuntungan['ujrah'].toFixed(2)));
|
||||
$('#onepercent').val(formatter.format(array_keuntungan['onepercent'].toFixed(2)));
|
||||
$('#ujrah').val(formatter.format(getRoundedMethod(array_keuntungan['ujrah']).toFixed(2)));
|
||||
$('#onepercent').val(formatter.format(getRoundedMethod(array_keuntungan['onepercent']).toFixed(2)));
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user