static void AutomaticSOPackingSlip(Args _args)
{
SalesTable salestbl;
SalesLine salesline;
SalesFormLetter_PickingList salesFormLetter;
salestbl = SalesTable::find('000184');
while select salesline where salesline.SalesId == salestbl.SalesId
{
salesline.selectForUpdate(true);
ttsBegin;
salesline.SalesDeliverNow = salesline.QtyOrdered;
salesline.update();
ttsCommit;
}
salesFormLetter = SalesFormLetter_PickingList::newPickingList();
salesFormLetter.transDate(systemDateGet());
salesFormLetter.update(salestbl,
systemdateget(),
SalesUpdate::All,
AccountOrder::None,
NoYes::No,
NoYes::No);
}
{
SalesTable salestbl;
SalesLine salesline;
SalesFormLetter_PickingList salesFormLetter;
salestbl = SalesTable::find('000184');
while select salesline where salesline.SalesId == salestbl.SalesId
{
salesline.selectForUpdate(true);
ttsBegin;
salesline.SalesDeliverNow = salesline.QtyOrdered;
salesline.update();
ttsCommit;
}
salesFormLetter = SalesFormLetter_PickingList::newPickingList();
salesFormLetter.transDate(systemDateGet());
salesFormLetter.update(salestbl,
systemdateget(),
SalesUpdate::All,
AccountOrder::None,
NoYes::No,
NoYes::No);
}
No comments:
Post a Comment