Good Morning All,
Having a bit of a brain freeze.
We are trying to force folks to complete jobs before they take the item to be shipped. It is tough though when the truck is at the dock and folks start to rush.
I have a query that I want to use in a BPM. I am trying to convert the query to use then the ttShipDtl.ReadyToInvoice field gets updated to be checked (true). This query check to make sure the QtyCompleted on the job is completed before the items can be shipped. Do I need to set the variables before I create the condition on the if query? I am not seeing how to do this in the designer.
Better yet, is there a setting in the config that will stop users from shipping without having to create the BPM.
select sd.EffectiveDate, sd.ChangeDate, sd.PackNum, sd.PackLine, sd.OrderNum, sd.OrderLine, sd.OrderRelNum, sd.LineType, sd.OurJobShipQty, sd.JobNum, sd.ReadyToInvoice, jp.ProdQty, jp.ShippedQty, jp.ReceivedQty, jp.WIPQty, jh.JobNum, jh.JobComplete, jh.QtyCompleted, ( jh.QtyCompleted - jp.ShippedQty ) as AvailToShip from Erp.ShipDtl sd inner join Erp.JobProd jp on sd.OrderNum = jp.OrderNum and sd.OrderLine = jp.OrderLine and sd.OrderRelNum = jp.OrderRelNum inner join JobHead jh on jh.JobNum = jp.JobNum where 1 = 1 and ((sd.OurJobShipQty) <= ( jh.QtyCompleted - jp.ShippedQty )) --and sd.ReadyToInvoice = 1