How to calculate closing stock of raw materials