add kadar rebet annur at gadai page
This commit is contained in:
@@ -113,10 +113,11 @@
|
||||
<div class="col-4">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
Pendapatan Sebulan
|
||||
Kadar Rebet
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" readonly name="keuntungan_sebulan" id="keuntungan_sebulan">
|
||||
<input type="text" class="form-control" readonly name="rebate" id="rebate">
|
||||
<input type="text" class="form-control" readonly name="kadar_rebate" id="kadar_rebate">
|
||||
</div>
|
||||
</diV>
|
||||
</div>
|
||||
@@ -150,13 +151,13 @@
|
||||
<div class="col-4">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
Pendapatan 6 Bulan
|
||||
Pendapatan Sebulan
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" readonly name="keuntungan_6bln" id="keuntungan_6bln">
|
||||
<input type="text" class="form-control" readonly name="keuntungan_sebulan" id="keuntungan_sebulan">
|
||||
</div>
|
||||
</diV>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
@@ -178,8 +179,18 @@
|
||||
<span class="input-group-text span-pinjaman-max-pelulus"></span>
|
||||
</div>
|
||||
</div>
|
||||
</diV>
|
||||
</diV>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
Pendapatan 6 Bulan
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" readonly name="keuntungan_6bln" id="keuntungan_6bln">
|
||||
</div>
|
||||
</diV>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<input type="text" name="norujukan_gadai" id="norujukan_gadai" value="{{ $norujukan }}" hidden>
|
||||
<input type="text" name="marhun_detail" id="marhun_detail" value="" hidden>
|
||||
@@ -642,6 +653,7 @@
|
||||
'pembiayaan' : pinjaman,
|
||||
'kadarujrah' : kadarupah,
|
||||
'margin' : percent_pinjaman,
|
||||
'kadarrebet' : kadar_rebate,
|
||||
'kodcaw' : "{{ Auth::user()->cawangan }}"
|
||||
},
|
||||
success:function(data){
|
||||
@@ -651,13 +663,35 @@
|
||||
|
||||
var keuntungan_sebulan = getRoundedMethod(array_keuntungan['keuntungan']);
|
||||
var keuntungan_6bln = getRoundedMethod(keuntungan_sebulan * 6);
|
||||
var kadar_rebate;
|
||||
|
||||
$('.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(getRoundedMethod(array_keuntungan['ujrah']).toFixed(2)));
|
||||
$('#onepercent').val(formatter.format(getRoundedMethod(array_keuntungan['onepercent']).toFixed(2)));
|
||||
if (pinjaman < 20000) {
|
||||
var rebate = keuntungan_sebulan * 0.05;
|
||||
} else if (pinjaman >= 20000 && pinjaman <= 50000) {
|
||||
var rebate = keuntungan_sebulan * 0.10;
|
||||
} else if (pinjaman > 50000 && pinjaman <= 100000) {
|
||||
var rebate = keuntungan_sebulan * 0.15;
|
||||
} else {
|
||||
var rebate = keuntungan_sebulan * 0.20;
|
||||
}
|
||||
|
||||
if (pinjaman < 20000) {
|
||||
kadar_rebate = (5 / 100) * 100;
|
||||
} else if (pinjaman >= 20000 && pinjaman <= 50000) {
|
||||
kadar_rebate = (10 / 100) * 100;
|
||||
} else if (pinjaman > 50000 && pinjaman <= 100000) {
|
||||
kadar_rebate = (15 / 100) * 100;
|
||||
} else {
|
||||
kadar_rebate = (20 / 100) * 100;
|
||||
}
|
||||
|
||||
$('.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(getRoundedMethod(array_keuntungan['ujrah']).toFixed(2)));
|
||||
$('#onepercent').val(formatter.format(getRoundedMethod(array_keuntungan['onepercent']).toFixed(2)));
|
||||
$('#rebate').val(formatter.format(rebate.toFixed(2)));
|
||||
$('#kadar_rebate').val(formatter.format(kadar_rebate.toFixed(2)) + ' %');
|
||||
});
|
||||
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
|
||||
Reference in New Issue
Block a user