I need to show an informational warning box when the receiving stock via Job Receipt to Inventory. However, the warning should only appear when the total booked in i.e. sub total of Part Tran\Tran Qty by Job No is greater than the Job Head\Job Prod.
I have created a BPM rule based on the ReceiptsFromMfg.OnChangeTranQty method code. The pre-processing condition then states: number of rules in TEST query is more than 0.
Action: Show informational message.
The TEST query is based on the following syntax:
for last ttPartTran where (ttPartTran.RowMod = 'A' or ttPartTran.RowMod = 'U' and ttPartTran.TranType = 'MFG-STK' and ttPartTran.WareHouseCode = 'GHD') , each jobhead where jobhead.Company = ttPartTran.Company and jobhead.JobNum = ttPartTran.JobNum and ttPartTran.TranQty > jobhead.ProdQty no-lock
The above query works on a single level, however, I need the prompt to appear only when the sum of the ttPartTran.TranQty by the Job Number is greather than the Job Head.Job Prod - does anybody know the correct syntax?