static void RB_MarkInventTrans(InventTransId _inventTransId,InventTransId _refInventTransId,InventQty _qtyTomark)
{
InventTrans issueInventTrans;
TmpInventTransMark tmpInventTransMask;
Map mapMarkNow;
container con;
real qty;
Map mapTmp;
MapEnumerator mapEnumerator;
InventTransOriginId issueInventTransOriginId =
InventTransOrigin::findByInventTransId(_inventTransId).RecId;
InventTransOriginId receiptInventTransOriginId =
InventTransOrigin::findByInventTransId(_refInventTransId).RecId;
InventQty qtyToMark = _qtyTomark;
ttsBegin;
issueInventTrans = InventTrans::findByInventTransOrigin(
issueInventTransOriginId);
[con, qty] = TmpInventTransMark::packTmpMark(
InventTransOrigin::find(issueInventTransOriginId),
issueInventTrans.inventDim(),
issueInventTrans.Qty);
mapTmp = Map::create(con);
mapEnumerator = mapTmp.getEnumerator();
while (mapEnumerator.moveNext())
{
tmpInventTransMask = mapEnumerator.currentValue();
if (tmpInventTransMask.InventTransOrigin == receiptInventTransOriginId)
{
tmpInventTransMask.QtyMarkNow = qtyToMark;
tmpInventTransMask.QtyRemain -= tmpInventTransMask.QtyMarkNow;
mapMarkNow = new Map(Types::Int64, Types::Record);
mapMarkNow.insert(tmpInventTransMask.RecId, tmpInventTransMask);
TmpInventTransMark::updateTmpMark(
issueInventTransOriginId,
issueInventTrans.inventDim(),
-qtyToMark,
mapMarkNow.pack());
}
}
ttsCommit;
}
Subscribe to:
Post Comments (Atom)
D365 F&O Release Pipeline Step by Step Configuration Without ISV's
Step-by-Step Guide: Creating D365FO Build and Deploy Pipelines Azure DevOps Build Pipeline I will walk through the standard procedures...
-
X++ code to read the Excel file static void RB_ReadExcel(Args _args) { SysExcelApplication application; SysExcelWorkbooks w...
-
//Create a new job and paste the code static void RB_ReadTextFile(Args _args) { Filename ...
-
// If the file path comes from the dialog , it automatically works ,else you need to Specify '\\' --------------------------------...
No comments:
Post a Comment