Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Nounous
re2o
Commits
cbe541d3
Commit
cbe541d3
authored
Jan 12, 2018
by
Gabriel Detraz
Committed by
root
Jan 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix, le solde est calculé pour des factures valides
parent
f7657a22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
users/models.py
users/models.py
+3
-2
No files found.
users/models.py
View file @
cbe541d3
...
...
@@ -413,7 +413,8 @@ class User(FieldPermissionModelMixin, AbstractBaseUser, PermissionsMixin):
somme_debit
=
Vente
.
objects
.
filter
(
facture__in
=
Facture
.
objects
.
filter
(
user
=
self
,
paiement__in
=
solde_objects
paiement__in
=
solde_objects
,
valid
=
True
)
).
aggregate
(
total
=
models
.
Sum
(
...
...
@@ -422,7 +423,7 @@ class User(FieldPermissionModelMixin, AbstractBaseUser, PermissionsMixin):
)
)[
'total'
]
or
0
somme_credit
=
Vente
.
objects
.
filter
(
facture__in
=
Facture
.
objects
.
filter
(
user
=
self
),
facture__in
=
Facture
.
objects
.
filter
(
user
=
self
,
valid
=
True
),
name
=
"solde"
).
aggregate
(
total
=
models
.
Sum
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment