<%@page language="Java" import="java.util.*, co.uk.paychek.types.*, java.text.SimpleDateFormat, co.uk.paychek.oprn.*, org.apache.log4j.Logger, com.acism.lib.*" errorPage="errorpage.jsp" %> <% org.hibernate.Session hibSession = HibernateUtil.getSessionFactory().openSession(); try { hibSession.beginTransaction(); String pageid = null; User user = null; List allUploadedReports = null; List company_reports = null; List user_reports = null; List companies = null; WFNodeInput inargs = (WFNodeInput)request.getAttribute("Page Input"); if(inargs != null && request.getAttribute("Page Input") != null ) { pageid = (String)inargs.getInArgument("pg"); user = (User)inargs.getInArgument("user"); allUploadedReports = (List)inargs.getInArgument("allUploadedReports"); company_reports = (List)inargs.getInArgument("company_reports"); user_reports = (List)inargs.getInArgument("user_reports"); companies = (List)inargs.getInArgument("companies"); } SimpleDateFormat Temp_date = new SimpleDateFormat("EEE, MMM d, yyyy"); %> Paychek :: Accounting & Payroll Management <% if(user != null) { //hibSession.refresh(user); List otherReports = null; String role = (String)user.getRole(); %>
<% if(role.equals("Admin")) // || role.equals("Sub Admin")) { %> Companies
<%}else{%> Reports
<%}%> <% if(role.equals("Admin")) { %> <% if(companies != null && companies.size() > 0) { for(Iterator it = companies.iterator(); it.hasNext();) { Company company = (Company)it.next(); hibSession.refresh(company); Set logos = (Set)company.getLogos(); %> <% } } } %> <% if(role.equals("Sub Admin")) { %> <% hibSession.refresh(user); Set subAdmin = (Set)user.getSubAdminCompanies(); if(subAdmin != null && subAdmin.size() > 0) { for(Iterator it = subAdmin.iterator(); it.hasNext();) { SubAdminCompanies subAdminCompany = (SubAdminCompanies)it.next(); %> <% } } } %> <% if(role.equals("Company Admin")) { //Company selCompany = (Company)user.getCompany(); //hibSession.refresh(selCompany); otherReports = company_reports; //(Set)selCompany.getDownloads(); if(otherReports != null && otherReports.size() >= 0) { allUploadedReports.clear(); boolean success = allUploadedReports.addAll(otherReports); int report_id = 0; int i = 0; if(allUploadedReports != null) { for(Iterator it = allUploadedReports.iterator(); it.hasNext();) { Download upload_report = (Download)it.next(); hibSession.refresh(upload_report); if(upload_report != null) { if(report_id != upload_report.getReport().getReport_id()) { report_id = upload_report.getReport().getReport_id(); if(upload_report.getReport().getReport_type() == 1) { if(i == 0) { %> <% } i++; %> <% } } } } i = 0; for(Iterator it = allUploadedReports.iterator(); it.hasNext();) { Download upload_report = (Download)it.next(); hibSession.refresh(upload_report); if(upload_report != null) { if(report_id != upload_report.getReport().getReport_id()) { report_id = upload_report.getReport().getReport_id(); if(upload_report.getReport().getReport_type() == 2) { if(i == 0) { %> <% } i++; %> <% } } } } } } } if(role.equals("Employee User")) { //hibSession.refresh(user); otherReports = user_reports; //(Set)user.getDownloads(); if(otherReports != null && otherReports.size() >= 0) { allUploadedReports.clear(); boolean success = allUploadedReports.addAll(otherReports); int report_id = 0; int i = 0; if(allUploadedReports != null) { for(Iterator it = allUploadedReports.iterator(); it.hasNext();) { Download upload_report = (Download)it.next(); hibSession.refresh(upload_report); if(upload_report != null) { if(report_id != upload_report.getReport().getReport_id()) { report_id = upload_report.getReport().getReport_id(); if(upload_report.getReport().getReport_type() == 1) { if(i == 0) { %> <% } i++; %> <% } } } } i = 0; for(Iterator it = allUploadedReports.iterator(); it.hasNext();) { Download upload_report = (Download)it.next(); hibSession.refresh(upload_report); if(upload_report != null) { if(report_id != upload_report.getReport().getReport_id()) { report_id = upload_report.getReport().getReport_id(); if(upload_report.getReport().getReport_type() == 2) { if(i == 0) { %> <% } i++; %> <% } } } } } } } //hibSession.getTransaction().commit(); }else{ %>
Company Name:   
Company Name    
<% if(logos != null && logos.size() > 0){%><%}else{%>    <%}%><% if(company != null){%><%= company.getCompany_name() %><%}%> Upload Logo Delete
Company Name  
<%= subAdminCompany.getCompany().getCompany_name() %> View Users
Accounting Reports
<%= upload_report.getReport().getReport_name()%>
Payroll Reports
<%= upload_report.getReport().getReport_name()%>
Accounting Reports
<%= upload_report.getReport().getReport_name()%>
Payroll Reports
<%= upload_report.getReport().getReport_name()%>
Services
  • Employee Reports
  • Management Reporting
  • Payment Management
  • HM Revenue & Customs

Membership
Paychek is a member of
Institute of Payroll and Pension Management. And Sage Accountants Club.

Demo Reports
For viewing Demo Reports
Click here
Use Login ID as "USER" and Password as "DEMO".

Paychek provides complete payroll solutions. Here at Paychek, we adhere to the needs of individual employers and provide tailor made packages to suit your needs.

OutstandingSolutions
Paychek offers an outstanding and competitively priced solution for all your payroll needs, our managed payroll services are designed to relieve you of the burden, of keeping on top of payroll legislation, rules and regulations.

CreatingPartnership
We provide expert payroll administration and processing, yet a flexible approach allows you, the client, to specify the level of service preferred to embrace both your operational and business needs. The company's philosophy has always been to pursue a policy of partnership with our clients and suppliers to gain a reputation for the highest standards of quality and service.

FlexibleService
There are no parameters to our commitment to customer satisfaction. Our experience and ability gives Paychek the edge in terms of reliability and above all flexibility. Flexibility that enables Paychek to provide a first class payroll solution.

DemoReports
This functionality gives an insight to the users regarding the visual effects of the actual reports. All the reports here have been uploaded for "DEMO COMPANY". Please find a panel named "Demo Reports" on the extreme left hand side for furthur details.

<%} hibSession.getTransaction().commit(); } catch(Exception exc) { hibSession.getTransaction().rollback(); exc.printStackTrace(); } finally { if(hibSession.isOpen()) hibSession.close(); } %>