Available at time of order with date range

,

I need assistance creating a BAQ that has parameters of a start date and end date that looks at orders that were placed within the date range and what the QOH for the ordered item was at time of order. This will allow us to see if stock was available at time of order for make to stock parts. I have a BAQ that calculates the stock on a certain date by subtracting the transaction from the current QOH. I’m have trouble applying the at time of order concept. Does anyone have any insight into this or an existing BAQ that can be easily transformed for what we need?