select inventTrans
where inventTrans.ItemId == _salesLine.ItemId
&& inventTrans.StatusReceipt == StatusReceipt::None
&& inventTrans.StatusIssue == StatusIssue::OnOrder
exists join inventTransOrigin
where inventTransOrigin.RecId == inventTrans.InventTransOrigin
&& inventTransOrigin.InventTransId == _salesLine.InventTransId;
inventmovement = inventTrans.inventmovement(true);
inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventmovement, inventTrans.inventDim(), inventTrans.Qty, false);
inventUpd_Reservation.updatenow();
inventBatchId = "123456BATCH";
inventDim.clear();
inventDim.data(InventDim::find(_salesLine.InventDimId));
inventDim.InventBatchId = InventBatch::find(inventBatchId, _salesLine.ItemId).inventBatchId;
inventDim = InventDim::findOrCreate(inventDim);
inventMovement = InventTrans::findTransId(_salesLine.InventTransId).inventMovement(true);
inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventmovement, inventDim, inventTrans.Qty, false);
inventUpd_Reservation.updatenow();
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156