From 783c724f944346fd3824e81b7e798fcaab2a22cf Mon Sep 17 00:00:00 2001 From: edpibu Date: Wed, 26 Sep 2018 13:16:22 +0200 Subject: [PATCH] Fix affichage du solde --- users/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/models.py b/users/models.py index f579148c..f32bed03 100755 --- a/users/models.py +++ b/users/models.py @@ -503,7 +503,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser, ).aggregate( total=models.Sum( models.F('prix')*models.F('number'), - output_field=models.FloatField() + output_field=models.DecimalField() ) )['total'] or 0 somme_credit = Vente.objects.filter( @@ -512,7 +512,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser, ).aggregate( total=models.Sum( models.F('prix')*models.F('number'), - output_field=models.FloatField() + output_field=models.DecimalField() ) )['total'] or 0 return somme_credit - somme_debit