static void createOutputOrder(Args _args)
{
InventJournalTable journalTable;
InventJournalTrans journalTrans;
InventMovement inventMovement;
WMSOrderCreate wmsOrderCreate;
;
while select journalTable
where journalTable.JournalType == InventJournalType::Transfer
//&& journalTable.JournalId == "********" ------------------------------------------- For Specific Journal
{
while select journalTrans
where JournalTrans.JournalId == journalTable.JournalId
{
inventMovement = InventMovement::construct(journalTrans);
wmsOrderCreate = WMSOrderCreate::newMovement(inventMovement, journalTrans.Qty);
wmsOrderCreate.parmMustBeWMSOrderControlled(true);
wmsOrderCreate.parmQty(journalTrans.Qty);
wmsOrderCreate.parmRecalculateMaxQtyForValidation(false);
wmsOrderCreate.parmWMSOrderType(WMSOrderType::Output);
wmsOrderCreate.parmMaxCWQty(journalTrans.Qty);
wmsOrderCreate.parmMaxQty(journalTrans.Qty);
wmsOrderCreate.run();
}
}
}
{
InventJournalTable journalTable;
InventJournalTrans journalTrans;
InventMovement inventMovement;
WMSOrderCreate wmsOrderCreate;
;
while select journalTable
where journalTable.JournalType == InventJournalType::Transfer
//&& journalTable.JournalId == "********" ------------------------------------------- For Specific Journal
{
while select journalTrans
where JournalTrans.JournalId == journalTable.JournalId
{
inventMovement = InventMovement::construct(journalTrans);
wmsOrderCreate = WMSOrderCreate::newMovement(inventMovement, journalTrans.Qty);
wmsOrderCreate.parmMustBeWMSOrderControlled(true);
wmsOrderCreate.parmQty(journalTrans.Qty);
wmsOrderCreate.parmRecalculateMaxQtyForValidation(false);
wmsOrderCreate.parmWMSOrderType(WMSOrderType::Output);
wmsOrderCreate.parmMaxCWQty(journalTrans.Qty);
wmsOrderCreate.parmMaxQty(journalTrans.Qty);
wmsOrderCreate.run();
}
}
}
No comments:
Post a Comment