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.
Showing
Please register or sign in to comment