fix apa yang patut

This commit is contained in:
MUHD HAFIFIE
2021-04-16 23:46:17 +08:00
parent 97a9247f25
commit 4682514c5f
6 changed files with 70 additions and 11 deletions
@@ -168,8 +168,8 @@
</div>
<div class="tab-pane fade" id="gadaian-belum-serah" role="tabpanel" aria-labelledby="gadaian-belum-serah-tab">
<div class="float-right mb-3">
<button class="btn btn-primary mt-4 pull-left" onclick="checkallfunc()">Check All</button>
<button class="btn btn-primary mt-4 pull-left" onclick="uncheckallfunc()">Uncheck All</button>
<button class="btn btn-primary mt-4 pull-left" onclick="checkallfunc()" disabled>Check All</button>
<button class="btn btn-primary mt-4 pull-left" onclick="uncheckallfunc()" disabled>Uncheck All</button>
</div>
<table class='table table-striped table-hover' id='table-gadaian-belum-serah'>
<thead class="thead-dark">
@@ -289,19 +289,26 @@
});
function checkallfunc(){
let totalmarhun = 0;
$(':checkbox').each(function() {
let marhun = Number($(this).data("marhun"));
totalmarhun += marhun;
this.checked = true;
});
$("#btn-serah").prop('disabled', false);
$('#marhunpilih').val(formatter.format(totalmarhun.toFixed(2)));
}
function uncheckallfunc(){
let totalmarhun = 0;
$(':checkbox').each(function() {
let marhun = Number($(this).data("marhun"));
totalmarhun -= marhun;
this.checked = false;
});
$('#marhunpilih').val(0);
$("#btn-serah").prop('disabled', true);
}
function fetchRekodGadaian(){