Hi Kavitha,
Without example data or screenshots its difficult for anybody to help, as we cannot imagine how the data is showing up. Please post some screenshots of the output for better understanding.
Anyway, in the cases where you see stock in the 0-30 and 31-60 buckets, check what value you get in the "difference" column. The buckets are dependent on the diff value, so that should help you understand what's going wrong.
Regards,
Suhas