payRollHub.jsp
<%-- Called from payRollHub. Acts as the center of the payroll process--%>
untitled - document
<%--If the user enter this page with out first logging on they are sent to the login page --%> <%@ include file="checkCompany.jsp" %> <%@ page import= "javax.swing.*" %> <%@ page import= "java.sql.*" %> <%@ page import= "com.UpdatePayRecord" %> <%@ page import= "java.util.*" %> <%@ page import= "com.*"%> <%@ page import= "java.io.*"%> <%@ page import = "java.io.IOException"%> <%@ page import = "com.ArrangePayments"%> <%@ page import = "com.bankFiles"%> <% //Payroll informaion on individual employers entered in payRollHub.jsp is //removed from the request object and placed into arrays String[] lumpSum = request.getParameterValues("lump"); String[] hours = request.getParameterValues("hours"); String[] bonus = request.getParameterValues("bonus"); String[] overHours = request.getParameterValues("overHours"); String[] overHours2 = request.getParameterValues("overHours2"); String[] overHours3 = request.getParameterValues("overHours3"); String[] ssp = request.getParameterValues("ssp"); String[] smp = request.getParameterValues("smp"); String[] alteration = request.getParameterValues("alteration"); ArrayList arra = (ArrayList)session.getAttribute("hubArrayList"); Connection connection; ArrangePayments arrange; //Creates a single instance of ArrangePayments which is used many times below arrange = new ArrangePayments(); arrange.setArrangePayments(company); //Loops as many times as their are elements in the array for(int i = 0;i < lumpSum.length; i++) { //Sets the hours worked and lumps sum payments into the employeeObjects //for gross pay calculation EmployeeObject4 empl; //Instance of class EmployeeObject created. empl = (com.EmployeeObject4)arra.get(i); //In the line below the data is removed from the elements of the array and placed //into the instances of class EmployeeObject. empl.setHours(Integer.parseInt(hours[i])); empl.setOverHours(Integer.parseInt(overHours[i])); empl.setOverHours2(Integer.parseInt(overHours2[i])); empl.setOverHours3(Integer.parseInt(overHours3[i])); empl.setLumpSum(Double.parseDouble(lumpSum[i])); empl.setAdjustment(Double.parseDouble(alteration[i])); empl.setBonus(Double.parseDouble(bonus[i])); empl.setSsp(Double.parseDouble(ssp[i])); empl.setSmp(Double.parseDouble(smp[i])); //employeeObject sent off to static Object GrossPayCalculate1 for gross pay calculation //nothing returned as grosspay placed directly into employeeObject. GrossPayCalculate1.setVaribles(empl); TaxCalculate taxCalculate = new TaxCalculate(); taxCalculate.setEmployeeObject(empl); %>newamount<%=empl.getNewTotalPay()%> <% //*********************************************************************** //Student loan deduction classes and tax credit would be called from here //***********************************************************************8 arrange.setArrangePayment(empl); } arrange.createFile(); %>
Bottom of PayRolAxis