For cash basis, you record inventory when it is purchased, not when it is sold to customers.
Under accrual basis, inventory is recorded when you buy items and match them with revenue when you sell those items. Accrual basis is suggested for large businesses, and those managing inventory. Accrual basis could provide a more accurate picture of your organization's financial results.