stockpile-co / api

The API for Stockpile, an app that manages stuff for organizations.
0 stars 1 forks source link

Fix itemStatus view not using returnDate #204

Closed AdamVig closed 7 years ago

AdamVig commented 7 years ago

The itemStatus view, used for GET /item/:barcode/status, was added before rental.returnDate was used to mark the return of items. The view must be changed to use rental.returnDate to determine the availability of items.

AdamVig commented 7 years ago

Fixed by changing the logic for determining availability to the following: isnull(rental.rentalID) or not isnull(rental.returnDate) as available