Back

Confirm Deletion?

AR Item Insert

ARITH, ARITD, ARITT, ARITH, ARITD, ARITT, ARITD, ARITH, ARITT, ARITH, ARITS, ARITS, ARITH, ARITS, ARITD, ARITD, ARITD, ARITD, ARITD, ARITS, ARITS, ARITD, ARITD, ARITD, ARITD, ARITD, ARITH, ARITD, ARITS, ARITH, ARITH, ARITH, ARITD, ARITD, ARITD, ARITD, ARITD, ARITD, ARITD, ARITD, ARITD, ARITD, ARITH, ARITH, ARITS, ARITS, ARITD, ARITD, ARITD, ARITD, ARITD, ARITS, ARITS, ARITS, ARITD, ARITD, ARITD, ARITD, ARITD


  // TODO: To increase efficiency, comment out any unused DB links.
using(HuAPConnection Connection = new HuAPConnection())
using(HuView ARITH = Connection.GetView("AR0010"))
using(HuView ARITD = Connection.GetView("AR0009"))
using(HuView ARITT = Connection.GetView("AR0011"))
{
	ARITH.Compose(ARITD,ARITT);
	ARITD.Compose(ARITH);
	ARITT.Compose(ARITH);
	using(HuView ARITS = Connection.GetView("AR0027"))
	{
		ARITS["YTDACTIVE"] = "1";  // Enable YTD Calculations
		ARITH.Init();
		ARITS.Init();
		ARITD.Order = 1;
		ARITD["UNITMEAS"] = "";  // Unit of Measure
		ARITD["CODECURN"] = "";  // Currency Code
		ARITD.Browse("");
		ARITD.Fetch();
		ARITS["CNTYR"] = "2020";  // Year
		ARITS["CNTPERD"] = "10";  // Period
		ARITD.Order = 0;
		ARITD["CODECURN"] = "";  // Currency Code
		ARITD["UNITMEAS"] = "";  // Unit of Measure
		ARITD.Browse("");
		ARITD.Fetch();
		ARITH["IDITEM"] = "ARTEST";  // Item Number
		ARITD.Init();
		ARITS.Init();
		ARITH["IDACCTREV"] = "800-1610-00000";  // Revenue Account
		ARITH["IDACCTINV"] = "800-1620-00000";  // Inventory Account
		ARITH["IDACCTCOGS"] = "800-1630-00000";  // COGS Account
		ARITD.RecordClear();
		ARITD.RecordCreate(0);
		ARITD["CODECURN"] = "EUR";  // Currency Code
		ARITD["UNITMEAS"] = "EACH";  // Unit of Measure
		ARITD["AMTCOST"] = "2.000000";  // Item Cost
		ARITD["AMTPRICE"] = "4.000000";  // Item Price
		ARITD.Insert();
		ARITD["CODECURN"] = "EUR";  // Currency Code
		ARITD["UNITMEAS"] = "EACH";  // Unit of Measure
		ARITD.Read();
		ARITH["SWDISCABL"] = "0";  // Discountable
		ARITH.Insert();
		ARITS.Init();
		ARITS["IDITEM"] = "ARTEST";  // Item Number
		ARITD.Order = 1;
		ARITD["UNITMEAS"] = "";  // Unit of Measure
		ARITD["CODECURN"] = "";  // Currency Code
		ARITD.Browse("");
		ARITD.Fetch();
		ARITS["IDUOM"] = "EACH";  // Unit of Measure
		ARITS["CNTYR"] = "2020";  // Year
		ARITS["CNTPERD"] = "10";  // Period
		ARITD.Order = 0;
		ARITD["CODECURN"] = "";  // Currency Code
		ARITD["UNITMEAS"] = "";  // Unit of Measure
		ARITD.Browse("");
		ARITD.Fetch();
}
  // Enable YTD Calculations

}