BAM part below min

Has anyone written a .p file that sends an alert when the on hand
quantity goes below the minimum and the PartTran.TranType is not
STK-STK. This seems to work 90% of the time but sometimes a STK-STK
Transaction will still trigger an alert. While troubleshooting this I
insert the PartTran.TranType to the email and it seems to be a timing
issue because the .p script thinks the last transaction is actually the
next to last in the Transaction History. Has anyone else had this
problem and found a solution?

FOR LAST PartTran Where (PartTran.Company = PartWhse.Company) AND

(PartTran.PartNum = PartWhse.PartNum)


IF (onhand-sum) < (min) AND Part.Class = "CLUB" AND
OldPartWhse.OnHandQty >= (min) AND PartTran.TranType <> "STK-STK"



Rich Wagner

BAW Plastics

Phone: (412)384-3100

E-Mail: rwagner@...

[Non-text portions of this message have been removed]