# Rounding on sale and invoice

**URL:** https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029
**Category:** User
**Created:** [January 9, 2019, 9:36pm UTC](https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029 "2019-01-09T21:36:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![csotelo](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/csotelo/32/71_2.png) [@csotelo](https://discuss.tryton.org/u/csotelo)
#### Post date: [January 9, 2019, 9:36pm UTC](https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029/1 "2019-01-09T21:36:53Z")

</div>

Dear comunity

I have an issue on rounding related to sales and invoicing

When a sale is done and later invoice. on both stages some times appear totals like 126.36, for a no formal rule, is common that companies do the sale or invoice on a rounded number like 126.40, if the sale or invoice has a total of 126.32, then the amount must be rounded to 126.30, the question is: Is there any way to do it on tryton or must I do as a custom behavior

I will be glad on any suggest

Best regards

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 12, 2019, 11:45pm UTC](https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029/2 "2019-01-12T23:45:40Z")

</div>

Well such rounding will break the accounting. The total of an invoice _must_ be the exact total of the lines and taxes otherwise the accounting move will not be balanced.  
If you want _nice_ numbers, you must use proper unit price that works well.

---

<div class="post-metadata">

### Author: ![csotelo](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/csotelo/32/71_2.png) [@csotelo](https://discuss.tryton.org/u/csotelo)
#### Post date: [January 22, 2019, 2:50pm UTC](https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029/3 "2019-01-22T14:50:58Z")

</div>

@ced you are right, but for any reason, on our accounting rules, work on the inverse way. Something like that:

- A product price is USD 200.00, that include taxes.
- It means once the product is on a sale and invoiced, the taxes must be calculated and taken off [169.4915254237 + 30.50847457627117 =\> 169.49 + 30.51]

These is the right way on calculated prices, where prices list must be rounded and taxes included, but on tryton are somethig like

A product price is USD 169.49 then with taxes calculation, the price list is 199.99 no USD 200.00 , since the diference is no so big, I could make the rounded, but I wnt to do on the right tryton way

Bests

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 22, 2019, 3:08pm UTC](https://discuss.tryton.org/t/rounding-on-sale-and-invoice/1029/4 "2019-01-22T15:08:45Z")

</div>

You must increase the precision of the unit price in order to not have rounding issue with the possible tax rates.  
Also you can use the price list module to create a price list which compute with tax included. The sale order will reverse compute the proper unit price (but it needs to have correct digits).
