package main_package;

import java.io.IOException;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
import javax.servlet.http.HttpSession;

import org.primefaces.context.RequestContext;
import org.primefaces.model.UploadedFile;

import com.mysql.jdbc.PreparedStatement;

import hrm_package.DbEmployeeMethod;

@ManagedBean(name="manageEmployee")
@ViewScoped

public class ManageEmployeeBean implements Serializable
{
	DataBaseMethods obj=new DataBaseMethods();
	ArrayList<EmpInfo> list;
	List<SelectItem> branchList;
	EmpInfo selected;
	
	String id, name, fname, address, mobile, center="0", uname, pwd,strPwd, pAddress, altContactNo, empStatus, branchUserId,adminSign, adminSeal;
	Date  dob, doj,startDate,endDate,transferDate,joinningDate;
	double leave, salary;
	String  panCardPath, dlNoPath, aadharCardPath, voterIdPath, passportPath, rationCardPath, tenthPath, twelvethPath,
	graduationPath, otherPath;
	transient UploadedFile panCardPhoto, dlNoPhoto, aadharCardPhoto, voterIdPhoto, passportPhoto, rationCardPhoto, tenthPhoto, twelvethPhoto, 
			  graduationPhoto, otherPhoto;
	boolean disBtn,printOne, printTwo, printThree, printFour,printFive,printSix,printSeven,printEight;
	int noticeDays, rating, increment, newBranchId, branchId;
	Date inactiveDate,lastWorkingDay = new Date();
	double totalAmountForNotice,noticdPeriodShortFallAmount,companyPropertyAmount,salaryOverPaymentAmount;
	String inactiveDescription;
	String designationName;
	String companyStamp;
	String onlineFileViewPath;
	SimpleDateFormat sdf= new SimpleDateFormat("dd-MM-yyyy");
	
	DataBaseMethodTaheer dbmt = new DataBaseMethodTaheer();
	
	
	
	public ManageEmployeeBean() 
	{   
		
		HttpSession ss=(HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
		int branchId =(int) ss.getAttribute("branchId");
	     
		Connection conn=DataBaseConnection.JAVAConnection();
		list=obj.allEmpInfo(branchId,empStatus,conn);
		branchUserId = (String) ss.getAttribute("branchUserId");
		adminSign=obj.adminSignScanImage();
		adminSeal = dbmt.adminSealScanImage();
		//companyStamp=obj.adminMoharImage();
		branchList = new DataBaseMethods().branchList(branchUserId,conn);
		filePathDetail(conn);
		
		try
		{
			conn.close();
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}
	
	
	public void printDateSetting()
	{
		
		startDate=new Date();
		endDate=new Date();
		if(selected.getDoj()!=null)
		{
			
			startDate=selected.getDoj();
		}
		
	}
	
	public void printDetail()
	{
		if(noticeDays==0)
		{
			noticeDays=30;
		}
		
		
		
		HttpSession ss=(HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
		ss.setAttribute("selectedRow", selected);
		ss.setAttribute("startDateHrm", startDate);
		ss.setAttribute("endDateHrm", endDate);
		ss.setAttribute("noticeDaysHrm", noticeDays);
		ss.setAttribute("ratingHrm", rating);
		ss.setAttribute("incrementHrm", increment);
		System.out.println("value of the increment hrm :"+increment);
		ss.setAttribute("offerLatter3", 1);
		ss.setAttribute("lastWorkingDays",sdf.format(lastWorkingDay) );
		ss.setAttribute("totalAmountForNotice", totalAmountForNotice);
		ss.setAttribute("companyPropertyAmount",companyPropertyAmount);
		ss.setAttribute("salaryOverPaymentAmount",salaryOverPaymentAmount);
		ss.setAttribute("noticdPeriodShortFallAmount",noticdPeriodShortFallAmount);
		ss.setAttribute("adminSign",adminSign);
		
		
        
		if(printOne==true)
        {
			RequestContext.getCurrentInstance().execute("window.open('offerLetter.xhtml')");
			RequestContext.getCurrentInstance().execute("window.open('offerLetter2.xhtml')");
			RequestContext.getCurrentInstance().execute("window.open('offerLetter3.xhtml')");
			RequestContext.getCurrentInstance().execute("window.open('offerLetter4.xhtml')");
        }
        
        if(printTwo==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('experienceLetter.xhtml')");
        }
        
        if(printThree==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('empSettlementLetter.xhtml')");
        }
        
        if(printFour==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('relievingLetter.xhtml')");
        	RequestContext.getCurrentInstance().execute("window.open('relievingLetter2.xhtml')");
        }
         
        if(printFive==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('appraisalLetter.xhtml')");
        	RequestContext.getCurrentInstance().execute("window.open('printPromotionLetter.xhtml')");
        }
        if(printSix==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('employeeTransferLetter.xhtml')");     
        }
        
        if(printSeven==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('printRecoveryNoticeFormat.xhtml')");
        }
        
        if(printEight==true)
        {
        	RequestContext.getCurrentInstance().execute("window.open('printAppointmentLetterFormat.xhtml')");
        }
	}
	
	
	
	public void view()
	{
		Connection conn =DataBaseConnection.JAVAConnection();
		
		list=obj.allEmpInfo(branchId,empStatus,conn);
		
		if(empStatus.equalsIgnoreCase("active"))
		{
			disBtn=false;
		}
		else
		{
			disBtn=true;
		}
		
		try
		{
			conn.close();
		}
		catch (Exception e) 
		{
			// TODO: handle exception
		}
	}
	
	
	
	public void transDetail()
	{
		newBranchId=selected.getBranchId();
	}
	
	public void transferBranch()
	{
		FacesContext fc=FacesContext.getCurrentInstance();
		
		if(selected.getBranchId()==newBranchId)
		{
			fc.addMessage(null, new FacesMessage("Existing and Select Branch Are Same,Please Select Another Branch to Transfer The Employee..."));
		}
		else
		{
			int i=new DbEmployeeMethod().employeeBranchTransfer(selected,newBranchId,transferDate,joinningDate);
			if(i>0)
			{ view();
				fc.addMessage(null, new FacesMessage(selected.getName()+" Branch Transfer Done!!!"));
			}
			else
			{
				fc.addMessage(null, new FacesMessage("Some Error Occured!!! Try Agian..."));
			}
		}		
	}
	
	
	public void editDetails()
	{
		HttpSession ss=(HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
		ss.setAttribute("selectedRow", selected);
		
		RequestContext.getCurrentInstance().execute("window.open('editEmployee.xhtml')");
	}
	
	public void viewDocument()
	{
		panCardPath=selected.getPanCardPathForEdit();
		dlNoPath=selected.getDlNoPathForEdit();
		aadharCardPath=selected.getAadharCardPathForEdit();
		voterIdPath=selected.getVoterIdPathForEdit();
		passportPath=selected.getPassportPathForEdit();
		rationCardPath=selected.getRationCardPathForEdit();
		tenthPath=selected.getTenthPathForEdit();
		twelvethPath=selected.getTwelvethPathForEdit();
		graduationPath=selected.getGraduationPathForEdit();
		otherPath=selected.getOtherPathForEdit();
	}
	
	public void updateDocument() throws IOException
	{
		if (panCardPhoto != null && panCardPhoto.getSize() > 0) 
		{
			panCardPath = panCardPhoto.getFileName();
			String exten[]=panCardPath.split("\\.");
			panCardPath=selected.getUname()+"_1"+"."+exten[1];
			obj.makeProfile(panCardPhoto, panCardPath);
		}
		
		if(dlNoPhoto != null && dlNoPhoto.getSize() > 0) 
		{
			dlNoPath = dlNoPhoto.getFileName();
			String exten[]=dlNoPath.split("\\.");
			dlNoPath=selected.getUname()+"_2"+"."+exten[1];
			obj.makeProfile(dlNoPhoto, dlNoPath);
		}
		
		if (aadharCardPhoto != null && aadharCardPhoto.getSize() > 0) 
		{
			aadharCardPath = aadharCardPhoto.getFileName();
			String exten[]=aadharCardPath.split("\\.");
			aadharCardPath=selected.getUname()+"_3"+"."+exten[1];
			obj.makeProfile(aadharCardPhoto, aadharCardPath);
		}
		
		if (voterIdPhoto != null && voterIdPhoto.getSize() > 0) 
		{
			voterIdPath = voterIdPhoto.getFileName();
			String exten[]=voterIdPath.split("\\.");
			voterIdPath=selected.getUname()+"_4"+"."+exten[1];
			obj.makeProfile(voterIdPhoto, voterIdPath);
		}
		
		if (passportPhoto != null && passportPhoto.getSize() > 0) 
		{
			passportPath = passportPhoto.getFileName();
			String exten[]=passportPath.split("\\.");
			passportPath=selected.getUname()+"_5"+"."+exten[1];
			obj.makeProfile(passportPhoto, passportPath);
		}
		
		
		if (rationCardPhoto != null && rationCardPhoto.getSize() > 0) 
		{
			rationCardPath = rationCardPhoto.getFileName();
			String exten[]=rationCardPath.split("\\.");
			rationCardPath=selected.getUname()+"_6"+"."+exten[1];
			obj.makeProfile(rationCardPhoto, rationCardPath);
		}
		
		if (tenthPhoto != null && tenthPhoto.getSize() > 0) 
		{
			tenthPath = tenthPhoto.getFileName();
			String exten[]=tenthPath.split("\\.");
			tenthPath=selected.getUname()+"_7"+"."+exten[1];
			obj.makeProfile(tenthPhoto, tenthPath);
		}
		
		
		if (twelvethPhoto != null && twelvethPhoto.getSize() > 0) 
		{
			twelvethPath = twelvethPhoto.getFileName();
			String exten[]=twelvethPath.split("\\.");
			twelvethPath=selected.getUname()+"_8"+"."+exten[1];
			obj.makeProfile(twelvethPhoto, twelvethPath);
		}
		

		if (graduationPhoto != null && graduationPhoto.getSize() > 0) 
		{
			graduationPath = graduationPhoto.getFileName();
			String exten[]=graduationPath.split("\\.");
			graduationPath=selected.getUname()+"_9"+"."+exten[1];
			obj.makeProfile(graduationPhoto, graduationPath);
		}
		
		if (otherPhoto != null && otherPhoto.getSize() > 0) 
		{
			otherPath = otherPhoto.getFileName();
			String exten[]=otherPath.split("\\.");
			otherPath=selected.getUname()+"_10"+"."+exten[1];
			obj.makeProfile(otherPhoto, otherPath);
		}
				
		int i=obj.updateEmployeeDocumentDetail(selected.getId(), panCardPath,dlNoPath,aadharCardPath,voterIdPath, passportPath, rationCardPath, tenthPath, twelvethPath, graduationPath, 
				otherPath);
		if(i >= 1)
		{
			Connection conn=DataBaseConnection.JAVAConnection();
			list=obj.allEmpInfo(branchId,empStatus,conn);
			try {
				conn.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			FacesContext fc=FacesContext.getCurrentInstance();
			fc.addMessage(null, new FacesMessage("Employee Documents Updated Successfully"));
			//FacesContext.getCurrentInstance().getExternalContext().redirect("manageMember.xhtml");
		}
		
		else
		{
			FacesContext fc=FacesContext.getCurrentInstance();
			fc.addMessage(null, new FacesMessage("Error in Documents Upload"));
		}
	}
	
	
	public void delete()
	{
		HttpSession ss=(HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
		int branchId =(int) ss.getAttribute("branchId");
		Connection conn=DataBaseConnection.JAVAConnection();		
		id =  selected.getId();
		System.out.println("emp inactive date is:"+inactiveDate);
		int n=obj.deleteEmp(id, selected.getUname(), conn,inactiveDate,inactiveDescription);
		if(n>=1)
		{
			FacesContext fc=FacesContext.getCurrentInstance();
			fc.addMessage(null, new FacesMessage("Employe Deleted Successfully"));
			
			list=obj.allEmpInfo(branchId,empStatus,conn);
		}
		else
		{
			FacesContext fc=FacesContext.getCurrentInstance();
			fc.addMessage(null, new FacesMessage("An Error Occured... Please Try Again"));
		}
		
		try {
			conn.close();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

//	public String adminSignScanImage()
//	{
//		Connection conn=DataBaseConnection.JAVAConnection();
//		
//		String qr=fileViewPathDetail(conn)+"/admin_sign.jpg";
//		
//		try {
//			conn.close();
	
	
//		} catch (SQLException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		
//		return qr;
//	}
	public String getDesignationName1() 
	{
	    if (selected != null && selected.getDesignationId() != null && !selected.getDesignationId().isEmpty()) {
	        String name = "";
	        try (Connection conn = DataBaseConnection.JAVAConnection()) 
	        {
	            String query = "SELECT name FROM hrm_basic WHERE id = ?";
	            try (PreparedStatement ps = (PreparedStatement) conn.prepareStatement(query))
	            {
	                ps.setString(1, selected.getDesignationId());
	                try (ResultSet rs = ps.executeQuery()) 
	                {
	                    if (rs.next()) 
	                    {
	                        name = rs.getString("name");
	                    }
	                }
	            }
	        }
	        catch (Exception e) 
	        {
	            e.printStackTrace();
	        }
	        return name;
	    }
	    return "";
	}
	
	
	
	public void filePathDetail(Connection conn)  
	{
		try
		{
			Statement st=conn.createStatement();
			String qq="select * from firm_detail limit 1";
			ResultSet rs=st.executeQuery(qq);
			if(rs.next())
			{
				onlineFileViewPath=rs.getString("file_view_path");
			}
		}
		catch (Exception e)
		{
			 e.printStackTrace();
		} 
	}
	
	
	
	public ArrayList<EmpInfo> getList() {
		return list;
	}

	public void setList(ArrayList<EmpInfo> list) 
	{
		this.list = list;
	}
    
	public EmpInfo getSelected() {
		return selected;
	}

	public void setSelected(EmpInfo selected) {
		this.selected = selected;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFname() {
		return fname;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getCenter() {
		return center;
	}

	public void setCenter(String center) {
		this.center = center;
	}

	public Date getDob() {
		return dob;
	}

	public void setDob(Date dob) {
		this.dob = dob;
	}

	public Date getDoj() {
		return doj;
	}

	public void setDoj(Date doj) {
		this.doj = doj;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	

	public double getLeave() {
		return leave;
	}

	public void setLeave(double leave) {
		this.leave = leave;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	public String getpAddress() {
		return pAddress;
	}

	public void setpAddress(String pAddress) {
		this.pAddress = pAddress;
	}

	public String getAltContactNo() {
		return altContactNo;
	}

	public void setAltContactNo(String altContactNo) {
		this.altContactNo = altContactNo;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getStrPwd() {
		return strPwd;
	}

	public void setStrPwd(String strPwd) {
		this.strPwd = strPwd;
	}

	public String getPanCardPath() {
		return panCardPath;
	}

	public void setPanCardPath(String panCardPath) {
		this.panCardPath = panCardPath;
	}

	public String getDlNoPath() {
		return dlNoPath;
	}

	public void setDlNoPath(String dlNoPath) {
		this.dlNoPath = dlNoPath;
	}

	public String getAadharCardPath() {
		return aadharCardPath;
	}

	public void setAadharCardPath(String aadharCardPath) {
		this.aadharCardPath = aadharCardPath;
	}

	public String getVoterIdPath() {
		return voterIdPath;
	}

	public void setVoterIdPath(String voterIdPath) {
		this.voterIdPath = voterIdPath;
	}

	public String getPassportPath() {
		return passportPath;
	}

	public void setPassportPath(String passportPath) {
		this.passportPath = passportPath;
	}

	public String getRationCardPath() {
		return rationCardPath;
	}

	public void setRationCardPath(String rationCardPath) {
		this.rationCardPath = rationCardPath;
	}

	public String getTenthPath() {
		return tenthPath;
	}

	public void setTenthPath(String tenthPath) {
		this.tenthPath = tenthPath;
	}

	public String getTwelvethPath() {
		return twelvethPath;
	}

	public void setTwelvethPath(String twelvethPath) {
		this.twelvethPath = twelvethPath;
	}

	public String getGraduationPath() {
		return graduationPath;
	}

	public void setGraduationPath(String graduationPath) {
		this.graduationPath = graduationPath;
	}

	public String getOtherPath() {
		return otherPath;
	}

	public void setOtherPath(String otherPath) {
		this.otherPath = otherPath;
	}

	public UploadedFile getPanCardPhoto() 
	{
		return panCardPhoto;
	}

	public void setPanCardPhoto(UploadedFile panCardPhoto) {
		this.panCardPhoto = panCardPhoto;
	}

	public UploadedFile getDlNoPhoto() {
		return dlNoPhoto;
	}

	public void setDlNoPhoto(UploadedFile dlNoPhoto) {
		this.dlNoPhoto = dlNoPhoto;
	}

	public UploadedFile getAadharCardPhoto() {
		return aadharCardPhoto;
	}

	public void setAadharCardPhoto(UploadedFile aadharCardPhoto) {
		this.aadharCardPhoto = aadharCardPhoto;
	}

	public UploadedFile getVoterIdPhoto() {
		return voterIdPhoto;
	}

	public void setVoterIdPhoto(UploadedFile voterIdPhoto) {
		this.voterIdPhoto = voterIdPhoto;
	}

	public UploadedFile getPassportPhoto() {
		return passportPhoto;
	}

	public void setPassportPhoto(UploadedFile passportPhoto) {
		this.passportPhoto = passportPhoto;
	}

	public UploadedFile getRationCardPhoto() {
		return rationCardPhoto;
	}

	public void setRationCardPhoto(UploadedFile rationCardPhoto) {
		this.rationCardPhoto = rationCardPhoto;
	}

	public UploadedFile getTenthPhoto() {
		return tenthPhoto;
	}

	public void setTenthPhoto(UploadedFile tenthPhoto) {
		this.tenthPhoto = tenthPhoto;
	}

	public UploadedFile getTwelvethPhoto() {
		return twelvethPhoto;
	}

	public void setTwelvethPhoto(UploadedFile twelvethPhoto) {
		this.twelvethPhoto = twelvethPhoto;
	}

	public UploadedFile getGraduationPhoto() {
		return graduationPhoto;
	}

	public void setGraduationPhoto(UploadedFile graduationPhoto) {
		this.graduationPhoto = graduationPhoto;
	}

	public UploadedFile getOtherPhoto() {
		return otherPhoto;
	}

	public void setOtherPhoto(UploadedFile otherPhoto) {
		this.otherPhoto = otherPhoto;
	}

	public boolean isPrintOne() {
		return printOne;
	}

	public void setPrintOne(boolean printOne) {
		this.printOne = printOne;
	}

	public boolean isPrintTwo() {
		return printTwo;
	}

	public void setPrintTwo(boolean printTwo) {
		this.printTwo = printTwo;
	}

	public boolean isPrintThree() {
		return printThree;
	}

	public void setPrintThree(boolean printThree) {
		this.printThree = printThree;
	}

	public boolean isPrintFour() {
		return printFour;
	}

	public void setPrintFour(boolean printFour) {
		this.printFour = printFour;
	}

	public int getNoticeDays() {
		return noticeDays;
	}

	public void setNoticeDays(int noticeDays) {
		this.noticeDays = noticeDays;
	}

	public String getEmpStatus() {
		return empStatus;
	}

	public void setEmpStatus(String empStatus) {
		this.empStatus = empStatus;
	}

	public boolean isDisBtn() {
		return disBtn;
	}

	public void setDisBtn(boolean disBtn) {
		this.disBtn = disBtn;
	}

	public boolean isPrintFive() {
		return printFive;
	}

	public void setPrintFive(boolean printFive) {
		this.printFive = printFive;
	}

	public int getRating() {
		return rating;
	}

	public void setRating(int rating) {
		this.rating = rating;
	}

	public int getIncrement() {
		return increment;
	}

	public void setIncrement(int increment) {
		this.increment = increment;
	}

	public List<SelectItem> getBranchList() {
		return branchList;
	}

	public void setBranchList(List<SelectItem> branchList) {
		this.branchList = branchList;
	}

	public int getNewBranchId() {
		return newBranchId;
	}

	public void setNewBranchId(int newBranchId) {
		this.newBranchId = newBranchId;
	}

	public int getBranchId() {
		return branchId;
	}

	public void setBranchId(int branchId) {
		this.branchId = branchId;
	}

	public String getAdminSign() {
		return adminSign;
	}

	public void setAdminSign(String adminSign) {
		this.adminSign = adminSign;
	}
	public boolean isPrintSeven() {
		return printSeven;
	}

	public void setPrintSeven(boolean printSeven) {
		this.printSeven = printSeven;
	}

	public Date getInactiveDate() {
		return inactiveDate;
	}

	public void setInactiveDate(Date inactiveDate) {
		this.inactiveDate = inactiveDate;
	}

	public String getInactiveDescription() {
		return inactiveDescription;
	}

	public void setInactiveDescription(String inactiveDescription) {
		this.inactiveDescription = inactiveDescription;
	}


	public String getDesignationName() {
		return designationName;
	}


	public void setDesignationName(String designationName) {
		this.designationName = designationName;
	}

	public boolean isPrintSix() {
		return printSix;
	}

	public void setPrintSix(boolean printSix) {
		this.printSix = printSix;
	}

	public Date getTransferDate() {
		return transferDate;
	}

	public void setTransferDate(Date transferDate) {
		this.transferDate = transferDate;
	}

	public Date getJoinningDate() {
		return joinningDate;
	}

	public void setJoinningDate(Date joinningDate) {
		this.joinningDate = joinningDate;
	}

	public String getCompanyStamp() {
		return companyStamp;
	}

	public void setCompanyStamp(String companyStamp) {
		this.companyStamp = companyStamp;
	}

	public String getOnlineFileViewPath() {
		return onlineFileViewPath;
	}

	public void setOnlineFileViewPath(String onlineFileViewPath) {
		this.onlineFileViewPath = onlineFileViewPath;
	}

	
	
	public Date getLastWorkingDay() {
		return lastWorkingDay;
	}

	public void setLastWorkingDay(Date lastWorkingDay) {
		this.lastWorkingDay = lastWorkingDay;
	}

	public double getTotalAmountForNotice() {
		return totalAmountForNotice;
	}

	public void setTotalAmountForNotice(double totalAmountForNotice) {
		this.totalAmountForNotice = totalAmountForNotice;
	}

	public DataBaseMethods getObj() {
		return obj;
	}

	public void setObj(DataBaseMethods obj) {
		this.obj = obj;
	}

	public String getBranchUserId() {
		return branchUserId;
	}

	public void setBranchUserId(String branchUserId) {
		this.branchUserId = branchUserId;
	}

	public double getNoticdPeriodShortFallAmount() {
		return noticdPeriodShortFallAmount;
	}

	public void setNoticdPeriodShortFallAmount(double noticdPeriodShortFallAmount) {
		this.noticdPeriodShortFallAmount = noticdPeriodShortFallAmount;
	}

	public double getCompanyPropertyAmount() {
		return companyPropertyAmount;
	}

	public void setCompanyPropertyAmount(double companyPropertyAmount) {
		this.companyPropertyAmount = companyPropertyAmount;
	}

	public double getSalaryOverPaymentAmount() {
		return salaryOverPaymentAmount;
	}

	public void setSalaryOverPaymentAmount(double salaryOverPaymentAmount) {
		this.salaryOverPaymentAmount = salaryOverPaymentAmount;
	}

	public SimpleDateFormat getSdf() {
		return sdf;
	}

	public void setSdf(SimpleDateFormat sdf) {
		this.sdf = sdf;
	}


	public String getAdminSeal() {
		return adminSeal;
	}


	public void setAdminSeal(String adminSeal) {
		this.adminSeal = adminSeal;
	}


	public boolean isPrintEight() {
		return printEight;
	}


	public void setPrintEight(boolean printEight) {
		this.printEight = printEight;
	}
		
}