# How do I add the discounted unit price without VAT in ODT template?

**URL:** <https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745>\
**Category:** CRM/SRM Modules\
**Created:** [May 22, 2021, 7:27am UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745 "2021-05-22T07:27:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinyTiger2013](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/tinytiger2013/32/4165_2.png) [@TinyTiger2013](https://www.dolibarr.org/forum/u/TinyTiger2013)\
**Post date:** [May 22, 2021, 7:27am UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/1 "2021-05-22T07:27:19Z")

</div>

Hello, I’m working on customizing the ODT template, but I couldn’t find any appropriate tag in the Wiki. I need to display the unit price without VAT after discount. If there is a way to do this, please let me know.

Thanks

---

<div class="post-metadata">

**Author:** ![TinyTiger2013](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/tinytiger2013/32/4165_2.png) [@TinyTiger2013](https://www.dolibarr.org/forum/u/TinyTiger2013)\
**Post date:** [June 14, 2021, 5:09am UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/2 "2021-06-14T05:09:11Z")

</div>

> [@Price ea on ODT ouput](https://www.dolibarr.org/forum/t/price-ea-on-odt-ouput/17744):
>
> Hi Team, i have an problem and i hope you can help. I’m looking to have a “price ea” on our ODT template. All the given {line\_price\_htxx} and {object\_xx} are not working. in example for proposal: SalesPrice for product is $100, manuell given Discount 10%, qty. 2 Needed ODT output Price ea $90, Price total $180 Any idea if there is a “smart” solution ? Thanks for your help !

This post seems very similar to what I want to do. But no answer for the last reply.

---

<div class="post-metadata">

**Author:** ![TinyTiger2013](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/tinytiger2013/32/4165_2.png) [@TinyTiger2013](https://www.dolibarr.org/forum/u/TinyTiger2013)\
**Post date:** [June 18, 2021, 5:41am UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/3 "2021-06-18T05:41:30Z")

</div>

Solved.

This may not be a beautiful way, but when I added

```auto
'line_up_discounted_locale'=>price($line->subprice * (1 - ($line->remise_percent / 100)), 0, $outputlangs),

```

into htdocs \> core \> class \> commondocgenerator.class.php, it works!

If you have any better solutions, please tell me.  
Thanks

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [June 18, 2021, 8:54pm UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/4 "2021-06-18T20:54:50Z")

</div>

Hello,

Good solution, but will be erased at each DOlibarr update.  
If you want to keep your changes, move the code to a personal module!

---

<div class="post-metadata">

**Author:** ![umigun](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/umigun/32/7276_2.png) [@umigun](https://www.dolibarr.org/forum/u/umigun)\
**Post date:** [May 3, 2024, 9:43pm UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/5 "2024-05-03T21:43:24Z")

</div>

Hello everyone, is there a permanent solution to this issue until version 19+?

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [May 5, 2024, 8:18am UTC](https://www.dolibarr.org/forum/t/how-do-i-add-the-discounted-unit-price-without-vat-in-odt-template/20745/6 "2024-05-05T08:18:09Z")

</div>

Hello,

> [@ksar](#):
>
> move the code to a personal module!

Or propose a Core evolution.
