fix skit2
This commit is contained in:
@@ -170,6 +170,7 @@
|
||||
<div class="float-right mb-3">
|
||||
<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>
|
||||
<input type="checkbox" id="selectallcheck" onclick="checkallfunction()"/>
|
||||
</div>
|
||||
<table class='table table-striped table-hover' id='table-gadaian-belum-serah'>
|
||||
<thead class="thead-dark">
|
||||
@@ -288,6 +289,29 @@
|
||||
location.reload();
|
||||
});
|
||||
|
||||
function checkallfunction(){
|
||||
let totalmarhun = 0;
|
||||
|
||||
if(this.checked) {
|
||||
// Iterate each checkbox
|
||||
$(':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)));
|
||||
} else {
|
||||
$(':checkbox').each(function() {
|
||||
let marhun = Number($(this).data("marhun"));
|
||||
totalmarhun -= marhun;
|
||||
this.checked = false;
|
||||
});
|
||||
$('#marhunpilih').val(0);
|
||||
$("#btn-serah").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
function checkallfunc(){
|
||||
|
||||
let totalmarhun = 0;
|
||||
|
||||
Reference in New Issue
Block a user