Back

Confirm Deletion?

PO - Create Purchase Order

POPORH, POPORL, POPORC, POPORR, POPORG, POPORHO, POPORLO, POPORH, POPORC, POPORL, POPORR, POPORG, POPORHO, POPORL, POPORH, POPORC, POPORG, POPORLO, POPORC, POPORH, POPORL, POPORR, POPORH, POPORG, POPORG, POPORH, POPORC, POPORL, POPORR, POPORHO, POPORH, POPORLO, POPORL, POPORH, POPORH, POPORH, POPORH, POPORH, POPORL, POPORR, POPORC, POPORH, POPORH, POPORH, POPORH, POPORH, POPORL, POPORR, POPORC, POPORH, POPORH, POPORH, POPORH, POPORG, POPORG, POPORL, POPORL, POPORL, POPORL, POPORL, POPORL, POPORL, POPORL, POPORL, POPORL, POPORG, POPORG, POPORH, POPORH, POPORH, POPORH, POPORH, POPORH, POPORL, POPORR, POPORC


  // TODO: To increase efficiency, comment out any unused DB links.
using(HuAPConnection Connection = new HuAPConnection())
using(HuView POPORH = Connection.GetView("PO0620"))
using(HuView POPORL = Connection.GetView("PO0630"))
using(HuView POPORC = Connection.GetView("PO0610"))
using(HuView POPORR = Connection.GetView("PO0632"))
using(HuView POPORG = Connection.GetView("PO0619"))
using(HuView POPORHO = Connection.GetView("PO0623"))
using(HuView POPORLO = Connection.GetView("PO0633"))
{
	POPORH.Compose(POPORC,POPORL,POPORR,POPORG,POPORHO);
	POPORL.Compose(POPORH,POPORC,POPORG,null,null,POPORLO);
	POPORC.Compose(POPORH,POPORL);
	POPORR.Compose(POPORH,POPORG);
	POPORG.Compose(POPORH,POPORC,POPORL,POPORR);
	POPORHO.Compose(POPORH);
	POPORLO.Compose(POPORL);
	POPORH.Order = 1;
	POPORH.Order = 0;
	POPORH["PORHSEQ"] = "0";  // Purchase Order Sequence Key
	POPORH.Init();
	POPORH.Order = 1;
	POPORL.RecordClear();
	POPORR.Init();
	POPORC.Init();
	POPORH.Init();
	POPORH.Order = 0;
	POPORH["PORHSEQ"] = "0";  // Purchase Order Sequence Key
	POPORH.Init();
	POPORH.Order = 1;
	POPORL.RecordClear();
	POPORR.Init();
	POPORC.Init();
	POPORH["VDCODE"] = "1200";  // Vendor
	POPORH["PROCESSCMD"] = "1";  // Command
	POPORH.Process();
	POPORH["DATE"] = "";  // Purchase Order Date
	POPORG["FUNCTION"] = "61";  // Function
	POPORG.Process();
	POPORL.RecordClear();
	POPORL.RecordCreate(0);
	POPORL["ITEMNO"] = "A1-105/0";  // Item Number
	POPORL["PROCESSCMD"] = "1";  // Command
	POPORL.Process();
	POPORL["LOCATION"] = "2";  // Location
	POPORL["OQORDERED"] = "42.0000";  // Quantity Ordered
	POPORL.Insert();
	POPORL["PORLREV"] = "-1";  // Line Number
	POPORL.Read();
	POPORG["FUNCTION"] = "8";  // Function
	POPORG.Process();
	POPORH.Insert();
	POPORH.Init();
	POPORH.Order = 0;
	POPORH["PORHSEQ"] = "0";  // Purchase Order Sequence Key
	POPORH.Init();
	POPORH.Order = 1;
	POPORL.RecordClear();
	POPORR.Init();
	POPORC.Init();
}