Is there any way I can quickly fix this?

At month end my total inventory value goes to my GL. I have noticed that I have many items whose net quantity is 0, but whose net value is in the negative. (I'm not sure if there are or could be positive values as well) This has occurred because we sold that item before it was received into inventory. I believe that this gets fixed automatically the next time we have a positive quantity in inventory and then something gets sold. BUT from an accounting standpoint, at the point when the quantity is at 0, the value should be at $0, so that costs of sale are accurate in the GL.

If there's not such a fix, is this something that doing month end could accomplish in the future?