private void jasperContent(Employee_n emps, int i) { String name = emps.getFirstname() + " " + emps.getMidlename() + " " + emps.getLastname(); m_data.addElement(m_panel.getUnitDescription()); m_data.addElement(m_panel.getMonthYearString()); m_data.addElement(Integer.toString(i + 1)); m_data.addElement(emps.getEmployeeno()); m_data.addElement(name); m_data.addElement(emps.getJobtitle()); }
void addEmptyRow() { if (m_summary) { m_model.addRow(new Object[] {"", "", "", "", "", ""}); } else { m_model.addRow( new Object[] { m_panel.getUnitDescription(), m_panel.getMonthYearString(), "", "", "", "", "" }); } }
private void reportContent(EmployeeMealAllowanceSubmit submit, int i) { m_data.add(m_panel.getUnitDescription()); m_data.add(m_panel.getMonthYearString()); m_data.addElement(String.valueOf(i + 1)); m_data.addElement(submit.getEmployeeNo()); String name = submit.getName(); m_data.addElement(name); m_data.addElement(submit.getJobTitle()); int presence = submit.getPresence(); m_data.addElement(String.valueOf(new Integer(presence))); }
private void getPayrollComponentForSubmit( PayrollComponent[] payrollComponents, PayrollCalcResult[] results, int pResence) { PayrollCalcResult res; EmployeeMealAllowanceSubmit[] employeePayrollSubmit = new EmployeeMealAllowanceSubmit[payrollComponents.length]; for (int i = 0; i < payrollComponents.length; i++) { res = null; employeePayrollSubmit[i] = (EmployeeMealAllowanceSubmit) m_panel.dummyClone(m_employeepayrollSubmit); employeePayrollSubmit[i].setPayrollComponent(payrollComponents[i]); employeePayrollSubmit[i].setPresence(pResence); if (results != null) { for (int j = 0; j < results.length; j++) { if (payrollComponents[i].getIndex() == results[j].component.getIndex()) { res = results[j]; break; } } } if (res != null) { employeePayrollSubmit[i].setValue((float) res.value); } else { employeePayrollSubmit[i].setValue(-1); } if (m_isnotFindEmployee) m_panel.m_payrollMealVector.add(employeePayrollSubmit[i]); } }
private int getPresenceEnabledSubmitSummary(Employee_n emps) { int pResence = m_panel.presence(emps); Integer presencE = new Integer(pResence); String strPresence = ""; if (pResence > 0) strPresence = String.valueOf(presencE); m_data.addElement(strPresence); // untuk menampilkan presence return pResence; }
private PayrollCalcResult[] getResult( PayrollComponent[] payrollComponents, Employee_n[] emps, EmployeePayroll empPayroll, int i) throws Exception { PayrollCategoryComponent[] comps; PayrollCalcResult[] results; m_employeepayrollSubmit.setEmployee_n(emps[i]); comps = m_panel.getPayrollCategoryComponents(emps[i], payrollComponents); if (comps != null) { results = empPayroll.calcPayrollComponent(comps, emps[i].getAutoindex()); } else results = null; return results; }
public void tableBody() { m_empPayroll = new EmployeePayroll( m_panel.m_conn, m_panel.getYear(), m_panel.getMonth(), m_panel.m_sessionid); m_employeepayrollSubmit = m_panel.getEmpMealAllowanceSubmit(); m_logic = new HRMBusinessLogic(m_panel.m_conn); if (m_isnotFindEmployee) m_panel.m_payrollMealVector.clear(); if (m_empMealAllowSubmit == null) return; // apakah sudah ada di db/submit already ato blum if (m_empMealAllowSubmit.length > 0) { setTextfieldStatus(m_empMealAllowSubmit[0]); if (m_empMealAllowSubmit[0].getStatus() == PayrollSubmitStatus.NOTSUBMITTED) { m_panel.m_submitBt.setEnabled(true); m_panel.m_updateFlag = true; } else { m_panel.m_submitBt.setEnabled(false); m_panel.m_updateFlag = false; } } else { m_panel.m_submitBt.setEnabled(true); m_panel.m_statusTextField.setText(" Not Submitted"); m_panel.m_submitdateTextField.setText(""); } if (!m_panel.m_submitBt.isEnabled()) { // ambil data dari DB kemudian tampilkan if (m_summary) { getEnabledSubmit(); } else { getDisabledSubmit(); } } else { // calculate getEnabledSubmit(); } }