Back
APTCN Create Misc Payment
APBTA, APTCR, APTCP, APTCU, APTCN, APPOOP, APTCC, APTCRO, APTCT, APBTA, APTCR, APTCR, APBTA, APTCN, APTCP, APTCRO, APTCC, APTCT, APTCP, APTCR, APTCU, APPOOP, APTCU, APTCP, APTCN, APTCR, APPOOP, APBTA, APTCR, APTCN, APTCP, APTCU, APTCC, APTCR, APTCRO, APTCR, APTCT, APTCR, APPYPT, APBTA, APBTA, APTCR, APTCN, APTCP, APTCU, APBTA, APBTA, APBTA, APBTA, APBTA, APBTA, APTCR, APBTA, APBTA, APTCR, APTCR, APTCP, APTCR, APTCR, APTCR, APTCR, APTCR, APTCR, APTCN, APTCN, APTCN, APTCN, APTCN, APTCN, APTCN, APTCN, APTCN, APTCR, APBTA, APTCR, APTCR
using(HuAPConnection Connection = new HuAPConnection())
using(HuView APBTA = Connection.GetView("AP0030"))
using(HuView APTCR = Connection.GetView("AP0031"))
using(HuView APTCP = Connection.GetView("AP0033"))
using(HuView APTCU = Connection.GetView("AP0034"))
using(HuView APTCN = Connection.GetView("AP0032"))
using(HuView APPOOP = Connection.GetView("AP0048"))
using(HuView APTCC = Connection.GetView("AP0170"))
using(HuView APTCRO = Connection.GetView("AP0406"))
using(HuView APTCT = Connection.GetView("AP0069"))
{
APBTA.Compose(APTCR);
APTCR.Compose(APBTA,APTCN,APTCP,APTCRO,APTCC,APTCT);
APTCP.Compose(APTCR,APTCU,APPOOP);
APTCU.Compose(APTCP);
APTCN.Compose(APTCR);
APPOOP.Compose(APBTA,APTCR,APTCN,APTCP,APTCU);
APTCC.Compose(APTCR);
APTCRO.Compose(APTCR);
APTCT.Compose(APTCR);
using(HuView APPYPT = Connection.GetView("AP0040"))
{
APBTA.RecordClear();
APBTA["PAYMTYPE"] = "PY"; // Batch Selector
APTCR["BTCHTYPE"] = "PY"; // Batch Type
APTCN["BATCHTYPE"] = "PY"; // Batch Type
APTCP["BATCHTYPE"] = "PY"; // Batch Type
APTCU["BATCHTYPE"] = "PY"; // Batch Type
APBTA.Browse("((PAYMTYPE = ");
APBTA["PAYMTYPE"] = "PY"; // Batch Selector
APBTA["CNTBTCH"] = "0"; // Batch Number
APBTA.RecordCreate(1);
APBTA["PROCESSCMD"] = "1"; // Process Command Code
APBTA.Process();
APTCR.RecordCreate(2);
APBTA["BATCHDESC"] = "bat"; // Description
APBTA.Update();
APTCR["TEXTRMIT"] = "ent"; // Entry Description
APTCR["RMITTYPE"] = "4"; // Payment Trans. Type
APTCP.Cancel();
APTCR["PROCESSCMD"] = "0"; // Process Command Code
APTCR.Process();
APTCR["NAMERMIT"] = "remit"; // Vendor / Payee Name
APTCR["TXTRMITREF"] = "ref"; // Entry Reference
APTCR["IDINVCMTCH"] = "INV"; // Matching Document Number
APTCR["SWJOB"] = "1"; // Job Related
APTCN.RecordClear();
APTCN.RecordCreate(0);
APTCN["CONTRACT"] = "DIGST-19MONSTERS"; // Job#
APTCN["PROJECT"] = "PRODUCTION"; // Phase
APTCN["CATEGORY"] = "TALENTDIEM"; // Category
APTCN["AMTDISTTC"] = "1000.000"; // Dist. Amount
APTCN.Insert();
APTCN["CNTLINE"] = "-1"; // Line Number
APTCN.Read();
APTCR.Insert();
APBTA.Read();
APTCR["CNTENTR"] = "0"; // Entry Number
APTCR.RecordCreate(2);
}
}