package ibase.webitm.ejb.mfg;

//import java.util.ArrayList;
//import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class TimeMRP
{
	private java.sql.Timestamp dueDate;
	private double demand = 0;
	private	double supply = 0;
	private	double planDemand = 0;
	private	double planSupply = 0;
	private	double runningDemand = 0;
	private	double runningSupply = 0;
	private	double runningPlanSupply = 0;
	private	double independentDemand = 0;
	boolean createDemand = false;
	
	public TimeMRP()
	{
	//	System.out.println("New TimeMRP Created");
	}

	public void setDueDate(java.sql.Timestamp dueDate)
	{
            SimpleDateFormat sdt=new SimpleDateFormat("yyyy-MM-dd");
            dueDate = java.sql.Timestamp.valueOf(sdt.format(dueDate) + " 00:00:00.000");
            this.dueDate = dueDate;
	}
	public java.sql.Timestamp getDueDate()
	{
		return this.dueDate;
	}

	public void setDemand(double demand)
	{
		this.demand += demand;
	}
	public double getDemand()
	{
		return this.demand;
	}

	public void setSupply(double supply)
	{
		this.supply += supply;
	}
	public double getSupply()
	{
		return this.supply;
	}

	public void setRunningDemand(double runningDemand)
	{
		this.runningDemand = runningDemand;
	}
	public double getRunningDemand()
	{
		return this.runningDemand;
	}

	public void setRunningSupply(double runningSupply)
	{
		this.runningSupply = runningSupply;
	}
	public double getRunningSupply()
	{
		return this.runningSupply;
	}
	public void setPlanSupply(double supply)
	{
		this.planSupply += supply;
	}
	public double getPlanSupply()
	{
		return this.planSupply;
	}
	public void setRunningPlanSupply(double supply)
	{
		this.runningPlanSupply = supply;
	}
	public double getRunningPlanSupply()
	{
		return this.runningPlanSupply;
	}
	public void setIndependentDemand(double demand)
	{
		this.independentDemand += demand;
	}
	public double getIndependentDemand()
	{
		return this.independentDemand;
	}
}