I am trying to create a FMS to put in the Remarks box so the user can click to initiate a sum of the quantity of all the lines on the order, before Adding the order. I successfully created the query if the order has been added and the user brings it back up and runs the FMS to get the total of the quantity for all the lines (which looks something like this below). But I need to get the total qty as a checking method during order entry to match to the total qty the customer sends on the PO.
any suggestions appreciated.
works after order is added:
declare @tq as float
SEt @tq= (select(sum (t1.quantity)) FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry =
T1.DocEntry and (t0.docnum = $[$8.0.0]))