Commit 2355f475 authored by Patrick's avatar Patrick

Get customer_id when useful

parent 8bc80575
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment