fix bug in ending inventory report