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

Merge branch 'fix_affichage_solde' into 'dev'

Fix affichage du solde

See merge request federez/re2o!311
This commit is contained in:
chirac 2018-09-26 15:31:16 +02:00
commit c7949ac684

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