Commit Graph
12 Commits
Author SHA1 Message Date
Cédric Krier 6d7daac2a8 Round only the tax amount of the line when rounding per line
If we round the tax amount already added to the other line, the result may vary
depending on the order of the lines.
This is because round half even is used so the result may depend on the already
summed tax amounts.

Closes #14047
(grafted from e1e376f91bc1e111cdef39ddcbbfd92d201ea6c9)

--HG--
branch : 7.0
2025-05-30 18:10:27 +02:00
Cédric Krier 32ca3ceab6 Merge tax line with the same key but computed separately
Closes #13777
(grafted from 0a04ac7cc66be0e4afad66f71746ed34ca5f13b7)

--HG--
branch : 7.0
2024-12-24 14:54:47 +01:00
Cédric Krier 6e030c62ee Round together only taxable lines with the same taxes and sign
The rounding error must not be distributed between taxable lines having
different taxes otherwise the tax amount is not stable for the same base
amount.

Closes #13673
(grafted from 09294cc144f08088547eee0b5f47f36e5ad61926)

--HG--
branch : 7.0
2024-11-12 17:39:42 +01:00
Cédric Krier b7adb7ba77 Sort posted lines to reconcile at last by party
The lines may or may not have a party depending on the account.
So the order key must avoid compare party instance with None value.

Closes #13268
(grafted from 97e730164485c038de7744ea0a3fb189fd7426fa)

--HG--
branch : 7.0
2024-05-21 10:12:46 +02:00
Cédric Krier 3b29353565 Do not fail on leap day to create next fiscal year
Replace the year of a date is not safe, it is better to use relativedelta.

Closes #13064
(grafted from 4b19fb0bc801a784139c0c6245d8649480e13280)

--HG--
branch : 7.0
2024-02-29 15:36:16 +01:00
Cédric Krier 701670f0e3 Update trees of chart of accounts with 2 passes
When a new parent is added to a tree template like types, taxes or tax codes,
the corresponding record of the new template parent is not yet created.
So we need to use a default value for the parent and update again the tree
after creating the new records.

Closes #12755
(grafted from 561f9c7dbdc2a2c39c1fe5f6bf7274d01ee9ebd6)

--HG--
branch : 7.0
2023-11-16 16:32:43 +01:00
Cédric Krier 84d83120c5 Add receivable/payable to company 2023-04-07 18:24:09 +02:00
Nicolas Évrard ab020a78e8 Reconcile the zero lines after saving moves 2023-01-23 17:05:55 +01:00
Cédric Krier b48e4966d5 Add functions and attribute to handle check access and active records
Closes #11863
2022-12-30 13:56:10 +01:00
Sergi Almacellas Abellana 0287507f85 Update parent and replaced_by when template has no taxes
Closes #11891
2023-01-09 14:34:21 +01:00
Nicolas Évrard 2da82e2b94 Accrue and allocate rounding errors when there are multiple taxes
Closes #11317
2022-12-25 18:55:17 +01:00
Cédric Krier fb14b53030 Prepare migration to monorepo 2022-12-16 21:09:21 +01:00