fix bajet

This commit is contained in:
hafifierahman
2022-06-21 09:34:29 +08:00
parent a5c5689f84
commit e74870b6b3
+58 -9
View File
@@ -21,7 +21,7 @@
<div class="card-header font-weight-bold">Pembiayaan</div>
<div class="card-body">
<div class="progress mb-2">
<div id="pembprogress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div>
<div id="pembprogress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<div class="d-flex justify-content-between">
@@ -50,17 +50,17 @@
<div class="card-header font-weight-bold">Penebusan</div>
<div class="card-body">
<div class="progress mb-2">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
<div id="penbprogress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<div class="d-flex justify-content-between">
<div>
<span class="col-5 font-weight-bold">HARIAN</span>
<span class="col-1">:</span>
<span id="penbharian" class="col-5">HARIAN</span>
<span id="penbharian" class="col-5"></span>
</div>
<div>
<span id="penbpercent">-100%</span>
<span id="penbpercent">0%</span>
</div>
</div>
@@ -79,16 +79,27 @@
<div class="card-header font-weight-bold">Keuntungan</div>
<div class="card-body">
<div class="progress mb-2">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
<div id="keunprogress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<div class="d-flex justify-content-between">
<span>HARIAN :</span>
<span>-100%</span>
<div>
<span class="col-5 font-weight-bold">HARIAN</span>
<span class="col-1">:</span>
<span id="keunharian" class="col-5"></span>
</div>
<div>
<span id="keunpercent">0%</span>
</div>
</div>
<div class="d-flex justify-content-between">
<span>BAJET :</span>
<span>dasdsa</span>
<div>
<span class="col-5 font-weight-bold">BAJET</span>
<span class="col-1">:</span>
<span id="keunbajet" class="col-5"></span>
</div>
<span>varians</span>
</div>
</div>
</div>
@@ -257,6 +268,44 @@ $( document ).ready(function() {
}
});
$.ajax({
method:'get',
url: api_url + '/admin/penebusanToday',
datatype:'json',
data:{
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
},
success:function(data){
console.log(data);
$('#penbharian').text('RM' + formatter.format(data[0].tebusToday));
$('#penbbajet').text('RM' + formatter.format(data[0].bajetharian.toFixed(2)));
$('#penbpercent').text(data[0].percentDiff + '%');
$('#penbprogress').text(100 - data[0].percentcum + '%');
$("#penbprogress").css("width",100 - data[0].percentcum);
// this.gadaianremaining = formatter.format(data[0].remaining.toFixed(2)),
// this.percentcumgadai = (100 - data[0].percentcum)
}
});
$.ajax({
method:'get',
url: api_url + '/admin/keuntunganToday',
datatype:'json',
data:{
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
},
success:function(data){
console.log(data);
$('#keunharian').text('RM' + formatter.format(data[0].upahToday));
$('#keunbajet').text('RM' + formatter.format(data[0].bajetharian.toFixed(2)));
$('#keunpercent').text(data[0].percentDiff + '%');
$('#keunprogress').text(100 - data[0].percentcum + '%');
$("#keunprogress").css("width",100 - data[0].percentcum);
// this.gadaianremaining = formatter.format(data[0].remaining.toFixed(2)),
// this.percentcumgadai = (100 - data[0].percentcum)
}
});
});
function datapembiayaan(datapemb)