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

	//Variables declared by gulzar on 4/18/2012
	private	double pendPOQty = 0;
	private	double pendDOQty = 0;
	private	double pendIndQty = 0;
	private	double pendDRQty = 0;
	//End changes by gulzar on 4/18/2012
	
	//added by sabyasachi 17.03.2011
	//private String saleOrder = "";
	//private String lineNo = "";
	//end added by sabyasachi 17.03.2011
	
	boolean createDemand = false;
	String saleOrder="";
	double orderDemand=0;
	
	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;
	}
	public void setOrderDemand(double orderDemand)
	{
		this.orderDemand=orderDemand;
	}
	public double setOrderDemand()
	{
		return this.orderDemand;
	}
	//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;
	}
	//Changes made by gulzar on 4/18/2012
	// 12/04/10 manoharan MF90BHU001
	public void setPendingPO(double pendPOQty)
	{
		this.pendPOQty += pendPOQty;
	}
	public double getPendingPO()
	{
		return this.pendPOQty;
	}
	public void setPendingDO(double pendDOQty)
	{
		this.pendDOQty += pendDOQty;
	}
	public double getPendingDO()
	{
		return this.pendDOQty;
	}
	public void setPendingIndent(double pendIndQty)
	{
		this.pendIndQty += pendIndQty;
	}
	public double getPendingIndent()
	{
		return this.pendIndQty;
	}
	public void setPendingDR(double pendDRQty)
	{
		this.pendDRQty += pendDRQty;
	}
	public double getPendingDR()
	{
		return this.pendDRQty;
	}
	
	//End changes by gulzar on 4/18/2012

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