fix error in AvailableStock class when fetching pending orders