update margin export pdf

This commit is contained in:
KhatamNugraha
2023-09-26 18:09:00 +07:00
parent 62b908a314
commit 60886ef174
4 changed files with 137 additions and 105 deletions

View File

@ -65,7 +65,7 @@
<div class="d-flex flex-column mb-8 fv-row">
{{-- <input type="text" style="margin-bottom: 5px" name="cus_no" id="acc_no2" /> --}}
<input type="hidden" style="margin-bottom: 5px" name="acc_no" />
<input type="hidden" style="margin-bottom: 5px" name="acc_no" class="selected-values"/>
{{-- <input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
<input type="hidden" style="margin-bottom: 5px" name="periode" /> --}}
<div class="text-right ">
@ -195,7 +195,7 @@
<form class="form-horizontal" id="formSigner">
@csrf
<!-- Add your form fields here -->
<input type="hidden" style="margin-bottom: 5px" name="cus_no" id="acc_no2" />
<input type="hidden" style="margin-bottom: 5px" name="cus_no">
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
<input type="hidden" style="margin-bottom: 5px" name="startDateExport" />
<input type="hidden" style="margin-bottom: 5px" name="endDateExport" />
@ -269,6 +269,7 @@
$("input[name=cus_no]").val(cif);
$("input[name=kode_cabang]").val(kodecabang);
var no = 1;
$.ajax({
@ -299,6 +300,7 @@
$("#company_name").val(kdcabang);
$("input[name=startDateFasilitas]").val(startDate);
$("input[name=endDateFasilitas]").val(endDate);
$(".selected-values").val('');
},
error: function (error) {
@ -310,14 +312,35 @@
});
var acc_no = [];
var selectedValues = [];
$('#table4 tbody').on('change', 'tr td.tes input[type=checkbox]', function() {
$('.exportPdf').show();
// if ($(this).is(':checked')) {
// // Do something...
// acc_no.push($(this).val());
// $("input[name=acc_no]").val(acc_no)
// }else{
// acc_no.push($(this).val());
// $("input[name=acc_no]").val(acc_no)
// };
var value = $(this).val();
if ($(this).is(':checked')) {
// Do something...
acc_no.push($(this).val());
$("input[name=acc_no]").val(acc_no)
};
// Checkbox is checked, add value to the array
selectedValues.push(value);
} else {
// Checkbox is unchecked, remove value from the array
var index = selectedValues.indexOf(value);
if (index !== -1) {
selectedValues.splice(index, 1);
}
}
// Display the selected values (just for demonstration)
$('.selected-values').val(selectedValues.join(','));
});