Thursday, 12 March 2015
Find BatchId with a KanbanCardId
Public InventBatchId findByKanBanCardId(KanbanCardId _kanbanCardId)
{
Kanban kanban;
KanbanCard kanbanCard;
KanbanJob kanbanJob;
InventTransOrigin inventTransOrigin;
InventTrans inventTrans;
InventDim inventDim;
// Obviously for Batches of ONE
select firstOnly InventBatchId from inventDim
join inventTrans
where inventDim.inventDimId == inventTrans.inventDimId
join inventTransOrigin
where inventTrans.InventTransOrigin == inventTransOrigin.RecId
join kanbanJob
where inventTransOrigin.InventTransId == kanbanJob.InventTransId
&& inventTransOrigin.dataAreaId == kanbanJob.InventTransDataAreaId
join kanbanCard
where kanbanJob.RecId == kanbanCard.kanban
&& kanbanCard.CardId == _kanbanCardId;
return inventDim.InventBatchId;
}
Labels:
batchid,
find,
kanbanCardId
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment