How to create invoice so it wont deduct discount from cost of line?


I’v got a problem with showing correct discounts in the invoices. How inj uses property, is it always subtracted from the line.cost? Lets say i have item with full price 10 EUR, and discount of 5 EUR, and there’s a tax 20% (inclusive), so the line item would look like this?

      ['tax_name1']: 'Tax',
      ['tax_rate1']: 20,
      cost: 8,
      discount: 5

I was thinking actually the discount used just for visualization, and not used to calculate actual cost. is it possible to disable it? so it works only for PDF visualization.


One option may be to use a custom product field called ‘Discount’ instead.