Calculation of Working capital

How to include depreciation and working capital in the following NPV analysis, because depreciation for the machinery goes for longer than the project timeline, and working capital needs to be accounted for as a percentage of sales.Project timeline – 4 yearsInvestment required 1,200,000- 1 mil for new machinery depreciated over 4 years, zero salvage value at end of 4 years- 200,000 for building extension depreciated over 10 years400,000 units will be sold equally spread over the 4 year timeline, at a fixed cost of 20 per unitCost of good sold is as following:year 1 – 1,100,000year 2 – 1,180,000year 3 – 2,200,000year 4 – 2, 360,000Working capital is 10% of sales recovered at end of year 4Depreciation – 20% diminishing valueTax rate – 25%required rate of return is 12%