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 / Register
Toggle navigation
Open sidebar
chris
repanier
Commits
2355f475
Commit
2355f475
authored
Dec 24, 2016
by
Patrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get customer_id when useful
parent
8bc80575
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
repanier/views/customer_invoice_class.py
repanier/views/customer_invoice_class.py
+1
-1
No files found.
repanier/views/customer_invoice_class.py
View file @
2355f475
...
...
@@ -92,8 +92,8 @@ class CustomerInvoiceView(DetailView):
def
get_queryset
(
self
):
pk
=
self
.
kwargs
.
get
(
'pk'
,
None
)
if
self
.
request
.
user
.
is_staff
:
customer_id
=
self
.
request
.
GET
.
get
(
'customer'
,
None
)
if
(
pk
is
None
)
or
(
pk
==
'0'
):
customer_id
=
self
.
request
.
GET
.
get
(
'customer'
,
None
)
last_customer_invoice
=
CustomerInvoice
.
objects
.
filter
(
customer_id
=
customer_id
,
invoice_sort_order__isnull
=
False
).
only
(
"id"
).
order_by
(
'-invoice_sort_order'
).
first
()
...
...
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