diff --git a/Restaurant/views.py b/Restaurant/views.py index 77d26f4..3eba8c0 100644 --- a/Restaurant/views.py +++ b/Restaurant/views.py @@ -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: @@ -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',