step 2 : proses rekap absensi
This commit is contained in:
85
prosesRekap.js
Normal file
85
prosesRekap.js
Normal file
@@ -0,0 +1,85 @@
|
||||
function closeAlert() {
|
||||
$('#alert_error').css({ "display": "none" });
|
||||
}
|
||||
|
||||
function reportXlS() {
|
||||
var bulan = $('#bulan').val();
|
||||
var tahun = $('#tahun').val();
|
||||
var jenis_report = $('#jenis_report').val();
|
||||
var kantor = $('#kantor').val();
|
||||
const now = Date.now();
|
||||
|
||||
if(bulan == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih bulan');
|
||||
} else{
|
||||
if(tahun == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Tahun');
|
||||
} else{
|
||||
if (jenis_report == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Jenis Report ex : Absensi');
|
||||
} else {
|
||||
if (kantor == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Kantor');
|
||||
} else {
|
||||
$('#alert_error').css({ "display": "none" });
|
||||
|
||||
var pdfViewer = document.getElementById('pdf_viewer');
|
||||
// var modal = document.getElementById('modal_show_pdf');
|
||||
pdfViewer.src = "https://devone.aplikasi.web.id/birt/run?__report=report/one/absensi/rpt_r_ab_002.rptdesign&__format=xls&PYear="+tahun+"&PMonth="+bulan+"&PCompanyID="+kantor+"&username=adminsas%20&tm="+now;
|
||||
// modal.showModal();
|
||||
|
||||
// document.getElementById('modal_show_pdf').showModal()
|
||||
console.log('bulan : ' + bulan);
|
||||
console.log('tahun : ' + tahun);
|
||||
console.log('jenis_report : ' + jenis_report);
|
||||
console.log('kantor : ' + kantor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reportPDF() {
|
||||
var bulan = $('#bulan').val();
|
||||
var tahun = $('#tahun').val();
|
||||
var jenis_report = $('#jenis_report').val();
|
||||
var kantor = $('#kantor').val();
|
||||
const now = Date.now();
|
||||
|
||||
if(bulan == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih bulan');
|
||||
} else{
|
||||
if(tahun == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Tahun');
|
||||
} else{
|
||||
if (jenis_report == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Jenis Report ex : Absensi');
|
||||
} else {
|
||||
if (kantor == "-") {
|
||||
$('#alert_error').css({ "display": "inline" });
|
||||
$('#message_error').text('Silahkan Pilih Kantor');
|
||||
} else {
|
||||
$('#alert_error').css({ "display": "none" });
|
||||
|
||||
var pdfViewer = document.getElementById('pdf_viewer');
|
||||
var modal = document.getElementById('modal_show_pdf');
|
||||
pdfViewer.src = "https://devone.aplikasi.web.id/birt/run?__report=report/one/absensi/rpt_r_ab_002.rptdesign&__format=pdf&PYear="+tahun+"&PMonth="+bulan+"&PCompanyID="+kantor+"&username=adminsas%20&tm="+now;
|
||||
modal.showModal();
|
||||
|
||||
// document.getElementById('modal_show_pdf').showModal()
|
||||
console.log('bulan : ' + bulan);
|
||||
console.log('tahun : ' + tahun);
|
||||
console.log('jenis_report : ' + jenis_report);
|
||||
console.log('kantor : ' + kantor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user