You might be able to use N/query to create a cumulative running inventory balance based on posting inventoryassignment lines, using that to detect when an item's on-hand level drops to zero and calculate number of days until it's increased or until the report is run, whichever is first.