In case of a table with no guest, it will ask for pax

This commit is contained in:
Amritanshu
2019-08-26 15:11:28 +05:30
parent a12f093828
commit 0c0a2990a8
8 changed files with 102 additions and 10 deletions

View File

@ -36,12 +36,6 @@ def save(request):
voucher_type = VoucherType[request.GET["p"]]
guest_book = get_guest_book(request.GET.get("g", None), request.dbsession)
table = (
request.dbsession.query(FoodTable)
.filter(FoodTable.id == uuid.UUID(json["table"]["id"]))
.first()
)
check_permissions(None, voucher_type, request.effective_principals)
bill_id = get_bill_id(voucher_type, request.dbsession)
@ -51,7 +45,7 @@ def save(request):
item = Voucher(
now,
guest_book.pax if guest_book is not None else table.seats,
guest_book.pax if guest_book is not None else json["pax"],
bill_id,
kot_id,
json["table"]["id"],