display str reorderStatus()
{
str ret="";
InventSum inventSum;
InventDim inventDim;
real tmpAvailPhysical;
ReqItemTable reqItemTable;
InventDim inventDim2;
real tmpminInventOnhand;
;
SELECT sum(AvailPhysical) FROM inventSum
WHERE inventSum.ItemId == SWAN_Reorderpoint_1.ItemId
JOIN inventDim
WHERE inventDim.inventDimId == inventSum.InventDimId
&& inventDim.InventLocationId == f_InventLocationId;
tmpAvailPhysical =inventSum.AvailPhysical;
SELECT minInventOnhand FROM reqItemTable
WHERE reqItemTable.ItemId == SWAN_Reorderpoint_1.ItemId
JOIN inventDim2
WHERE inventDim2.inventDimId == reqItemTable.CovInventDimId
&& inventDim2.InventLocationId == f_InventLocationId; // class varieable :: warehouse :: get from dialog
tmpminInventOnhand = reqItemTable.MinInventOnhand;
if(tmpAvailPhysical <= tmpminInventOnhand)
{
ret = "สั่งซื้อ";
}
return ret;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น