Commit b075c99b authored by Jérome Perrin's avatar Jérome Perrin

accounting: always compare rounded values when indexing balance transactions

To prevent rounding errors, we always compare rounded values to the
precision of the accounting currency. There was a place here where we
were using -= without rounding, which caused to detect a difference
between new and current stock and insert a line for 0 in an existing
instance for which some accounting lines were created with too precise
values - but not in a way that was detected by the assertions in
AccountingPeriod_createBalanceTransaction.

Rounding here as well solved the problem with that data.
parent fb18e4e2
Pipeline #21680 failed with stage
in 0 seconds