mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 06:32:26 +00:00
Fix affichage du solde
This commit is contained in:
parent
a6f65fd967
commit
783c724f94
1 changed files with 2 additions and 2 deletions
|
@ -503,7 +503,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
||||||
).aggregate(
|
).aggregate(
|
||||||
total=models.Sum(
|
total=models.Sum(
|
||||||
models.F('prix')*models.F('number'),
|
models.F('prix')*models.F('number'),
|
||||||
output_field=models.FloatField()
|
output_field=models.DecimalField()
|
||||||
)
|
)
|
||||||
)['total'] or 0
|
)['total'] or 0
|
||||||
somme_credit = Vente.objects.filter(
|
somme_credit = Vente.objects.filter(
|
||||||
|
@ -512,7 +512,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
||||||
).aggregate(
|
).aggregate(
|
||||||
total=models.Sum(
|
total=models.Sum(
|
||||||
models.F('prix')*models.F('number'),
|
models.F('prix')*models.F('number'),
|
||||||
output_field=models.FloatField()
|
output_field=models.DecimalField()
|
||||||
)
|
)
|
||||||
)['total'] or 0
|
)['total'] or 0
|
||||||
return somme_credit - somme_debit
|
return somme_credit - somme_debit
|
||||||
|
|
Loading…
Reference in a new issue