Fixed: VoucherType as not number. So, if a bill was being printed directly without kot first being printed, it would not ask for bill type as the comparison was comparing string with int.
This commit is contained in:
@ -301,7 +301,7 @@ def voucher_blank(table: FoodTable, guest: GuestBook | None) -> VoucherBlank:
|
||||
return VoucherBlank(
|
||||
pax=table.seats if guest is None else guest.pax,
|
||||
table=TableLink(id_=table.id, name=table.name),
|
||||
voucher_type=str(VoucherType.KOT),
|
||||
voucher_type=VoucherType.KOT,
|
||||
customer=CustomerLink(id_=guest.customer_id, name=guest.customer.name) if guest is not None else None,
|
||||
kots=[],
|
||||
)
|
||||
|
||||
@ -109,7 +109,7 @@ class VoucherBlank(BaseModel):
|
||||
pax: int
|
||||
table: TableLink
|
||||
customer: CustomerLink | None = None
|
||||
voucher_type: str
|
||||
voucher_type: int
|
||||
kots: list[Kot]
|
||||
model_config = ConfigDict(str_strip_whitespace=True, alias_generator=to_camel, populate_by_name=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user