saveInventory is saving to the database.