Skip to Content
0
Sep 05, 2013 at 03:10 PM

Total quantity for an order

734 Views

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.

thanks,

Laura

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]))

select @tq