Back

Confirm Deletion?

AR Invoice Summary

ARIBC, ARIBH, ARIBD, ARIBS, ARIBHO, ARIBDO, ARIBC, ARIBH, ARIBH, ARIBC, ARIBD, ARIBS, ARIBHO, ARIBD, ARIBH, ARIBC, ARIBDO, ARIBS, ARIBH, ARIBHO, ARIBH, ARIBDO, ARIBD, ARIBC, ARIVPT, ARIBC, ARIBC, ARIBC, ARIBC, ARIBH, ARIBD, ARIBH, ARIBH, ARIBH, ARIBH, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBD, ARIBH, ARIBH, ARIBD, ARIBD, ARIBC, ARIBH, ARIBD, ARIBH, ARIBH, ARIBH, ARIBD, ARIBD


  // TODO: To increase efficiency, comment out any unused DB links.
using(HuAPConnection Connection = new HuAPConnection())
using(HuView ARIBC = Connection.GetView("AR0031"))
using(HuView ARIBH = Connection.GetView("AR0032"))
using(HuView ARIBD = Connection.GetView("AR0033"))
using(HuView ARIBS = Connection.GetView("AR0034"))
using(HuView ARIBHO = Connection.GetView("AR0402"))
using(HuView ARIBDO = Connection.GetView("AR0401"))
{
	ARIBC.Compose(ARIBH);
	ARIBH.Compose(ARIBC,ARIBD,ARIBS,ARIBHO,null);
	ARIBD.Compose(ARIBH,ARIBC,ARIBDO);
	ARIBS.Compose(ARIBH);
	ARIBHO.Compose(ARIBH);
	ARIBDO.Compose(ARIBD);
	ARIBC.Browse("((BTCHSTTS = 1) OR (BTCHSTTS = 7))");
	using(HuView ARIVPT = Connection.GetView("AR0048"))
	{
		ARIBC.RecordCreate(1);
		ARIBC["PROCESSCMD"] = "1";  // Process Command
		ARIBC.Process();
		ARIBC.Read();
		ARIBH.RecordCreate(2);
		ARIBD.Cancel();
		ARIBH["IDCUST"] = "1200";  // Customer Number
		ARIBH["PROCESSCMD"] = "4";  // Process Command
		ARIBH.Process();
		ARIBH["INVCTYPE"] = "2";  // Invoice Type
		ARIBD.RecordClear();
		ARIBD.RecordCreate(0);
		ARIBD["PROCESSCMD"] = "0";  // Process Command Code
		ARIBD.Process();
		ARIBD["IDACCTREV"] = "5000";  // Revenue Account
		ARIBD.Insert();
		ARIBD["CNTLINE"] = "-1";  // Line Number
		ARIBD.Read();
		ARIBD["AMTEXTN"] = "40.000";  // Extended Amount w/ TIP
		ARIBD.Update();
		ARIBD["CNTLINE"] = "-1";  // Line Number
		ARIBD.Read();
		ARIBD.RecordCreate(0);
		ARIBD["PROCESSCMD"] = "0";  // Process Command Code
		ARIBD.Process();
		ARIBD["IDACCTREV"] = "5000";  // Revenue Account
		ARIBD["AMTEXTN"] = "20.000";  // Extended Amount w/ TIP
		ARIBD.Insert();
		ARIBD["CNTLINE"] = "-2";  // Line Number
		ARIBD.Read();
		ARIBH["CUSTPO"] = "PONUM";  // PO Number
		ARIBH.Insert();
		ARIBD.Read();
		ARIBD.Read();
		ARIBC.Read();
		ARIBH.RecordCreate(2);
		ARIBD.Cancel();
		ARIBH["CNTITEM"] = "2";  // Entry Number
		ARIBH.Browse("");
		ARIBH.Fetch();
		ARIBD.Read();
		ARIBD.Read();
}


}