If you want the value of SaleDetailId then
onclick="onDiscountClick(@items.SaleDetailId)"
if you need to pass it as text
onclick="onDiscountClick('@items.SaleDetailId')"
If it is the ID attribue of SaleDetailId you want to pass and not the value of it then use IdFor
onclick="onDiscountClick(@(Html.IdFor(model => model.SaleDetailId)))"
If you want something else you'll need to explain what you want a little better.