# Price calculation

**URL:** <https://www.dolibarr.org/forum/t/price-calculation/25082>\
**Category:** Developing for Dolibarr\
**Created:** [March 11, 2024, 2:48pm UTC](https://www.dolibarr.org/forum/t/price-calculation/25082 "2024-03-11T14:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aldalm](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@Aldalm](https://www.dolibarr.org/forum/u/Aldalm)\
**Post date:** [March 11, 2024, 2:48pm UTC](https://www.dolibarr.org/forum/t/price-calculation/25082/1 "2024-03-11T14:48:01Z")

</div>

Good morning,

I added an extrafield to the propaldet table, this field is an increase on the price, when I insert the value it should do exactly the opposite of what already happens with the discount. I haven’t found any other way than to modify the propal.class.php class and the related functions, updateline and addline, but these changes will be lost at the next update, can anyone suggest a solution?

Thank you

---

<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:** [March 11, 2024, 2:55pm UTC](https://www.dolibarr.org/forum/t/price-calculation/25082/2 "2024-03-11T14:55:30Z")

</div>

Hello,

You need to make an external module or use external modules like [Extraprice Premium : sales price weighting](https://www.dolistore.com/en/modules/350-Extraprice-Premium---sales-price-weighting.html)
