Negative inventory average cost

Look at bug reports before you post: Negative Average Cost Problem - #9 by rully_p.