• Jérome Perrin's avatar
    accounting: always compare rounded values when indexing balance transactions · b075c99b
    Jérome Perrin authored
    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.
    b075c99b
document.erp5.BalanceTransaction.py 20 KB