I want to implement the behaviour on a flow draining a stock that allows either a standard amount or the amount actually in the preceding stock, whichever is the lower.
This must be a common issue under the generic heading of "Inventory can not go below zero". I'm sure there is a well documented solution I just can't seem to find it.