Close Master Sales Order when Quantity is 0

When the full quantity of an item is released from a Master Sales order, is there a way to have these master order deleted or completed?

I know there is an expiration date, but customers release quantities in different time frames. I can not "standardize" a basic expiration that works for every order