Code for unit price after discount on invoice

Hi,

Sorry if this is mentioned somewhere else.

I can’t seem to find the code for the price of a unit after discount - I would like to ad that to my template. (currently I have original price - discount - line total)

Hi Gijs, Thanks for your comment. I’m pleased to say that the team have just been able to quickly add a new variable for this. You will now be able to use the variable of {{ line.unit_value_after_discount }}. I hope this helps. Cheers!

Hi Ben,

Thank you.

I am testing it but it does throw in a very weird one in one occassion. where can I set this to be 2 decimal places?

I actually see a lot of weird numbers and calculations - in the tests, so it seems the code does not work properly yet?

Hi Gijs, Thanks for your reply. Can you confirm whether you are using the variable {{ line.unit_value_after_discount }} and not {{ line.unit_value_after_discount_raw }}. The latter will not be rounded and will contain the full number. If you use the first option, I would expect this to be rounded and the currency symbol included. If this still doesn’t look correct, then if you could raise a ticket for this, then we would be very happy to have a closer look at this for you. Cheers!

I used the one you provided.

Also notice that the calculation of the discount is wrong in the second example. 130 euros should be 110.50 discounted (the totals are correctly calculated)

(I opened a ticket) THis is fixed :grinning_face: