static void Job32(Args _args)
{
InventQualityOrderTable InventQualityOrderTable;
NumberSeq NumberSeq;
InventQualityOrderId QualityOrderId;
InventDim InventDim;
try
{
NumberSeq=NumberSeq::newGetNum(InventParameters::numRefQualityOrderId());
NumberSeq.used();
QualityOrderId = NumberSeq.num();
ttsBegin;
InventDim.initValue();
InventDim.InventSiteId = "3";
InventDim.InventLocationId = "31";
InventDim = InventDim::findOrCreate(InventDim);
InventDim.insert();
InventQualityOrderTable.initValue();
InventQualityOrderTable.ReferenceType = InventTestReferenceType::Inventory;
InventQualityOrderTable.QualityOrderId = QualityOrderId;
InventQualityOrderTable.ItemId = "M0061";
InventQualityOrderTable.TestGroupId = "Concentrat";
InventQualityOrderTable.Qty = 0.002;
InventQualityOrderTable.InventDimId = "AN41-001116";
InventQualityOrderTable.insert();
// select InventDim where InventDim.inventDimId == InventQualityOrderTable.InventDimId;
InventDim.insert();
ttsCommit;
if(InventQualityOrderTable.Qty)
{
info("Quality order created");
}
}
catch
{
checkFailed("error");
}
}
{
InventQualityOrderTable InventQualityOrderTable;
NumberSeq NumberSeq;
InventQualityOrderId QualityOrderId;
InventDim InventDim;
try
{
NumberSeq=NumberSeq::newGetNum(InventParameters::numRefQualityOrderId());
NumberSeq.used();
QualityOrderId = NumberSeq.num();
ttsBegin;
InventDim.initValue();
InventDim.InventSiteId = "3";
InventDim.InventLocationId = "31";
InventDim = InventDim::findOrCreate(InventDim);
InventDim.insert();
InventQualityOrderTable.initValue();
InventQualityOrderTable.ReferenceType = InventTestReferenceType::Inventory;
InventQualityOrderTable.QualityOrderId = QualityOrderId;
InventQualityOrderTable.ItemId = "M0061";
InventQualityOrderTable.TestGroupId = "Concentrat";
InventQualityOrderTable.Qty = 0.002;
InventQualityOrderTable.InventDimId = "AN41-001116";
InventQualityOrderTable.insert();
// select InventDim where InventDim.inventDimId == InventQualityOrderTable.InventDimId;
InventDim.insert();
ttsCommit;
if(InventQualityOrderTable.Qty)
{
info("Quality order created");
}
}
catch
{
checkFailed("error");
}
}
No comments:
Post a Comment