Skip to content

Commit

Permalink
Merge pull request #376 from Troter2/371-acabar-pdf-funcio-generate_r…
Browse files Browse the repository at this point in the history
…oom_invoice

Update views.py
  • Loading branch information
jus25 authored Jun 13, 2024
2 parents 07923fe + b4379a8 commit 8e9dab2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Restaurant/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def generate_order_pdf(request):
response['Content-Disposition'] = 'attachment; filename="factura.pdf"'
return response


def create_order_pdf_bytes(reservation):
items_amounts = []
if reservation.order_num:
Expand Down Expand Up @@ -273,6 +274,7 @@ def create_order_pdf_bytes(reservation):
c.save()
return buffer


def view_orders_without_reservation(request):
if request.user.has_perm('waiter'):
orders_with_reservation = RestaurantReservation.objects.exclude(order_num_id=None).values_list('order_num_id',
Expand Down

0 comments on commit 8e9dab2

Please sign in to comment.