diff --git a/models/scop_cotisation.py b/models/scop_cotisation.py index 20ebcebbf4a4ba4545ccd0f58e0cdebd84cb57c9..efe93dcea180588998774dcb29d0d87cb3e0d984 100644 --- a/models/scop_cotisation.py +++ b/models/scop_cotisation.py @@ -131,7 +131,8 @@ class ScopCotisation(models.AbstractModel): large_multiple = small_multiple + multiple # Return the closest of two - if abs(float_to_round - small_multiple) < large_multiple: + if abs(float_to_round - small_multiple) < \ + abs(float_to_round - large_multiple): return small_multiple else: return large_multiple