fix skit2

This commit is contained in:
MUHD HAFIFIE
2021-06-09 17:02:19 +08:00
parent 01a616eab0
commit 962238b2f7
4 changed files with 34 additions and 7 deletions
@@ -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;
+6 -4
View File
@@ -54,11 +54,11 @@
</div>
<div class="col-8">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" disabled>
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" readonly>
<label class="custom-control-label" style="color:green;" for="radbakilelong" >Baki Lelong</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" disabled>
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" readonly>
<label class="custom-control-label" style="color:red;" for="radrugilelong" >Rugi Lelong</label>
</div>
</div>
@@ -239,17 +239,19 @@
let api = "{{ config('api.url') }}";
let nowakil = 0;
let jenis = '';
let mohon = '';
if($("input[name='radlelong']:checked").val() == 'baki')
{
jenis = 'T';
let mohon = "Tuntut Baki Lelongan";
mohon = "Tuntut Baki Lelongan";
}else{
jenis = 'B';
let mohon = "Bayar Baki Lelongan";
mohon = "Bayar Baki Lelongan";
}
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
let cajlain = 0.00; let cajlelong = $('#cajlelong').val();
let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,"");
+2 -1
View File
@@ -2234,6 +2234,7 @@
sumberat += parseFloat(value);
});
var jenistebus = $('#sltjenistebus').find(":selected").val();
var nopelanggan = "{{ $gadai['nopelanggan'] }}";
var jbg = "{{ $gadai['tempoh'] }}";
var kadarupah = "{{ $gadai['kadarupah'] }}";
@@ -2273,7 +2274,7 @@
//yang lama
"norujukan" : norujukan,
"nopelanggan" : nopelanggan,
"jenistebus" : jenisbayarantebus,
"jenistebus" : jenistebus,
"jbg" : jbg,
"kadarupah" : kadarupah,
"nilai_marhun" : nilai_marhun_lama,
@@ -414,7 +414,7 @@ hr.new5 {
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr>
<tr>
@@ -506,7 +506,7 @@ hr.new5 {
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr>