Added search option for inventory_records model, and using SecureRandom method

Added search method on InventoryRecord model, and applied SecureRandom