8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +00:00

Fix affichage du solde

This commit is contained in:
edpibu 2018-09-26 13:16:22 +02:00 committed by Alexandre Iooss
parent 66abc699d7
commit fc2acbbf30

View file

@ -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