static void OnhandbySite(Args _args)
{
PurchTable purchtbl;
PurchLine purchline;
InventDim inventdim,inventdimsite;
InventDimParm inventDimParm;
InventOnhand inventonhand;
purchtbl= PurchTable::find("PO-000011",false);
select purchline
join inventdim
where purchtbl.PurchId == purchline.PurchId
&& purchline.InventDimId == inventdim.inventDimId;
inventdimsite.inventsiteid = "SGI";
inventDimParm.initFromInventDim(inventdimsite);
inventonhand = InventOnhand::newParameters(purchline.itemid,inventdimsite,inventDimParm);
info(strFmt("%1",inventonhand.availphysical()));
}
================================================================
static void OnhandbyInventDimId(Args _args)
{
PurchTable purchtbl;
PurchLine purchline;
InventDim inventdim,inventdimsite;
InventDimParm inventDimParm;
InventOnhand inventonhand;
purchtbl= PurchTable::find("PO-000011",false);
while select purchline
join inventdim
where purchtbl.PurchId == purchline.PurchId
&& purchline.InventDimId == inventdim.inventDimId
{
select inventdimsite where inventdimsite.InventSiteId == inventdim.InventSiteId;
inventDimParm.initFromInventDim(inventdimsite);
inventonhand = InventOnhand::newParameters(purchline.itemid,inventdimsite,inventDimParm);
info(strFmt("%1",inventonhand.availphysical()));
}
}
{
PurchTable purchtbl;
PurchLine purchline;
InventDim inventdim,inventdimsite;
InventDimParm inventDimParm;
InventOnhand inventonhand;
purchtbl= PurchTable::find("PO-000011",false);
select purchline
join inventdim
where purchtbl.PurchId == purchline.PurchId
&& purchline.InventDimId == inventdim.inventDimId;
inventdimsite.inventsiteid = "SGI";
inventDimParm.initFromInventDim(inventdimsite);
inventonhand = InventOnhand::newParameters(purchline.itemid,inventdimsite,inventDimParm);
info(strFmt("%1",inventonhand.availphysical()));
}
================================================================
static void OnhandbyInventDimId(Args _args)
{
PurchTable purchtbl;
PurchLine purchline;
InventDim inventdim,inventdimsite;
InventDimParm inventDimParm;
InventOnhand inventonhand;
purchtbl= PurchTable::find("PO-000011",false);
while select purchline
join inventdim
where purchtbl.PurchId == purchline.PurchId
&& purchline.InventDimId == inventdim.inventDimId
{
select inventdimsite where inventdimsite.InventSiteId == inventdim.InventSiteId;
inventDimParm.initFromInventDim(inventdimsite);
inventonhand = InventOnhand::newParameters(purchline.itemid,inventdimsite,inventDimParm);
info(strFmt("%1",inventonhand.availphysical()));
}
}
No comments:
Post a Comment