package main_package;

import java.util.ArrayList;

import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

@ManagedBean(name="profitprint")
public class profitLossPrint2 {
	ArrayList<ProfitAndLoss2Info> pffI,pfEp ;
	double totalExpence,totalIncome,totalProfit;

	
	public profitLossPrint2()
	{
		pffI=new ArrayList<>();
		pfEp=new ArrayList<>();
		HttpSession ss=(HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
		pffI=(ArrayList<ProfitAndLoss2Info>) ss.getAttribute("pffI");
		pfEp= (ArrayList<ProfitAndLoss2Info>) ss.getAttribute("pfEp");
		
		totalExpence=(double) ss.getAttribute("totalExpence");
		totalIncome= (double) ss.getAttribute("totalIncome");
		totalProfit=totalIncome-totalExpence;
	}
	
	

	public ArrayList<ProfitAndLoss2Info> getPffI() {
		return pffI;
	}

	public void setPffI(ArrayList<ProfitAndLoss2Info> pffI) {
		this.pffI = pffI;
	}

	public ArrayList<ProfitAndLoss2Info> getPfEp() {
		return pfEp;
	}

	public void setPfEp(ArrayList<ProfitAndLoss2Info> pfEp) {
		this.pfEp = pfEp;
	}



	public double getTotalExpence() {
		return totalExpence;
	}



	public void setTotalExpence(double totalExpence) {
		this.totalExpence = totalExpence;
	}



	public double getTotalIncome() {
		return totalIncome;
	}



	public void setTotalIncome(double totalIncome) {
		this.totalIncome = totalIncome;
	}



	public double getTotalProfit() {
		return totalProfit;
	}



	public void setTotalProfit(double totalProfit) {
		this.totalProfit = totalProfit;
	}
	
	
	

}
