Purchase discounts are recorded in a contra account (an account that is used to decrease the cost of sales account for example). So yes, they are included in the cost of sales but while the cost of sales has a debit balance, the purchase discounts will be a credit which means that by having purchase discounts, your total cost of sales will be decreased (which is reasonable anyway).