fix stockout months duration calculation