InventDimId _InventDimId = "XXXXX",
Int _Qty = 100)
{
TmpInventTransWMS TmpInventTransWMS;
InventMovement InventMovement;
InventTransOrigin InventTransOrigin;
SalesLine SalesLine;
InventTrans InventTrans;
inventTransWMS_Pick inventTransWMS_Pick;
Query inventTransQuery;
QueryBuildDataSource QueryBuildDataSource;
SalesFormLetter SalesFormLetter;
SalesTable SalesTable;
;
inventTransQuery = new Query();
QueryBuildDataSource = inventTransQuery.addDataSource(tableNum(InventTrans));
InventTrans = InventTrans::findTransId(_InventtransId);
InventTransOrigin = InventTransorigin::findByInventTransId(_InventtransId);
QueryBuildDataSource.addRange(fieldNum(InventTrans,RecId)).value(int642str(InventTrans.recid));
delete_from tmpInventTransWMS;
tmpInventTransWMS.clear();
inventTransWMS_Pick = InventTransWMS_Pick::newStandard(tmpInventTransWMS,inventTransQuery);
tmpInventTransWMS.initFromInventTrans(InventTrans);
tmpInventTransWMS.initFromInventTransOrigin(InventTransOrigin);
tmpInventTransWMS.InventQty = _Qty;
tmpInventTransWMS.InventDimId = _InventDimId;
inventTransWMS_Pick.writeTmpInventTransWMS(tmpInventTransWMS);
inventTransWMS_Pick.updateInvent();
SalesFormLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip);
SalesLine = salesline::findInventTransId(_InventtransId);
SalesTable = SalesTable::Find(SalesLine.salesId);
SalesFormLetter.update(SalesTable,systemDateGet(), SalesUpdate::PickingList, AccountOrder::None, false, false);
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.