If you have used a discount code for an order and you return part of the order, part of the discount amount (in proportion to the gross turnover) will be deducted from the gross sales price, which will be refunded to you.