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;
	// 12/04/10 manoharan MF90BHU001
	private	double stockQty = 0;
	private	double othSupply = 0;
	// end 12/04/10 manoharan MF90BHU001
	
	//added by sabyasachi 17.03.2011
	//private String saleOrder = "";
	//private String lineNo = "";
	//end added by sabyasachi 17.03.2011
	
	boolean createDemand = false;
	
	public TimeMRP()
	{
	//	System.out.println("New TimeMRP Created");
		//this.saleOrder = "          ";
		//this.lineNo = "   ";
	}

	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;
	}

	//changed method arguments by sabyasachi 29-03-2011
	//public void setDemand(double demand,String saleOrder, String lineNo)
	public void setDemand(double demand)
	{
		this.demand += demand;
		//this.saleOrder = saleOrder;
		//this.lineNo = lineNo;
	}
	//changed method definition by sabyasachi 29-03-2011 end
	
	public double getDemand()
	{
		return this.demand;
	}

	public void setSupply(double supply)
	{
		this.supply += supply;
	}
	public double getSupply()
	{
		return this.supply;
	}
	// 12/04/10 manoharan MF90BHU001
	public void setStockQty(double stockQty)
	{
		this.stockQty += stockQty;
	}
	public double getStockQty()
	{
		return this.stockQty;
	}
	public void setOthSupply(double othSupply)
	{
		this.othSupply += othSupply;
	}
	public double getOthSupply()
	{
		return this.othSupply;
	}
	// 12/04/10 manoharan MF90BHU001
	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;
	}
	//added by sabyasachi 17.03.2011
	//public void setSaleOrder(String saleOrder)
	//{
	//	this.saleOrder = saleOrder;
	//}
	//public String getSaleOrder()
	//{
	//	return this.saleOrder;
	//}
	//public void setLineNo(String lineNo)
	//{
	//	this.lineNo = lineNo;
	//}
	//public String getLineNo()
	//{
	//	return this.lineNo;		
	//}
	//end added by sabyasachi 17.03.2011	
}